This commit is contained in:
2020-12-14 17:42:48 +08:00
parent 27f94b97a9
commit 1cb3def5b0
2 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -394,7 +394,7 @@ class Node extends Application
if (!($class instanceof \HttpServer\IInterface\Middleware)) {
return;
}
$class = [$class, 'handler'];
$class = [$class, 'onHandler'];
}
$this->middleware[] = $class;
$this->restructure();
@@ -420,7 +420,7 @@ class Node extends Application
* @return mixed
* @throws Exception
*/
public function dispatch()
public function dispatch(): mixed
{
if (empty($this->callback)) {
return JSON::to(404, $node->_error ?? 'Page not found.');
@@ -435,7 +435,7 @@ class Node extends Application
* @return array
* @throws Exception
*/
private function each($array, $_temp)
private function each($array, $_temp): array
{
if (!is_array($array)) {
return $_temp;