mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-22 01:16:26 +02:00
Fix unreal error phpstan
This commit is contained in:
parent
91f6ab8e6d
commit
37b2a93323
3 changed files with 13 additions and 9 deletions
5
tests/phpstan/config.neon
Normal file
5
tests/phpstan/config.neon
Normal file
|
@ -0,0 +1,5 @@
|
|||
parameters:
|
||||
reportUnmatchedIgnoredErrors: false
|
||||
|
||||
ignoreErrors:
|
||||
- '#Constant RASPISMS_[a-zA-Z0-9\\_]+ not found.#'
|
|
@ -11,8 +11,8 @@
|
|||
}
|
||||
|
||||
$analyse_commands = [
|
||||
'php ' . __DIR__ . '/phpstan.phar analyse --autoload-file=' . __DIR__ . '/../../descartes/load.php ' . __DIR__ . '/../../controllers/',
|
||||
'php ' . __DIR__ . '/phpstan.phar analyse --autoload-file=' . __DIR__ . '/../../descartes/load.php ' . __DIR__ . '/../../models/',
|
||||
'php ' . __DIR__ . '/phpstan.phar analyse --configuration="'. __DIR__ .'/config.neon" --autoload-file=' . __DIR__ . '/../../descartes/load.php ' . __DIR__ . '/../../controllers/',
|
||||
'php ' . __DIR__ . '/phpstan.phar analyse --configuration="'. __DIR__ .'/config.neon" --autoload-file=' . __DIR__ . '/../../descartes/load.php ' . __DIR__ . '/../../models/',
|
||||
];
|
||||
|
||||
|
||||
|
@ -21,6 +21,8 @@
|
|||
help();
|
||||
}
|
||||
|
||||
$level = $argv[2] ?? 0;
|
||||
|
||||
if ($argv[1] === 'analyse')
|
||||
{
|
||||
echo "######################" . "\n";
|
||||
|
@ -30,10 +32,7 @@
|
|||
|
||||
foreach ($analyse_commands as $analyse_command)
|
||||
{
|
||||
if (isset($argv[2]))
|
||||
{
|
||||
$analyse_command .= ' --level=' . $argv[2];
|
||||
}
|
||||
$analyse_command .= ' --level=' . $level;
|
||||
|
||||
echo "Run : " . $analyse_command . " \n";
|
||||
$return = shell_exec($analyse_command);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue