diff --git a/src/Base/NotFoundController.php b/src/Base/NotFoundController.php index e3c2a17..e493379 100644 --- a/src/Base/NotFoundController.php +++ b/src/Base/NotFoundController.php @@ -16,9 +16,9 @@ class NotFoundController extends Controller public function fail(): ResponseInterface { if ($this->request->getMethod() == 'OPTIONS') { - return $this->response->withStatus(200, ""); + return \response()->withStatus(200, ""); } - return $this->response->withStatus(404, "not found page."); + return \response()->withStatus(404, "not found page."); } } diff --git a/src/ControllerInterpreter.php b/src/ControllerInterpreter.php index c7a11dd..87de649 100644 --- a/src/ControllerInterpreter.php +++ b/src/ControllerInterpreter.php @@ -80,11 +80,6 @@ class ControllerInterpreter $reflectionMethod = $reflectionClass->getMethod($reflectionMethod); } - $returnType = $reflectionMethod->getReturnType(); - if (method_exists($returnType, 'getName') && $returnType->getName() !== 'Psr\Http\Message\ResponseInterface') { - die('Request Handler<' . $class::class . '::' . $reflectionMethod->getName() . '> returns must implements on Psr\Http\Message\ResponseInterface'); - } - $container = \Kiri::getDi(); $parameters = $container->getMethodParams($reflectionMethod);