]> Raphaël G. Git Repositories - airbundle/commitdiff
Add php strict
authorRaphaël Gertz <git@rapsys.eu>
Mon, 24 Oct 2022 05:51:06 +0000 (07:51 +0200)
committerRaphaël Gertz <git@rapsys.eu>
Mon, 24 Oct 2022 05:51:06 +0000 (07:51 +0200)
Add Response return type
Cleanup

Handler/AccessDeniedHandler.php

index b742db003f74bc75014d724ab0192c8e51fedbde..13727c9628c2d3e85163261c189d34bf7e691b81 100644 (file)
@@ -1,8 +1,18 @@
-<?php
+<?php declare(strict_types=1);
+
+/*
+ * This file is part of the Rapsys AirBundle package.
+ *
+ * (c) Raphaël Gertz <symfony@rapsys.eu>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
 
 namespace Rapsys\AirBundle\Handler;
 
 use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\HttpFoundation\Response;
 use Symfony\Component\Security\Core\Exception\AccessDeniedException;
 use Symfony\Component\Security\Http\Authorization\AccessDeniedHandlerInterface;
 
@@ -16,7 +26,7 @@ class AccessDeniedHandler extends AbstractController implements AccessDeniedHand
        /**
         * {@inheritdoc}
         */
-       public function handle(Request $request, AccessDeniedException $exception) {
+       public function handle(Request $request, AccessDeniedException $exception): Response {
                //Set title
                $this->context['title'] = $this->translator->trans('Access denied');