forked from Wavyzz/dolibarr
Qual: Enable detection of deprecated modulename & GETPOST(...,'int') (#28457)
* Qual: Enable detection of deprecated modulename & GETPOST(...,'int') # Qual: Enable detection of deprecated modulename & GETPOST(...,'int') Enable phan rules to verify deprecated modulename usage and GETPOST(...,'int') usage in the code. * Qual: Try type hint on to help avoid notification * Qual: Accept 3 parameters for GETPOST to GETPOSTINT conversion * Qual: Convert GETPOST(...,'int',VALUE) to GETPOSTINT(...,VALUE) # Qual: Convert GETPOST(...,'int',VALUE) to GETPOSTINT(...,VALUE) Following the update to the fixer to also convert GETPOST... with 3 parameters. The files are now converted.
This commit is contained in:
@@ -46,7 +46,7 @@ call_user_func(static function (): void {
|
||||
continue;
|
||||
}
|
||||
$arguments = $node->children;
|
||||
if (count($arguments) != 3) {
|
||||
if (!in_array(count($arguments), [3, 5])) { // ',' included !
|
||||
print "Arg Count is ".count($arguments)." - Skip $instance".PHP_EOL;
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user