From 3279029cc319fcd906ada24070d4e77857727122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 24 Mar 2021 11:01:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rpc/Producer.php | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Rpc/Producer.php b/Rpc/Producer.php index 42f9b03b..a225e6f4 100644 --- a/Rpc/Producer.php +++ b/Rpc/Producer.php @@ -43,11 +43,10 @@ class Producer extends Component } - /** - * @param string $name - * @param array $handler - * @param array $node - */ + /** + * @param string $cmd + * @param array $handler + */ public function addConsumer(string $cmd, array $handler) { $class = get_class($handler[0]); @@ -62,12 +61,12 @@ class Producer extends Component } - /** - * @param $cmd - * @param mixed ...$params - * @return false|mixed - */ - public function dispatch($cmd, mixed ...$params) + /** + * @param $cmd + * @param mixed ...$params + * @return mixed + */ + public function dispatch($cmd, mixed ...$params): mixed { $handler = $this->cmds[$cmd] ?? null; if (empty($handler)) {