diff --git a/Terminal.php b/Terminal.php index b91e8afc5..948ced4ad 100644 --- a/Terminal.php +++ b/Terminal.php @@ -158,8 +158,7 @@ private static function readFromProcess(string $command): ?string $cp = \function_exists('sapi_windows_cp_set') ? sapi_windows_cp_get() : 0; - $process = proc_open($command, $descriptorspec, $pipes, null, null, ['suppress_errors' => true]); - if (!\is_resource($process)) { + if (!$process = proc_open($command, $descriptorspec, $pipes, null, null, ['suppress_errors' => true])) { return null; } diff --git a/Tests/Formatter/OutputFormatterTest.php b/Tests/Formatter/OutputFormatterTest.php index 21905f475..f65e0a15d 100644 --- a/Tests/Formatter/OutputFormatterTest.php +++ b/Tests/Formatter/OutputFormatterTest.php @@ -200,7 +200,7 @@ public static function provideInlineStyleOptionsCases() ]; } - public function provideInlineStyleTagsWithUnknownOptions() + public static function provideInlineStyleTagsWithUnknownOptions() { return [ ['', 'abc'],