add cs fixer and PHPStan and activate it (build 436)

This commit is contained in:
crazywhalecc
2022-03-15 18:05:33 +08:00
parent d01bd69aa5
commit 1706afbcd0
163 changed files with 4572 additions and 3588 deletions

View File

@@ -1,9 +1,9 @@
<?php
declare(strict_types=1);
namespace ZM\Event\SwooleEvent;
use Swoole\Process;
use ZM\Annotation\Swoole\SwooleHandler;
use ZM\Console\Console;
@@ -13,7 +13,6 @@ use ZM\Utils\Manager\ProcessManager;
/**
* Class OnManagerStop
* @package ZM\Event\SwooleEvent
* @SwooleHandler("ManagerStop")
*/
class OnManagerStop implements SwooleEvent
@@ -21,9 +20,11 @@ class OnManagerStop implements SwooleEvent
public function onCall()
{
foreach (ProcessManager::$user_process as $v) {
if (posix_getsid($v->pid) !== false) Process::kill($v->pid, SIGTERM);
if (posix_getsid($v->pid) !== false) {
Process::kill($v->pid, SIGTERM);
}
}
Console::verbose("进程 Manager 已停止!");
Console::verbose('进程 Manager 已停止!');
Framework::removeProcessState(ZM_PROCESS_MANAGER);
}
}
}