This commit is contained in:
2020-12-16 16:32:05 +08:00
parent a272edcca5
commit d75860d2ec
3 changed files with 9 additions and 5 deletions
+3 -3
View File
@@ -47,10 +47,10 @@ class OnRequest extends Callback
/**
* @param Request $request
* @param Response $response
* @return false|int|mixed|string|void
* @throws Exception
* @return mixed
* @throws ComponentException
*/
public function onRequest(Request $request, Response $response)
public function onRequest(Request $request, Response $response): mixed
{
try {
/** @var HRequest $sRequest */
+4
View File
@@ -228,6 +228,7 @@ class Node extends Application
$handler = [$handler];
}
foreach ($handler as $closure) {
var_dump($closure);
$this->_interceptors[] = $closure;
}
$this->restructure();
@@ -244,6 +245,7 @@ class Node extends Application
$handler = [$handler];
}
foreach ($handler as $closure) {
var_dump($closure);
$this->_after[] = $closure;
}
$this->restructure();
@@ -260,6 +262,7 @@ class Node extends Application
$handler = [$handler];
}
foreach ($handler as $closure) {
var_dump($closure);
$this->_limits[] = $closure;
}
$this->restructure();
@@ -407,6 +410,7 @@ class Node extends Application
$class = [$class];
}
foreach ($class as $closure) {
var_dump($closure);
$this->middleware[] = $closure;
}
$this->restructure();
+2 -2
View File
@@ -234,10 +234,10 @@ class Logger extends Component
/**
* @param Throwable $exception
* @return false|int|mixed|string
* @return mixed
* @throws Exception
*/
public function exception(Throwable $exception)
public function exception(Throwable $exception): mixed
{
$errorInfo = [
'message' => $exception->getMessage(),