Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix & enable PhanTypeInvalidRightOperandOfNumericOp #29034

Merged
merged 119 commits into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
b8c16af
Qual: Enable PhanTypeInvalidLeftOperandOfAdd
mdeweerd Mar 21, 2024
b267d7f
Fix PhanTypeInvalidLeftOperandOfAdd with casts
mdeweerd Mar 21, 2024
5d6ae6e
Fix PhanTypeInvalidLeftOperandOfAdd with casts
mdeweerd Mar 21, 2024
a6f69d3
Fix PhanTypeInvalidLeftOperandOfAdd with casts
mdeweerd Mar 21, 2024
b1675d5
Type return value for getLocalTaxesFromRate
mdeweerd Mar 21, 2024
8137af9
Fix typing with casts and a few ignores
mdeweerd Mar 21, 2024
b2a3985
Fix typing with casts, idate and fix month/year formatting
mdeweerd Mar 21, 2024
6eeab82
Fix typing with casts
mdeweerd Mar 21, 2024
629e445
Fix typing with casts
mdeweerd Mar 21, 2024
c7c0d77
Fix typing with casts
mdeweerd Mar 21, 2024
83ca2f8
Fix PHPdoc for typing
mdeweerd Mar 21, 2024
91a7f3b
Fix typing with casting and idate
mdeweerd Mar 21, 2024
4b438b4
Fix typing with idate
mdeweerd Mar 21, 2024
4d56da4
Fix typing with casts
mdeweerd Mar 21, 2024
4168ddb
Fix typing with idate and casts
mdeweerd Mar 21, 2024
58a6ef8
Fix typing with phpdoc
mdeweerd Mar 21, 2024
b84c9a1
Fix typing with phpdoc
mdeweerd Mar 21, 2024
378c98c
Fix typing with phpdoc
mdeweerd Mar 21, 2024
81c0026
Fix typing with phpdoc
mdeweerd Mar 21, 2024
6944e71
Fix typing with phpdoc
mdeweerd Mar 21, 2024
56b6ab3
Fix typing with phpdoc
mdeweerd Mar 21, 2024
2fc604b
Fix typing with phpdoc
mdeweerd Mar 21, 2024
78c1bb4
Fix typing with phpdoc
mdeweerd Mar 21, 2024
90f36e4
Fix typing with phpdoc
mdeweerd Mar 21, 2024
a7b00ef
Fix typing with phpdoc
mdeweerd Mar 21, 2024
8bf8972
Fix typing with phpdoc
mdeweerd Mar 21, 2024
d148c3f
Fix typing with phpdoc
mdeweerd Mar 21, 2024
4500b30
Fix typing with phpdoc
mdeweerd Mar 21, 2024
ec855a2
Fix typing with phpdoc
mdeweerd Mar 21, 2024
4d5e2d2
Fix typing with phpdoc
mdeweerd Mar 21, 2024
aff1035
Fix typing with phpdoc
mdeweerd Mar 21, 2024
d540096
Fix typing with phpdoc
mdeweerd Mar 21, 2024
f75e5cd
Fix typing with phpdoc
mdeweerd Mar 21, 2024
afda210
Fix typing with phpdoc
mdeweerd Mar 21, 2024
280dadb
Fix typing with phpdoc
mdeweerd Mar 21, 2024
2db76fb
Fix typing with phpdoc
mdeweerd Mar 21, 2024
396bf90
Fix typing with phpdoc
mdeweerd Mar 21, 2024
e31fa59
Fix typing with phpdoc
mdeweerd Mar 21, 2024
fbb3cb3
Fix typing with phpdoc
mdeweerd Mar 21, 2024
e7e2ff9
Fix typing with phpdoc
mdeweerd Mar 21, 2024
37ceda7
Fix typing with phpdoc
mdeweerd Mar 21, 2024
ba7a452
Fix typing with phpdoc
mdeweerd Mar 21, 2024
69081c7
Add typing to fetchAll
mdeweerd Mar 21, 2024
a853f8e
Fix type with cast/idate/phpdoc
mdeweerd Mar 21, 2024
09b7308
Fix type with cast/idate/phpdoc
mdeweerd Mar 21, 2024
6a81335
Fix type with cast/idate/phpdoc
mdeweerd Mar 21, 2024
549d729
Fix type with cast/idate/phpdoc
mdeweerd Mar 21, 2024
d542a11
Fix type with cast/idate/phpdoc
mdeweerd Mar 21, 2024
d23a296
Fix type with cast/idate/phpdoc
mdeweerd Mar 21, 2024
6539a12
Fix type with cast/idate/phpdoc
mdeweerd Mar 21, 2024
8602c4b
Fix type with cast/idate/phpdoc
mdeweerd Mar 21, 2024
a1ba13e
Fix type with cast/idate/phpdoc
mdeweerd Mar 21, 2024
47a4c65
Fix type with cast/idate/phpdoc
mdeweerd Mar 21, 2024
8e577b6
Fix typing with phpdoc
mdeweerd Mar 21, 2024
b53d322
Add exception for PhanTypeInvalidRightOperandOfAdd to baseline becaus…
mdeweerd Mar 21, 2024
ea9e34e
Fix typing issue with cast
mdeweerd Mar 21, 2024
e01f467
Fix several typing issues with casts, deprecation, css class
mdeweerd Mar 21, 2024
7a42dab
Fix PHPdoc typing
mdeweerd Mar 21, 2024
fab3a7a
Fix typing with casts
mdeweerd Mar 21, 2024
1af200b
Fix AutoFillAmout typo
mdeweerd Mar 21, 2024
1164ba6
Fix labelStatus typing, casts for typing, PHPdoc
mdeweerd Mar 21, 2024
668207b
Fix typing with casts, fix AutoFillAmout typo
mdeweerd Mar 21, 2024
5c073df
Qual: Enable PhanTypeInvalidRightOperandOfAdd
mdeweerd Mar 21, 2024
08733e8
Fix a final left add operand typing issue + some typos
mdeweerd Mar 22, 2024
f5e2444
Add typing for cols, phpmin
mdeweerd Mar 22, 2024
360753e
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
1c429c2
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
5164b5a
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
34a541d
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
139451f
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
0732c43
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
1fee38e
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
6b0e99b
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
c4fe777
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
eb3ee3d
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
7762e3e
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
c822795
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
76cf8eb
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
94808e7
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
c6bc7ea
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
0c8eae7
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
359a268
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
03f32e5
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
e01d205
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
5c2ff03
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
f09430a
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
2ea00c1
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
58ca5d1
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
cb68c95
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
9607d8e
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
0f186a5
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
d9d09ce
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
886b4c8
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
000af5d
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
3a45f5f
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
b7112d8
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
6502101
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
a5ed552
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
7fe931c
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
c97e400
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
35d2dd5
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
c517a80
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
eb01d15
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
ef894b0
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
d68dc69
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
4c94672
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
8c240a3
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
df97943
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
46ee988
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
911a2c0
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, c…
mdeweerd Mar 23, 2024
27091da
Qual: Enable lidLeftOperandOfNumericOp
mdeweerd Mar 23, 2024
f968193
Add stub for multicompany
mdeweerd Mar 23, 2024
09b931e
Qual: Enable PhanUndeclaredClassProperty
mdeweerd Mar 23, 2024
30b7ae3
Qual: Enable dev/tools/phan/config.php
mdeweerd Mar 23, 2024
2a13f71
Qual: Add extra phan stubs fixing PhanUndeclaredClassMethod
mdeweerd Mar 23, 2024
6a0678e
Merge branch 'develop' into PhanTypeInvalidRightOperandOfNumericOp
eldy Mar 23, 2024
a5fec9f
Merge branch 'develop' into PhanTypeInvalidRightOperandOfNumericOp
eldy Mar 23, 2024
8a471b0
Merge branch 'develop' into PhanTypeInvalidRightOperandOfNumericOp
eldy Mar 23, 2024
44d2c0f
Merge branch 'develop' into PhanTypeInvalidRightOperandOfNumericOp
eldy Mar 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev/tools/phan/baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ return [
'htdocs/core/lib/functions.lib.php' => ['PhanParamTooMany', 'PhanRedefineFunctionInternal'],
'htdocs/core/lib/price.lib.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/core/modules/movement/doc/pdf_standard.modules.php' => ['PhanPluginDuplicateExpressionBinaryOp'],
'htdocs/core/modules/mrp/doc/pdf_vinci.modules.php' => ['PhanTypeArraySuspiciousNull'],
'htdocs/core/modules/mrp/doc/pdf_vinci.modules.php' => ['PhanTypeArraySuspiciousNull', 'PhanTypeInvalidRightOperandOfAdd'],
'htdocs/core/modules/syslog/mod_syslog_file.php' => ['PhanParamSignatureMismatch'],
'htdocs/core/modules/syslog/mod_syslog_syslog.php' => ['PhanParamSignatureMismatch'],
'htdocs/don/class/don.class.php' => ['PhanParamTooMany'],
Expand Down
13 changes: 8 additions & 5 deletions dev/tools/phan/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@
// 'PhanTypeMismatchPropertyProbablyReal',
// 'PhanPluginNoCommentOnPrivateMethod',
'PhanPluginUnknownArrayFunctionReturnType',
'PhanTypeInvalidLeftOperandOfAdd',
// 'PhanTypeInvalidLeftOperandOfAdd',
// 'PhanPluginNoCommentOnPrivateProperty',
// 'PhanPluginNoCommentOnFunction',
'PhanPluginUnknownArrayFunctionParamType',
Expand All @@ -473,14 +473,14 @@
// 'PhanPluginRedundantAssignment',

'PhanTypeExpectedObjectPropAccess',
'PhanTypeInvalidRightOperandOfNumericOp',
// 'PhanTypeInvalidRightOperandOfNumericOp',
// 'PhanPluginInlineHTML',
// 'PhanPluginInlineHTMLTrailing',
// 'PhanPluginUnknownFunctionReturnType',
// 'PhanPluginDescriptionlessCommentOnProtectedProperty',
'PhanPluginRedundantAssignmentInGlobalScope',
// 'PhanTypeMismatchDeclaredParamNullable',
'PhanTypeInvalidRightOperandOfAdd',
// 'PhanTypeInvalidRightOperandOfAdd',
// 'PhanPluginDescriptionlessCommentOnPrivateProperty',
// 'PhanUndeclaredVariableDim', // Array initialisation on undeclared var: $abc['x']='ab'
'PhanTypeInvalidPropertyName',
Expand Down Expand Up @@ -600,15 +600,15 @@
// 'PhanPluginUnreachableCode',
// 'PhanTypeMismatchArgumentInternal',
// 'PhanPluginAlwaysReturnMethod',
'PhanUndeclaredClassMethod',
// 'PhanUndeclaredClassMethod',
'PhanUndeclaredMethod',
'PhanTypeMismatchArgumentProbablyReal',
'PhanPluginDuplicateExpressionAssignmentOperation', // Suggestions for optimisation
// 'PhanTypeMismatchPropertyDefault',
// 'PhanPluginAlwaysReturnMethod',
// 'PhanPluginMissingReturnMethod',
// 'PhanUndeclaredTypeReturnType',
'PhanUndeclaredClassProperty',
// 'PhanUndeclaredClassProperty',
'PhanTypeArraySuspiciousNullable',
// 'PhanPluginInconsistentReturnMethod',
'PhanTypeExpectedObjectPropAccessButGotNull',
Expand Down Expand Up @@ -643,11 +643,13 @@
'ftp' => PHAN_DIR . '/stubs/ftp.phan_php',
'gd' => PHAN_DIR . '/stubs/gd.phan_php',
'geoip' => PHAN_DIR . '/stubs/geoip.phan_php',
'imagick' => PHAN_DIR . '/stubs/imagick.phan_php',
'imap' => PHAN_DIR . '/stubs/imap.phan_php',
'intl' => PHAN_DIR . '/stubs/intl.phan_php',
'ldap' => PHAN_DIR . '/stubs/ldap.phan_php',
'mcrypt' => PHAN_DIR . '/stubs/mcrypt.phan_php',
'memcache' => PHAN_DIR . '/stubs/memcache.phan_php',
'memcached' => PHAN_DIR . '/stubs/memcached.phan_php',
'mysqli' => PHAN_DIR . '/stubs/mysqli.phan_php',
'pdo_cubrid' => PHAN_DIR . '/stubs/pdo_cubrid.phan_php',
'pdo_mysql' => PHAN_DIR . '/stubs/pdo_mysql.phan_php',
Expand All @@ -658,6 +660,7 @@
'simplexml' => PHAN_DIR . '/stubs/SimpleXML.phan_php',
'soap' => PHAN_DIR . '/stubs/soap.phan_php',
'sockets' => PHAN_DIR . '/stubs/sockets.phan_php',
'tidy' => PHAN_DIR . '/stubs/tidy.phan_php',
'zip' => PHAN_DIR . '/stubs/zip.phan_php',
],
];
3 changes: 3 additions & 0 deletions dev/tools/phan/config_extended.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,12 @@
'gd' => PHAN_DIR . '/stubs/gd.phan_php',
'geoip' => PHAN_DIR . '/stubs/geoip.phan_php',
'imap' => PHAN_DIR . '/stubs/imap.phan_php',
'imagick' => PHAN_DIR . '/stubs/imagick.phan_php',
'intl' => PHAN_DIR . '/stubs/intl.phan_php',
'ldap' => PHAN_DIR . '/stubs/ldap.phan_php',
'mcrypt' => PHAN_DIR . '/stubs/mcrypt.phan_php',
'memcache' => PHAN_DIR . '/stubs/memcache.phan_php',
'memcached' => PHAN_DIR . '/stubs/memcached.phan_php',
'mysqli' => PHAN_DIR . '/stubs/mysqli.phan_php',
'pdo_cubrid' => PHAN_DIR . '/stubs/pdo_cubrid.phan_php',
'pdo_mysql' => PHAN_DIR . '/stubs/pdo_mysql.phan_php',
Expand All @@ -411,6 +413,7 @@
'simplexml' => PHAN_DIR . '/stubs/SimpleXML.phan_php',
'soap' => PHAN_DIR . '/stubs/soap.phan_php',
'sockets' => PHAN_DIR . '/stubs/sockets.phan_php',
'tidy' => PHAN_DIR . '/stubs/tidy.phan_php',
'zip' => PHAN_DIR . '/stubs/zip.phan_php',
],

