Skip to content

Commit

Permalink
private readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
rimi-itk committed Sep 28, 2023
1 parent 77ed50d commit 859355a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
) {
}

Expand Down
6 changes: 3 additions & 3 deletions modules/os2forms_forloeb/src/Form/SettingsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
24 changes: 12 additions & 12 deletions modules/os2forms_forloeb/src/MaestroHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,43 +51,43 @@ 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.
*/
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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 859355a

Please sign in to comment.