* Qual: Fix phan notice with copy of attribute * Qual: Fix phan notices with cast and updated param definition * Qual: Fix phan notice with cast * Qual: Update parameter type hint in utf8_check function The parameter type hint for the $str parameter in the utf8_check function has been updated to include nullable types (string or int). * Qual: Update User parameter type to nullable in call_trigger methods The User parameter in call_trigger methods has been updated to be nullable to accommodate cases where the user object might not be available. This change ensures better flexibility and robustness in the codebase. * Qual: Update phan baseline * Qual: phpstan compatible type * Qual: Add missing type hints for phan - Add missing type hints for phan - Fix indentation issues - Improved consistency in code structure * Qual: Update field configuration for backward compatibility Enhanced the field configuration for backward compatibility by adding expected properties to the 'ref' field array. --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
Static Code Checks using phan
Installation, running
run-phan.sh can install and run phan.
See instructions in run-phan.sh for installing (or just run it).
The configuration file in PROJECT_DIR/.phan/config.php also allows you to run
phan independently from the script.
Run options:
No option : Runs the minimum checks
Option 'full' : Runs all an extensive set of checks
Option '1' : Writes the baseline
Examples:
run-phan.shruns the default checksrun-phan.sh 1updates the baseline for the default checksrun-phan.sh fullruns the extended checksrun-phan.sh full 1updates the baseline for the extended checks
Baseline
The baseline.txt file in this directory defines the issues that are currently
excluded from the final report. In principle you should not add any more
exceptions to that file, but rather fix the issues or add phan annotations
that provide more information or to exclude specific cases.
Configuration
config.php : Default configuration file
config_extended.php : Configuration that enables more checks.
baseline.txt : Ignored issues (with config.php)
baseline_extended.txt : Ignored issues (with config_extended.php), not
currently in git