mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-20 23:25:35 +08:00
add cs fixer and PHPStan and activate it (build 436)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Command\Daemon;
|
||||
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
@@ -11,16 +11,17 @@ use ZM\Framework;
|
||||
|
||||
abstract class DaemonCommand extends Command
|
||||
{
|
||||
protected $daemon_file = null;
|
||||
protected $daemon_file;
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int {
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
$file = Framework::getProcessState(ZM_PROCESS_MASTER);
|
||||
if ($file === false || posix_getsid(intval($file["pid"])) === false) {
|
||||
$output->writeln("<comment>未检测到正在运行的守护进程或框架进程!</comment>");
|
||||
if ($file === false || posix_getsid(intval($file['pid'])) === false) {
|
||||
$output->writeln('<comment>未检测到正在运行的守护进程或框架进程!</comment>');
|
||||
Framework::removeProcessState(ZM_PROCESS_MASTER);
|
||||
die();
|
||||
exit(1);
|
||||
}
|
||||
$this->daemon_file = $file;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user