dolibarr/dev/tools/phan
MDW 63833674bb
Qual: Fix PHPStan notices (#38039)
* Qual: Fix PHPStan notices

# Qual: Fix PHPStan notices

Fix multiple PHPStan notices, mostly possibly undefined variable

* Qual: Fix Phan notices

* Qual: Fix Phan notice, $id declared before include

* Fix array initialisations

* Qual: Update phpstan baseline

* Qual: Fix Phan notices

* Qual: Update phan baseline
2026-05-11 20:39:31 +02:00
..
plugins Qual: Fix ifsql argument type 2025-02-09 20:14:22 +01:00
stubs Doc 2026-04-15 17:37:25 +02:00
.gitignore
allow_phan_in_precommit.sh Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into 2026-04-27 14:43:34 +02:00
baseline.txt Qual: Fix PHPStan notices (#38039) 2026-05-11 20:39:31 +02:00
baseline_extended.txt Qual: Fix phan notices (reception) 2025-02-13 15:39:39 +01:00
config.php Qual: Fix PHPStan notices (#37933) 2026-04-20 12:36:21 +02:00
config_extended.php Removed non relevant test 2026-03-16 10:14:43 +01:00
config_fixer.php Qual: Fix phan notices (facture/2) 2025-03-05 21:17:58 +01:00
PHAN.BAT Qual: Enable detection of deprecated modulename & GETPOST(...,'int') (#28457) 2024-02-28 23:25:16 +01:00
README.md
run-phan.sh
runPhanDocker.sh

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.sh runs the default checks
  • run-phan.sh 1 updates the baseline for the default checks
  • run-phan.sh full runs the extended checks
  • run-phan.sh full 1 updates 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