From: Raphaƫl Gertz Date: Thu, 29 Feb 2024 13:04:59 +0000 (+0100) Subject: Php 8.x constructor style X-Git-Tag: 0.4.0~44 X-Git-Url: https://git.rapsys.eu/packbundle/commitdiff_plain/3394cba3fdb5d6608d405320101eeba0efb4763c?ds=sidebyside Php 8.x constructor style --- 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) { } /**