]> Raphaël G. Git Repositories - userbundle/blobdiff - Handler/LogoutSuccessHandler.php
Add slug
[userbundle] / Handler / LogoutSuccessHandler.php
index 57392ddfac6413e6cb57675078ccac22b1e2c1ac..825cd5b69bd5a7f973a0ad9b78185b5fca4ede3e 100644 (file)
@@ -1,10 +1,20 @@
-<?php
+<?php declare(strict_types=1);
+
+/*
+ * This file is part of the Rapsys UserBundle 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\UserBundle\Handler;
 
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpFoundation\RedirectResponse;
 use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\HttpFoundation\Response;
 use Symfony\Component\Routing\Exception\ResourceNotFoundException;
 use Symfony\Component\Routing\RequestContext;
 use Symfony\Component\Routing\RouterInterface;
@@ -32,6 +42,9 @@ class LogoutSuccessHandler extends DefaultLogoutSuccessHandler {
        protected $targetUrl;
 
        /**
+        * @xxx Second argument will be replaced by security.firewalls.main.logout.target
+        * @see vendor/symfony/security-bundle/DependencyInjection/SecurityExtension.php +360
+        *
         * {@inheritdoc}
         */
        public function __construct(ContainerInterface $container, string $targetUrl = '/', RouterInterface $router) {
@@ -48,7 +61,7 @@ class LogoutSuccessHandler extends DefaultLogoutSuccessHandler {
        /**
         * {@inheritdoc}
         */
-       public function onLogoutSuccess(Request $request) {
+       public function onLogoutSuccess(Request $request): Response {
                //Retrieve logout route
                $logout = $request->get('_route');