mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-15 12:45:35 +08:00
add cs fixer and PHPStan and activate it (build 436)
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
<?php /** @noinspection PhpUnused */
|
||||
<?php
|
||||
|
||||
/** @noinspection PhpUnused */
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Utils\Manager;
|
||||
|
||||
|
||||
use Swoole\Process;
|
||||
|
||||
class ProcessManager
|
||||
@@ -11,22 +13,13 @@ class ProcessManager
|
||||
/** @var Process[] */
|
||||
public static $user_process = [];
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param callable $callable
|
||||
* @return Process
|
||||
*/
|
||||
public static function createUserProcess(string $name, callable $callable): Process
|
||||
{
|
||||
return self::$user_process[$name] = new Process($callable);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $string
|
||||
* @return Process|null
|
||||
*/
|
||||
public static function getUserProcess(string $string): ?Process
|
||||
{
|
||||
return self::$user_process[$string] ?? null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user