Skip to content

Commit b292c15

Browse files
authored
Fix phpstan!
1 parent 1efc12c commit b292c15

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/vennv/vapm/Thread.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -453,10 +453,7 @@ public function start(array $mode = DescriptorSpec::BASIC): Promise
453453
foreach ($read as $stream) {
454454
if (!feof($stream)) {
455455
$data = stream_get_contents($stream, 1024);
456-
if ($data === false || $data === '') {
457-
if (feof($stream)) continue 2;
458-
break;
459-
}
456+
if ($data === false || $data === '') continue;
460457
$stream === $pipes[1] ? $output .= $data : $error .= $data;
461458
}
462459
FiberManager::wait();
@@ -474,8 +471,8 @@ public function start(array $mode = DescriptorSpec::BASIC): Promise
474471

475472
$outputStream = stream_get_contents($pipes[1]);
476473
$errorStream = stream_get_contents($pipes[2]);
477-
$output .= str_contains($output, $outputStream) ? '' : $outputStream;
478-
$error .= str_contains($error, $errorStream) ? '' : $errorStream;
474+
if (!is_bool($outputStream)) $output .= str_contains($output, $outputStream) ? '' : $outputStream;
475+
if (!is_bool($errorStream)) $error .= str_contains($error, $errorStream) ? '' : $errorStream;
479476

480477
fclose($pipes[1]);
481478
fclose($pipes[2]);

0 commit comments

Comments
 (0)