mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-21 15:45:36 +08:00
add cs fixer and PHPStan and activate it (build 436)
This commit is contained in:
@@ -1,33 +1,32 @@
|
||||
<?php /** @noinspection PhpComposerExtensionStubsInspection */
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Event\SwooleEvent;
|
||||
|
||||
|
||||
use Swoole\Server;
|
||||
use ZM\Annotation\Swoole\SwooleHandler;
|
||||
use ZM\Config\ZMConfig;
|
||||
use ZM\Console\Console;
|
||||
use ZM\Event\SwooleEvent;
|
||||
use ZM\Framework;
|
||||
use ZM\Utils\DataProvider;
|
||||
use ZM\Utils\SignalListener;
|
||||
|
||||
/**
|
||||
* Class OnStart
|
||||
* @package ZM\Event\SwooleEvent
|
||||
* @SwooleHandler("start")
|
||||
*/
|
||||
class OnStart implements SwooleEvent
|
||||
{
|
||||
public function onCall(Server $server) {
|
||||
Console::debug("Calling onStart event(1)");
|
||||
if (!Framework::$argv["disable-safe-exit"]) {
|
||||
public function onCall(Server $server)
|
||||
{
|
||||
Console::debug('Calling onStart event(1)');
|
||||
if (!Framework::$argv['disable-safe-exit']) {
|
||||
SignalListener::signalMaster($server);
|
||||
}
|
||||
Framework::saveProcessState(ZM_PROCESS_MASTER, $server->master_pid, [
|
||||
'stdout' => ZMConfig::get("global")["swoole"]["log_file"],
|
||||
'daemon' => (bool)Framework::$argv["daemon"]
|
||||
'stdout' => ZMConfig::get('global')['swoole']['log_file'],
|
||||
'daemon' => (bool) Framework::$argv['daemon'],
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user