Skip to content

Commit

Permalink
fix phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic34 committed Feb 3, 2025
1 parent 2794f53 commit 1dabc6d
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 13 deletions.
6 changes: 0 additions & 6 deletions dev/build/phpstan/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -14886,12 +14886,6 @@ parameters:
count: 2
path: ../../../htdocs/core/tpl/formlayoutai.tpl.php

-
message: '#^Variable \$langs might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/core/tpl/list_print_subtotal.tpl.php

-
message: '#^Variable \$limit might not be defined\.$#'
identifier: variable.undefined
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/tpl/filemanager.tpl.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2017 Laurent Destailleur <[email protected]>
* Copyright (C) 2024-2025 MDW <[email protected]>
* Copyright (C) 2024 Frédéric France <[email protected]>
* Copyright (C) 2024-2025 MDW <[email protected]>
* Copyright (C) 2024-2025 Frédéric France <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/tpl/formlayoutai.tpl.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2024 Laurent Destailleur <[email protected]>
* Copyright (C) 2024-2025 MDW <[email protected]>
* Copyright (C) 2024 Frédéric France <[email protected]>
* Copyright (C) 2024-2025 MDW <[email protected]>
* Copyright (C) 2024-2025 Frédéric France <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
21 changes: 21 additions & 0 deletions htdocs/core/tpl/list_print_subtotal.tpl.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
<?php
/* Copyright (C) 2025 Frédéric France <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

/**
* @var Translate $langs
* @var array{nbfield:int,pos?:array<int,int>,val?:array<int,float>} $totalarray
*/

'@phan-var-force array{nbfield:int,pos?:array<int,int>,val?:array<int,float>} $totalarray';

Expand Down
8 changes: 5 additions & 3 deletions htdocs/core/tpl/notes.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* Copyright (C) 2012 Regis Houssin <[email protected]>
* Copyright (C) 2013 Florian Henry <[email protected]>
* Copyright (C) 2014-2020 Laurent Destailleur <[email protected]>
* Copyright (C) 2024 Frédéric France <[email protected]>
* Copyright (C) 2024-2025 Frédéric France <[email protected]>
* Copyright (C) 2025 MDW <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
Expand All @@ -19,12 +19,14 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* @var CommonObject $object
* @var ?CommonObject $object
* @var Form $form
* @var Translate $langs
* @var User $user
*
* @var int $permissionnote
* @var ?int<0,1> $permissionnote
* @var string $moreparam
* @var ?int $colwidth
* @var string $cssclass
*/
// Protection to avoid direct call of template
Expand Down

0 comments on commit 1dabc6d

Please sign in to comment.