Fix unreal error phpstan

This commit is contained in:
osaajani 2019-10-30 01:22:09 +01:00
parent 91f6ab8e6d
commit 37b2a93323
3 changed files with 13 additions and 9 deletions

View file

@ -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);