mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix phpstan
This commit is contained in:
parent
23b35492fd
commit
2777857f5b
|
|
@ -14,4 +14,4 @@ composer require --dev phpstan/phpstan
|
|||
|
||||
Execute:
|
||||
cd git/dolibarr
|
||||
php8.2 ../phpstan/htdocs/includes/bin/phpstan -v analyze -a build/phpstan/bootstrap.php htdocs/commande/class -l0 --memory-limit 2G
|
||||
php8.2 ../phpstan/htdocs/includes/bin/phpstan -v analyze -a build/phpstan/bootstrap.php htdocs/commande/class -l0 --memory-limit 12G
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
// Defined some constants and load Dolibarr env to reduce PHPStan bootstrap that fails to load a lot of things.
|
||||
define('DOL_DOCUMENT_ROOT', __DIR__ . '/../../htdocs');
|
||||
define('DOL_DATA_ROOT', __DIR__ . '/../../documents');
|
||||
define('DOL_URL_ROOT', '/');
|
||||
//define('DOL_DOCUMENT_ROOT', __DIR__ . '/../../htdocs');
|
||||
//define('DOL_DATA_ROOT', __DIR__ . '/../../documents');
|
||||
//define('DOL_URL_ROOT', '/');
|
||||
|
||||
// Load the main.inc.php file to have functions llx_Header and llx_Footer defined
|
||||
// Load the main.inc.php file to have functions env defined
|
||||
if (! defined("NOLOGIN")) define("NOLOGIN", '1');
|
||||
global $conf, $langs, $user, $db;
|
||||
include_once __DIR__ . '/../../htdocs/main.inc.php';
|
||||
|
|
|
|||
|
|
@ -4,10 +4,14 @@ parameters:
|
|||
- php
|
||||
excludePaths:
|
||||
- 'htdocs/build/*'
|
||||
- 'htdocs/custom/*'
|
||||
- 'htdocs/dev/*'
|
||||
- 'htdocs/doc/*'
|
||||
- 'htdocs/documents/*'
|
||||
- 'htdocs/includes/*'
|
||||
- 'htdocs/install/doctemplates/*'
|
||||
- 'htdocs/langs/*'
|
||||
- 'htdocs/support/*'
|
||||
- 'htdocs/test/*'
|
||||
checkAlwaysTrueCheckTypeFunctionCall: false
|
||||
checkAlwaysTrueInstanceof: false
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user