From 859355af527a3ce6c44feb262aec55819d7e61d8 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Thu, 28 Sep 2023 16:24:17 +0200 Subject: [PATCH] `private readonly` --- .../MaestroNotificationController.php | 4 ++-- .../src/Form/SettingsForm.php | 6 ++--- .../os2forms_forloeb/src/MaestroHelper.php | 24 +++++++++---------- .../JobType/SendMeastroNotification.php | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/modules/os2forms_forloeb/src/Controller/MaestroNotificationController.php b/modules/os2forms_forloeb/src/Controller/MaestroNotificationController.php index 1264d730..0da7b32c 100644 --- a/modules/os2forms_forloeb/src/Controller/MaestroNotificationController.php +++ b/modules/os2forms_forloeb/src/Controller/MaestroNotificationController.php @@ -23,8 +23,8 @@ class MaestroNotificationController extends ControllerBase { * Constructor. */ public function __construct( - readonly private WebformSubmissionStorageInterface $webformSubmissionStorage, - readonly private MaestroHelper $maestroHelper + private readonly WebformSubmissionStorageInterface $webformSubmissionStorage, + private readonly MaestroHelper $maestroHelper ) { } diff --git a/modules/os2forms_forloeb/src/Form/SettingsForm.php b/modules/os2forms_forloeb/src/Form/SettingsForm.php index 5b8bdfe4..d6f1eb8e 100644 --- a/modules/os2forms_forloeb/src/Form/SettingsForm.php +++ b/modules/os2forms_forloeb/src/Form/SettingsForm.php @@ -28,9 +28,9 @@ class SettingsForm extends ConfigFormBase { */ public function __construct( ConfigFactoryInterface $configFactory, - readonly private RoleStorageInterface $roleStorage, - readonly private EntityStorageInterface $queueStorage, - readonly private ModuleExtensionList $moduleHandler + private readonly RoleStorageInterface $roleStorage, + private readonly EntityStorageInterface $queueStorage, + private readonly ModuleExtensionList $moduleHandler ) { parent::__construct($configFactory); } diff --git a/modules/os2forms_forloeb/src/MaestroHelper.php b/modules/os2forms_forloeb/src/MaestroHelper.php index 94ad9a55..9401b6ef 100644 --- a/modules/os2forms_forloeb/src/MaestroHelper.php +++ b/modules/os2forms_forloeb/src/MaestroHelper.php @@ -51,28 +51,28 @@ class MaestroHelper implements LoggerInterface { * * @var \Drupal\Core\Config\ImmutableConfig */ - readonly private ImmutableConfig $config; + private readonly ImmutableConfig $config; /** * The webform submission storage. * * @var \Drupal\webform\WebformSubmissionStorageInterface|\Drupal\Core\Entity\EntityStorageInterface */ - readonly private WebformSubmissionStorageInterface $webformSubmissionStorage; + private readonly WebformSubmissionStorageInterface $webformSubmissionStorage; /** * The queue storage. * * @var \Drupal\Core\Entity\EntityStorageInterface */ - readonly private EntityStorageInterface $queueStorage; + private readonly EntityStorageInterface $queueStorage; /** * The Digital post helper. * * @var \Drupal\os2forms_digital_post\Helper\DigitalPostHelper|null */ - readonly private ?DigitalPostHelper $digitalPostHelper; + private readonly ?DigitalPostHelper $digitalPostHelper; /** * Constructor. @@ -80,14 +80,14 @@ class MaestroHelper implements LoggerInterface { public function __construct( EntityTypeManagerInterface $entityTypeManager, ConfigFactoryInterface $configFactory, - readonly private WebformTokenManagerInterface $tokenManager, - readonly private MailManagerInterface $mailManager, - readonly private LanguageManagerInterface $languageManager, - readonly private WebformThemeManagerInterface $webformThemeManager, - readonly private LoggerChannelInterface $logger, - readonly private LoggerChannelInterface $submissionLogger, - readonly private ModuleHandlerInterface $moduleHandler, - readonly private EntityPrintPluginManagerInterface $entityPrintPluginManager, + private readonly WebformTokenManagerInterface $tokenManager, + private readonly MailManagerInterface $mailManager, + private readonly LanguageManagerInterface $languageManager, + private readonly WebformThemeManagerInterface $webformThemeManager, + private readonly LoggerChannelInterface $logger, + private readonly LoggerChannelInterface $submissionLogger, + private readonly ModuleHandlerInterface $moduleHandler, + private readonly EntityPrintPluginManagerInterface $entityPrintPluginManager, ) { $this->config = $configFactory->get(SettingsForm::SETTINGS); $this->webformSubmissionStorage = $entityTypeManager->getStorage('webform_submission'); diff --git a/modules/os2forms_forloeb/src/Plugin/AdvancedQueue/JobType/SendMeastroNotification.php b/modules/os2forms_forloeb/src/Plugin/AdvancedQueue/JobType/SendMeastroNotification.php index ab4eb948..8968e03e 100644 --- a/modules/os2forms_forloeb/src/Plugin/AdvancedQueue/JobType/SendMeastroNotification.php +++ b/modules/os2forms_forloeb/src/Plugin/AdvancedQueue/JobType/SendMeastroNotification.php @@ -40,7 +40,7 @@ public function __construct( array $configuration, $plugin_id, $plugin_definition, - readonly private MaestroHelper $helper + private readonly MaestroHelper $helper ) { parent::__construct($configuration, $plugin_id, $plugin_definition); }