2
0
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:
MDW
2024-02-28 23:25:16 +01:00
committed by GitHub
parent e827f0a5ab
commit 7391ad42ed
21 changed files with 426 additions and 349 deletions

View File

@@ -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;
}