Fix phpstan

This commit is contained in:
Laurent Destailleur 2023-08-04 03:42:46 +02:00
parent 2777857f5b
commit 00731380bc
2 changed files with 15 additions and 10 deletions

View file

@ -14,4 +14,6 @@ composer require --dev phpstan/phpstan
Execute: Execute:
cd git/dolibarr cd git/dolibarr
mv htdocs/custom /tmp/
php8.2 ../phpstan/htdocs/includes/bin/phpstan -v analyze -a build/phpstan/bootstrap.php htdocs/commande/class -l0 --memory-limit 12G php8.2 ../phpstan/htdocs/includes/bin/phpstan -v analyze -a build/phpstan/bootstrap.php htdocs/commande/class -l0 --memory-limit 12G
mv /tmp/custom htdocs

View file

@ -2,17 +2,20 @@ parameters:
customRulesetUsed: true customRulesetUsed: true
fileExtensions: fileExtensions:
- php - php
paths:
- htdocs
excludePaths: excludePaths:
- 'htdocs/build/*' analyseAndScan:
- 'htdocs/custom/*' - htdocs/custom
- 'htdocs/dev/*' - htdocs/dev/*
- 'htdocs/doc/*' - htdocs/doc/*
- 'htdocs/documents/*' - htdocs/documents/*
- 'htdocs/includes/*' - htdocs/install/doctemplates/*
- 'htdocs/install/doctemplates/*' - htdocs/langs/*
- 'htdocs/langs/*' - htdocs/support/*
- 'htdocs/support/*' - htdocs/test/*
- 'htdocs/test/*' analyse:
- htdocs/includes/*
checkAlwaysTrueCheckTypeFunctionCall: false checkAlwaysTrueCheckTypeFunctionCall: false
checkAlwaysTrueInstanceof: false checkAlwaysTrueInstanceof: false
checkAlwaysTrueStrictComparison: false checkAlwaysTrueStrictComparison: false