From fadcbd60c8ea98e17af403b91e342c9ea9805e85 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Thu, 29 Feb 2024 14:07:43 +0100 Subject: [PATCH 1/1] Php 8.x constructor style --- Form/CaptchaType.php | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/Form/CaptchaType.php b/Form/CaptchaType.php index da087c0..c0d5ae1 100644 --- a/Form/CaptchaType.php +++ b/Form/CaptchaType.php @@ -29,21 +29,6 @@ use Symfony\Component\Form\FormError; * @see https://symfony.com/doc/current/form/create_custom_field_type.html */ class CaptchaType extends AbstractType { - /** - * @var ImageUtil $image - */ - private $image; - - /** - * @var SluggerUtil $slugger - */ - private $slugger; - - /** - * @var Translator instance - */ - private $translator; - /** * Constructor * @@ -51,15 +36,7 @@ class CaptchaType extends AbstractType { * @param SluggerUtil $slugger * @param TranslatorInterface $translator The translator instance */ - public function __construct(ImageUtil $image, SluggerUtil $slugger, TranslatorInterface $translator) { - //Set image - $this->image = $image; - - //Set slugger - $this->slugger = $slugger; - - //Set translator - $this->translator = $translator; + public function __construct(protected ImageUtil $image, protected SluggerUtil $slugger, protected TranslatorInterface $translator) { } /** -- 2.41.1