fix the rest problem code to phpstan-level-1

This commit is contained in:
crazywhalecc
2022-04-02 19:20:47 +08:00
committed by Jerry Ma
parent d490892092
commit daa1822bc5
4 changed files with 8 additions and 10 deletions

View File

@@ -14,10 +14,9 @@ use ZM\Utils\Manager\WorkerManager;
class CoMessage
{
/**
* @param int $timeout
* @return mixed
*/
public static function yieldByWS(array $hang, array $compare, $timeout = 600)
public static function yieldByWS(array $hang, array $compare, int $timeout = 600)
{
$cid = Coroutine::getuid();
$api_id = ZMAtomic::get('wait_msg_id')->add(1);
@@ -43,9 +42,7 @@ class CoMessage
unset($sess[$api_id]);
LightCacheInside::set('wait_api', 'wait_api', $sess);
SpinLock::unlock('wait_api');
if (isset($id)) {
swoole_timer_clear($id);
}
swoole_timer_clear($id);
if ($result === null) {
return false;
}