Expand Down
3 changes: 3 additions & 0 deletions dev/tools/phan/config_fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,12 @@
'gd' => PHAN_DIR . '/stubs/gd.phan_php',
'geoip' => PHAN_DIR . '/stubs/geoip.phan_php',
'imap' => PHAN_DIR . '/stubs/imap.phan_php',
'imagick' => PHAN_DIR . '/stubs/imagick.phan_php',
'intl' => PHAN_DIR . '/stubs/intl.phan_php',
'ldap' => PHAN_DIR . '/stubs/ldap.phan_php',
'mcrypt' => PHAN_DIR . '/stubs/mcrypt.phan_php',
'memcache' => PHAN_DIR . '/stubs/memcache.phan_php',
'memcached' => PHAN_DIR . '/stubs/memcached.phan_php',
'mysqli' => PHAN_DIR . '/stubs/mysqli.phan_php',
'pdo_cubrid' => PHAN_DIR . '/stubs/pdo_cubrid.phan_php',
'pdo_mysql' => PHAN_DIR . '/stubs/pdo_mysql.phan_php',
Expand All @@ -241,6 +243,7 @@
'session' => PHAN_DIR . '/stubs/session.phan_php',
'simplexml' => PHAN_DIR . '/stubs/SimpleXML.phan_php',
'soap' => PHAN_DIR . '/stubs/soap.phan_php',
'tidy' => PHAN_DIR . '/stubs/tidy.phan_php',
'sockets' => PHAN_DIR . '/stubs/sockets.phan_php',
'zip' => PHAN_DIR . '/stubs/zip.phan_php',
],
Expand Down
Loading
Loading