From 3394cba3fdb5d6608d405320101eeba0efb4763c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Thu, 29 Feb 2024 14:04:59 +0100 Subject: [PATCH 1/1] Php 8.x constructor style --- Subscriber/FacebookSubscriber.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/Subscriber/FacebookSubscriber.php b/Subscriber/FacebookSubscriber.php index c87b19a..af4eb0f 100644 --- a/Subscriber/FacebookSubscriber.php +++ b/Subscriber/FacebookSubscriber.php @@ -20,24 +20,13 @@ use Symfony\Component\Routing\RouterInterface; * {@inheritdoc} */ class FacebookSubscriber implements EventSubscriberInterface { - ///Supported locales array - private $locales; - - ///Router instance - private $router; - /* * Inject router interface and locales * * @param RouterInterface $router The router instance * @param array $locales The supported locales */ - public function __construct(RouterInterface $router, array $locales) { - //Set locales - $this->locales = $locales; - - //Set router - $this->router = $router; + public function __construct(protected RouterInterface $router, protected array $locales) { } /** -- 2.41.1