From e994e001e86b1629df46499674328ab870d98476 Mon Sep 17 00:00:00 2001 From: VennV <111500380+VennDev@users.noreply.github.com> Date: Wed, 21 Aug 2024 10:58:27 +0700 Subject: [PATCH] Fix phpstan! --- src/vennv/vapm/Thread.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/vennv/vapm/Thread.php b/src/vennv/vapm/Thread.php index 7e5ecb31..ed764d0c 100644 --- a/src/vennv/vapm/Thread.php +++ b/src/vennv/vapm/Thread.php @@ -477,14 +477,12 @@ public function start(array $mode = DescriptorSpec::BASIC): Promise fclose($pipes[1]); fclose($pipes[2]); - if ($error !== '' && is_string($error)) { + if ($error !== '') { return $reject(new ThreadException($error)); } else { - if (!is_bool($output)) { - if ($output !== '' && self::isPostMainThread($output)) self::loadSharedData($output); - elseif ($output !== '' && self::isPostThread($output)) { - $output = Utils::getStringAfterSign($output, self::POST_THREAD . '=>'); - } + if ($output !== '' && self::isPostMainThread($output)) self::loadSharedData($output); + elseif ($output !== '' && self::isPostThread($output)) { + $output = Utils::getStringAfterSign($output, self::POST_THREAD . '=>'); } } } else {