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,11 @@
<?php /** @noinspection PhpUnusedParameterInspection */
<?php
/** @noinspection PhpUnusedParameterInspection */
declare(strict_types=1);
namespace ZM\Event\SwooleEvent;
use Swoole\Server;
use ZM\Annotation\Swoole\SwooleHandler;
use ZM\Console\Console;
@@ -13,16 +15,16 @@ use ZM\Utils\DataProvider;
/**
* Class OnShutdown
* @package ZM\Event\SwooleEvent
* @SwooleHandler("shutdown")
*/
class OnShutdown implements SwooleEvent
{
public function onCall(Server $server) {
Console::verbose("正在关闭 Master 进程pid=" . posix_getpid());
public function onCall(Server $server)
{
Console::verbose('正在关闭 Master 进程pid=' . posix_getpid());
Framework::removeProcessState(ZM_PROCESS_MASTER);
if (DataProvider::scanDirFiles(_zm_pid_dir()) == []) {
rmdir(_zm_pid_dir());
}
}
}
}