mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
Fix unreal error phpstan
This commit is contained in:
parent
91f6ab8e6d
commit
37b2a93323
3 changed files with 13 additions and 9 deletions
|
@ -84,7 +84,7 @@ class Console extends \descartes\InternalController
|
||||||
foreach ($numbers as $number)
|
foreach ($numbers as $number)
|
||||||
{
|
{
|
||||||
//Si les Sms STOP sont activés, on passe au numéro suivant si le numéro actuelle fait parti des Sms STOP
|
//Si les Sms STOP sont activés, on passe au numéro suivant si le numéro actuelle fait parti des Sms STOP
|
||||||
if (RASPISms_SETTINGS_SmsSTOPS)
|
if (RASPISMS_SETTINGS_SMSSTOPS)
|
||||||
{
|
{
|
||||||
foreach ($smsStops as $smsStop)
|
foreach ($smsStops as $smsStop)
|
||||||
{
|
{
|
||||||
|
@ -116,7 +116,7 @@ class Console extends \descartes\InternalController
|
||||||
//Commande qui envoie le Sms
|
//Commande qui envoie le Sms
|
||||||
$commande_send_sms = 'gammu-smsd-inject TEXT '.escapeshellarg($number).' -report -len '.mb_strlen($text_sms).' -text '.$text_sms;
|
$commande_send_sms = 'gammu-smsd-inject TEXT '.escapeshellarg($number).' -report -len '.mb_strlen($text_sms).' -text '.$text_sms;
|
||||||
|
|
||||||
if (RASPISms_SETTINGS_Sms_FLASH && $flash)
|
if (RASPISMS_SETTINGS_SMS_FLASH && $flash)
|
||||||
{
|
{
|
||||||
$commande_send_sms .= ' -flash';
|
$commande_send_sms .= ' -flash';
|
||||||
}
|
}
|
||||||
|
@ -327,7 +327,7 @@ class Console extends \descartes\InternalController
|
||||||
*/
|
*/
|
||||||
public function sendTransfers()
|
public function sendTransfers()
|
||||||
{
|
{
|
||||||
if (!RASPISms_SETTINGS_TRANSFER)
|
if (!RASPISMS_SETTINGS_TRANSFER)
|
||||||
{
|
{
|
||||||
echo "Le transfer de Sms est désactivé ! \n";
|
echo "Le transfer de Sms est désactivé ! \n";
|
||||||
|
|
||||||
|
|
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 = [
|
$analyse_commands = [
|
||||||
'php ' . __DIR__ . '/phpstan.phar analyse --autoload-file=' . __DIR__ . '/../../descartes/load.php ' . __DIR__ . '/../../controllers/',
|
'php ' . __DIR__ . '/phpstan.phar analyse --configuration="'. __DIR__ .'/config.neon" --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__ . '/../../models/',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@
|
||||||
help();
|
help();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$level = $argv[2] ?? 0;
|
||||||
|
|
||||||
if ($argv[1] === 'analyse')
|
if ($argv[1] === 'analyse')
|
||||||
{
|
{
|
||||||
echo "######################" . "\n";
|
echo "######################" . "\n";
|
||||||
|
@ -30,10 +32,7 @@
|
||||||
|
|
||||||
foreach ($analyse_commands as $analyse_command)
|
foreach ($analyse_commands as $analyse_command)
|
||||||
{
|
{
|
||||||
if (isset($argv[2]))
|
$analyse_command .= ' --level=' . $level;
|
||||||
{
|
|
||||||
$analyse_command .= ' --level=' . $argv[2];
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "Run : " . $analyse_command . " \n";
|
echo "Run : " . $analyse_command . " \n";
|
||||||
$return = shell_exec($analyse_command);
|
$return = shell_exec($analyse_command);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue