Cleaned
This commit is contained in:
parent
2e68d4779f
commit
3d09cf71fb
2 changed files with 8 additions and 4 deletions
|
|
@ -105,8 +105,10 @@ abstract class Controller
|
|||
return $filter;
|
||||
}
|
||||
|
||||
protected function pageNotFound() : Response {
|
||||
protected function pageNotFound(): Response
|
||||
{
|
||||
return (new Response())
|
||||
->withStatus(404);
|
||||
->withStatus(404)
|
||||
;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ abstract class HtmlController extends Controller
|
|||
{
|
||||
protected Twig $twig;
|
||||
protected DebugBar $debugBar;
|
||||
protected string $pageNotFoundTemplate = "404.html.twig";
|
||||
protected string $pageNotFoundTemplate = '404.html.twig';
|
||||
|
||||
public function __construct(
|
||||
Twig $twig,
|
||||
|
|
@ -64,7 +64,9 @@ abstract class HtmlController extends Controller
|
|||
$response = (parent::pageNotFound());
|
||||
$response->withHeader('Content-Type', 'text/html');
|
||||
$response->getBody()
|
||||
->write($this->twig->fetch($this->pageNotFoundTemplate));
|
||||
->write($this->twig->fetch($this->pageNotFoundTemplate))
|
||||
;
|
||||
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue