mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-21 15:45:36 +08:00
PHP80 小修 (#187)
* migrate-php80 fix styles fix static analyse * fix some bugs
This commit is contained in:
@@ -21,9 +21,7 @@ class ServerStartCommand extends ServerCommand
|
||||
{
|
||||
$cmd = new self();
|
||||
$cmd->configure();
|
||||
return array_map(function ($x) {
|
||||
return $x->getDefault();
|
||||
}, $cmd->getDefinition()->getOptions());
|
||||
return array_map(fn ($x) => $x->getDefault(), $cmd->getDefinition()->getOptions());
|
||||
}
|
||||
|
||||
protected function configure()
|
||||
|
||||
@@ -33,7 +33,7 @@ class ServerStopCommand extends ServerCommand
|
||||
$pid = file_get_contents($file_path . '/' . $file);
|
||||
Process::kill((int) $pid, SIGKILL);
|
||||
} elseif ($file === 'master.json') {
|
||||
$json = json_decode(file_get_contents($file_path . '/' . $file), true);
|
||||
$json = json_decode(file_get_contents($file_path . '/' . $file), true, 512, JSON_THROW_ON_ERROR);
|
||||
Process::kill($json['pid'], SIGKILL);
|
||||
}
|
||||
unlink($file_path . '/' . $file);
|
||||
|
||||
Reference in New Issue
Block a user