改名
This commit is contained in:
@@ -45,9 +45,9 @@ class Dispatch
|
||||
* @return mixed
|
||||
* 执行函数
|
||||
*/
|
||||
public function dispatch()
|
||||
public function dispatch(): mixed
|
||||
{
|
||||
return call_user_func($this->handler, $this->request);
|
||||
return call_user_func($this->handler, ...$this->request);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -51,8 +51,8 @@ class Middleware
|
||||
*/
|
||||
public function getGenerate(Node $node): mixed
|
||||
{
|
||||
return $node->callback = Reduce::reduce(function ($passable) use ($node) {
|
||||
return Dispatch::create($node->handler, $passable)->dispatch();
|
||||
return $node->callback = Reduce::reduce(function () use ($node) {
|
||||
return Dispatch::create($node->handler, func_get_args())->dispatch();
|
||||
}, $this->annotation($node));
|
||||
}
|
||||
|
||||
|
||||
@@ -409,6 +409,7 @@ class Node extends Application
|
||||
if (empty($this->handler)) {
|
||||
return $this;
|
||||
}
|
||||
/** @var Middleware $made */
|
||||
$made = Snowflake::createObject(Middleware::class);
|
||||
$made->setMiddleWares($this->middleware);
|
||||
$made->getGenerate($this);
|
||||
|
||||
Reference in New Issue
Block a user