改名
This commit is contained in:
+3
-4
@@ -44,9 +44,8 @@ class Producer extends Component
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $cmd
|
||||||
* @param array $handler
|
* @param array $handler
|
||||||
* @param array $node
|
|
||||||
*/
|
*/
|
||||||
public function addConsumer(string $cmd, array $handler)
|
public function addConsumer(string $cmd, array $handler)
|
||||||
{
|
{
|
||||||
@@ -65,9 +64,9 @@ class Producer extends Component
|
|||||||
/**
|
/**
|
||||||
* @param $cmd
|
* @param $cmd
|
||||||
* @param mixed ...$params
|
* @param mixed ...$params
|
||||||
* @return false|mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function dispatch($cmd, mixed ...$params)
|
public function dispatch($cmd, mixed ...$params): mixed
|
||||||
{
|
{
|
||||||
$handler = $this->cmds[$cmd] ?? null;
|
$handler = $this->cmds[$cmd] ?? null;
|
||||||
if (empty($handler)) {
|
if (empty($handler)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user