Browse Source

Fix psalm/phpstan errors

ADmad 6 years ago
parent
commit
04ed3469a8
2 changed files with 1 additions and 4 deletions
  1. 0 3
      phpstan.neon
  2. 1 1
      src/Console/ConsoleInput.php

+ 0 - 3
phpstan.neon

@@ -61,9 +61,6 @@ parameters:
             message: '#Parameter \#1 \$var_array of function extract is passed by reference, so it expects variables only#'
             path: 'src/Command/I18nExtractCommand.php'
         -
-            message: '#Strict comparison using !== between null and null will always evaluate to false#'
-            path: 'src/Command/I18nExtractCommand.php'
-        -
             message: '#Result of || is always true#'
             path: 'src/Command/I18nExtractCommand.php'
         -

+ 1 - 1
src/Console/ConsoleInput.php

@@ -83,13 +83,13 @@ class ConsoleInput
         $writeFds = null;
         $errorFds = null;
 
+        /** @var string|null $error */
         $error = null;
         set_error_handler(function (int $code, string $message) use (&$error) {
             $error = "stream_select failed with code={$code} message={$message}.";
         });
         $readyFds = stream_select($readFds, $writeFds, $errorFds, $timeout);
         restore_error_handler();
-        /** @psalm-suppress TypeDoesNotContainType */
         if ($error !== null) {
             throw new ConsoleException($error);
         }