update phpstan (#35487)

This commit is contained in:
Frédéric FRANCE 2025-09-26 20:46:46 +02:00 committed by GitHub
parent 4284d147bf
commit 343e05efc5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 49 additions and 49 deletions

View file

@ -39,7 +39,7 @@ jobs:
with:
php-version: ${{ env.PHP_VERSION }}
coverage: none # disable xdebug, pcov
tools: phpstan:2.1.8, cs2pr
tools: phpstan:2.1.12, cs2pr
extensions: calendar, json, imagick, gd, zip, mbstring, intl, opcache, imap,
mysql, pgsql, sqlite3, ldap, xml, mcrypt
env:

View file

@ -43,7 +43,7 @@ jobs:
with:
php-version: ${{ matrix.php-version }}
coverage: none # disable xdebug, pcov
tools: phpstan:2.1.8, cs2pr
tools: phpstan:2.1.12, cs2pr
extensions: calendar, json, imagick, gd, zip, mbstring, intl, opcache, imap,
mysql, pgsql, sqlite3, ldap, xml, mcrypt

View file

@ -1767,7 +1767,13 @@ parameters:
-
message: '#^Call to function is_array\(\) with array\<mixed\> will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 2
count: 1
path: ../../../htdocs/bookmarks/bookmarks.lib.php
-
message: '#^Call to function is_array\(\) with non\-empty\-array\<mixed\> will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: ../../../htdocs/bookmarks/bookmarks.lib.php
-
@ -1951,14 +1957,14 @@ parameters:
path: ../../../htdocs/comm/action/index.php
-
message: '#^If condition is always false\.$#'
identifier: if.alwaysFalse
message: '#^Call to function is_array\(\) with string will always evaluate to false\.$#'
identifier: function.impossibleType
count: 1
path: ../../../htdocs/comm/action/index.php
-
message: '#^Right side of && is always true\.$#'
identifier: booleanAnd.rightAlwaysTrue
message: '#^If condition is always false\.$#'
identifier: if.alwaysFalse
count: 1
path: ../../../htdocs/comm/action/index.php
@ -2106,6 +2112,12 @@ parameters:
count: 1
path: ../../../htdocs/comm/action/pertype.php
-
message: '#^Call to function is_array\(\) with string will always evaluate to false\.$#'
identifier: function.impossibleType
count: 1
path: ../../../htdocs/comm/action/peruser.php
-
message: '#^Loose comparison using \!\= between ''show_peruser'' and ''show_day'' will always evaluate to true\.$#'
identifier: notEqual.alwaysTrue
@ -3373,7 +3385,7 @@ parameters:
path: ../../../htdocs/compta/localtax/list.php
-
message: '#^Call to function is_array\(\) with list\<array\<string, mixed\>\> will always evaluate to true\.$#'
message: '#^Call to function is_array\(\) with list\<non\-empty\-array\<string, mixed\>\> will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: ../../../htdocs/compta/localtax/quadri_detail.php
@ -6967,7 +6979,7 @@ parameters:
path: ../../../htdocs/core/lib/admin.lib.php
-
message: '#^Offset 1 on array\{string, non\-falsy\-string, string\} in empty\(\) always exists and is not falsy\.$#'
message: '#^Offset 1 on array\{non\-falsy\-string, non\-falsy\-string, string\} in empty\(\) always exists and is not falsy\.$#'
identifier: empty.offset
count: 1
path: ../../../htdocs/core/lib/admin.lib.php
@ -7119,7 +7131,7 @@ parameters:
-
message: '#^If condition is always true\.$#'
identifier: if.alwaysTrue
count: 3
count: 4
path: ../../../htdocs/core/lib/functions.lib.php
-
@ -7153,19 +7165,19 @@ parameters:
path: ../../../htdocs/core/lib/functions.lib.php
-
message: '#^Offset ''list'' on array\{list\: array\{\}\}\|array\{list\: non\-empty\-array\<int, object\>\} in isset\(\) always exists and is not nullable\.$#'
message: '#^Offset ''list'' on array\{list\: array\{\}\}\|array\{list\: non\-empty\-list\<object\>\} in isset\(\) always exists and is not nullable\.$#'
identifier: isset.offset
count: 1
path: ../../../htdocs/core/lib/functions.lib.php
-
message: '#^Offset 1 on array\{string, non\-falsy\-string\} in empty\(\) always exists and is not falsy\.$#'
message: '#^Offset 1 on array\{non\-falsy\-string, non\-falsy\-string\} in empty\(\) always exists and is not falsy\.$#'
identifier: empty.offset
count: 1
path: ../../../htdocs/core/lib/functions.lib.php
-
message: '#^Offset 1 on array\{string, non\-falsy\-string\} in isset\(\) always exists and is not nullable\.$#'
message: '#^Offset 1 on array\{non\-falsy\-string, non\-falsy\-string\} in isset\(\) always exists and is not nullable\.$#'
identifier: isset.offset
count: 1
path: ../../../htdocs/core/lib/functions.lib.php
@ -7404,6 +7416,12 @@ parameters:
count: 1
path: ../../../htdocs/core/lib/xcal.lib.php
-
message: '#^Offset 0 on array\{non\-falsy\-string, non\-empty\-string\} in empty\(\) always exists and is not falsy\.$#'
identifier: empty.offset
count: 1
path: ../../../htdocs/core/lib/xcal.lib.php
-
message: '#^Loose comparison using \=\= between ''auto'' and ''auto'' will always evaluate to true\.$#'
identifier: equal.alwaysTrue
@ -9504,12 +9522,6 @@ parameters:
count: 1
path: ../../../htdocs/document.php
-
message: '#^Negated boolean expression is always true\.$#'
identifier: booleanNot.alwaysTrue
count: 1
path: ../../../htdocs/document.php
-
message: '#^Negated boolean expression is always true\.$#'
identifier: booleanNot.alwaysTrue
@ -14112,30 +14124,6 @@ parameters:
count: 1
path: ../../../htdocs/product/stock/massstockmove.php
-
message: '#^Variable \$datatoimport might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/product/stock/massstockmove.php
-
message: '#^Variable \$endatlinenb might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/product/stock/massstockmove.php
-
message: '#^Variable \$excludefirstline might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/product/stock/massstockmove.php
-
message: '#^Variable \$format might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/product/stock/massstockmove.php
-
message: '#^Variable \$producttmp might not be defined\.$#'
identifier: variable.undefined
@ -16200,12 +16188,6 @@ parameters:
count: 1
path: ../../../htdocs/reception/list.php
-
message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/recruitment/admin/public_interface.php
-
message: '#^If condition is always true\.$#'
identifier: if.alwaysTrue
@ -16632,6 +16614,24 @@ parameters:
count: 1
path: ../../../htdocs/salaries/card.php
-
message: '#^Loose comparison using \=\= between '''' and ''nolink'' will always evaluate to false\.$#'
identifier: equal.alwaysFalse
count: 2
path: ../../../htdocs/salaries/class/paymentsalary.class.php
-
message: '#^Result of \|\| is always false\.$#'
identifier: booleanOr.alwaysFalse
count: 2
path: ../../../htdocs/salaries/class/paymentsalary.class.php
-
message: '#^Variable \$url in empty\(\) always exists and is not falsy\.$#'
identifier: empty.variable
count: 2
path: ../../../htdocs/salaries/class/paymentsalary.class.php
-
message: '#^Negated boolean expression is always false\.$#'
identifier: booleanNot.alwaysFalse