]> Raphaël G. Git Repositories - userbundle/commitdiff
Php 8.x constructor style
authorRaphaël Gertz <git@rapsys.eu>
Tue, 27 Feb 2024 13:15:29 +0000 (14:15 +0100)
committerRaphaël Gertz <git@rapsys.eu>
Tue, 27 Feb 2024 13:15:29 +0000 (14:15 +0100)
Listener/LogoutListener.php

index 304f123bd16a094588f82755d3df38dc909b6984..888d67011ca596e0af3170a9c0e8f1bfcbaa9a35 100644 (file)
@@ -34,26 +34,15 @@ class LogoutListener implements EventSubscriberInterface {
         */
        protected $config;
 
-       /**
-        * Target url
-        */
-       private $targetUrl;
-
        /**
         * {@inheritdoc}
         *
         * @xxx Second argument will be replaced by security.firewalls.main.logout.target
         * @see vendor/symfony/security-bundle/Resources/config/security_listeners.php +79
         */
-       public function __construct(ContainerInterface $container, string $targetUrl, RouterInterface $router) {
+       public function __construct(protected ContainerInterface $container, protected string $targetUrl, protected RouterInterface $router) {
                //Set config
                $this->config = $container->getParameter(RapsysUserBundle::getAlias());
-
-               //Set target url
-               $this->targetUrl = $targetUrl;
-
-               //Set router
-               $this->router = $router;
        }
 
        /**