This commit is contained in:
2021-03-24 11:01:16 +08:00
parent 7f6117387a
commit 3279029cc3
+3 -4
View File
@@ -44,9 +44,8 @@ class Producer extends Component
/**
* @param string $name
* @param string $cmd
* @param array $handler
* @param array $node
*/
public function addConsumer(string $cmd, array $handler)
{
@@ -65,9 +64,9 @@ class Producer extends Component
/**
* @param $cmd
* @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;
if (empty($handler)) {