dolibarr/dev/tools/phan
MDW 1d295abbef
Qual: Fix Phan notices (#39281)
# Qual: Fix Phan notices

Some phan notices are not reported in ci.

This fixes new ones that appeared:
- Update imap.phan_php to provide IMAP related typing info;
- Add typing info to variables;
- Decleare some variables global (htdocs/admin/dict.php) as reused in function;
- Cast potential null to string;
- Adjust param typing to correspond to default null value (getOnlineSignatureUrl);
- Check that parameter is object as expected by function all (dol_format_address);
2026-07-27 13:03:04 +02:00
..
plugins Qual: Fix ifsql argument type 2025-02-09 20:14:22 +01:00
stubs Qual: Fix Phan notices (#39281) 2026-07-27 13:03:04 +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: Update Phan baseline.txt (#39170) 2026-07-14 13:49:56 +02:00
baseline_extended.txt Qual: Fix phan notices (reception) 2025-02-13 15:39:39 +01:00
config.php Fix phan 2026-06-01 23:47:52 +02:00
config_extended.php Fix phan 2026-06-01 23:47:52 +02:00
config_fixer.php Qual: Fix phan notices (facture/2) 2025-03-05 21:17:58 +01:00
PHAN.BAT
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