From f1fba93b2b467de2c1da5311041b09a7a6ba26b6 Mon Sep 17 00:00:00 2001
From: Pieter Frenssen <32191-pfrenssen@users.noreply.drupalcode.org>
Date: Thu, 10 Oct 2024 11:15:51 +0000
Subject: [PATCH] Issue #3479843 by pfrenssen: Adhere to coding standards

---
 .gitlab-ci.yml                                | 102 +++---------------
 .../tests/src/Kernel/EventICalTest.php        |   2 +-
 .../recurring_events_registration.api.php     |   4 +-
 .../src/AccessHandler.php                     |   4 +-
 .../src/Controller/RegistrantController.php   |   6 +-
 .../src/Entity/Registrant.php                 |   4 +-
 .../src/Form/RegistrantDeleteForm.php         |   6 +-
 .../src/Form/RegistrantForm.php               |   7 +-
 .../src/Form/RegistrantSettingsForm.php       |   2 +-
 .../ComputedField/AvailabilityCount.php       |   2 +-
 .../ComputedField/RegistrationCount.php       |   2 +-
 .../Plugin/ComputedField/WaitlistCount.php    |   2 +-
 .../access/EventRegistrationListAccess.php    |   2 +-
 .../src/RegistrantAccessControlHandler.php    |   4 +-
 .../src/RegistrationCreationService.php       |   4 +-
 .../src/Routing/RouteSubscriber.php           |   4 +-
 .../src/Kernel/RegistrantControllerTest.php   |   2 +-
 recurring_events.api.php                      |  18 ++--
 recurring_events.module                       |   2 +-
 src/Controller/EventInstanceController.php    |   2 +-
 src/EventCreationService.php                  |  45 ++++----
 src/Form/EventInstanceDeleteForm.php          |   6 +-
 src/Form/EventInstanceSettingsForm.php        |   4 +-
 src/Form/EventSeriesDeleteForm.php            |   6 +-
 src/Form/EventSeriesForm.php                  |  25 +++--
 src/Form/EventSeriesSettingsForm.php          |   4 +-
 .../FieldType/ConsecutiveRecurringDate.php    |   6 +-
 .../Field/FieldType/DailyRecurringDate.php    |   4 +-
 .../Field/FieldType/WeeklyRecurringDate.php   |   4 +-
 .../migrate/destination/EntityEventSeries.php |   6 +-
 .../TaxonomyIndexTidEventSeriesDepth.php      |   8 +-
 src/RecurringEventsFieldTypeInterface.php     |   4 +-
 .../destination/EntityEventSeriesTest.php     |   2 +-
 .../migrate/process/RecurringDateTest.php     |   2 +-
 34 files changed, 123 insertions(+), 184 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ddfcfcc1..ac71a2f5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,106 +1,32 @@
 ################
-# DrupalCI GitLabCI template
+# GitLabCI template for Drupal projects.
 #
-# Gitlab-ci.yml to replicate DrupalCI testing for Contrib
-#
-# With thanks to:
-#   * The GitLab Acceleration Initiative participants
-#   * DrupalSpoons
-################
-
-################
-# Guidelines
-#
-# This template is designed to give any Contrib maintainer everything they need to test, without requiring modification. It is also designed to keep up to date with Core Development automatically through the use of include files that can be centrally maintained.
-#
-# However, you can modify this template if you have additional needs for your project.
-################
-
-################
-# Includes
-#
-# Additional configuration can be provided through includes.
-# One advantage of include files is that if they are updated upstream, the changes affect all pipelines using that include.
-#
-# Includes can be overridden by re-declaring anything provided in an include, here in gitlab-ci.yml
-# https://docs.gitlab.com/ee/ci/yaml/includes.html#override-included-configuration-values
+# This template is designed to give any Contrib maintainer everything they need to test, without requiring modification.
+# It is also designed to keep up to date with Core Development automatically through the use of include files that can be centrally maintained.
+# As long as you include the project, ref and three files below, any future updates added by the Drupal Association will be used in your
+# pipelines automatically. However, you can modify this template if you have additional needs for your project.
+# The full documentation is on https://project.pages.drupalcode.org/gitlab_templates/
 ################
 
+# For information on alternative values for 'ref' see https://project.pages.drupalcode.org/gitlab_templates/info/templates-version/
+# To test a Drupal 7 project, change the first include filename from .main.yml to .main-d7.yml
 include:
-  ################
-  # DrupalCI includes:
-  # As long as you include this, any future includes added by the Drupal Association will be accessible to your pipelines automatically.
-  # View these include files at https://git.drupalcode.org/project/gitlab_templates/
-  ################
   - project: $_GITLAB_TEMPLATES_REPO
-    # "ref" value can be:
-    # - Recommended (default) - `ref: $_GITLAB_TEMPLATES_REF` - The Drupal Association will update this value to the recommended tag for contrib.
-    # - Latest - `ref: main` - Get the latest additions and bug fixes as they are merged into the templates.
-    # - Minor or Major latests - `ref: 1.x-latest` or `ref: 1.0.x-latest` - Get the latest additions within a minor (mostly bugfixes) or major (bugs and new features).
-    # - Fixed tag - `ref: 1.0.1` - Set the value to a known tag. This will not get any updates.
-    # If you change the default value of ref, you should set the _CURL_TEMPLATES_REF variable in the variables section to be the same as set here.
     ref: $_GITLAB_TEMPLATES_REF
     file:
       - "/includes/include.drupalci.main.yml"
-      # For Drupal 7, remove the above line and uncomment the below.
-      # - "/includes/include.drupalci.main-d7.yml"
       - "/includes/include.drupalci.variables.yml"
       - "/includes/include.drupalci.workflows.yml"
-#
+
 ################
-# Pipeline configuration variables
-#
-# These are the variables provided to the Run Pipeline form that a user may want to override.
-#
-# Docs at https://git.drupalcode.org/project/gitlab_templates/-/blob/main/includes/include.drupalci.variables.yml
+# Pipeline configuration variables are defined with default values and descriptions in the file
+# https://git.drupalcode.org/project/gitlab_templates/-/blob/main/includes/include.drupalci.variables.yml
+# Uncomment the lines below if you want to override any of the variables. The following is just an example.
 ################
 # variables:
 #   SKIP_ESLINT: '1'
 #   OPT_IN_TEST_NEXT_MAJOR: '1'
 #   _CURL_TEMPLATES_REF: 'main'
 
-###################################################################################
-#
-#                                        *
-#                                       /(
-#                                      ((((,
-#                                    /(((((((
-#                                   ((((((((((*
-#                                ,(((((((((((((((
-#                              ,(((((((((((((((((((
-#                            ((((((((((((((((((((((((*
-#                         *(((((((((((((((((((((((((((((
-#                       ((((((((((((((((((((((((((((((((((*
-#                    *((((((((((((((((((  .((((((((((((((((((
-#                  ((((((((((((((((((.       /(((((((((((((((((*
-#                /(((((((((((((((((            .(((((((((((((((((,
-#             ,((((((((((((((((((                 ((((((((((((((((((
-#           .((((((((((((((((((((                   .(((((((((((((((((
-#          (((((((((((((((((((((((                     ((((((((((((((((/
-#        (((((((((((((((((((((((((((/                    ,(((((((((((((((*
-#      .((((((((((((((/  /(((((((((((((.                   ,(((((((((((((((
-#     *((((((((((((((      ,(((((((((((((/                   *((((((((((((((.
-#    ((((((((((((((,          /(((((((((((((.                  ((((((((((((((,
-#   (((((((((((((/              ,(((((((((((((*                 ,(((((((((((((,
-#  *(((((((((((((                .(((((((((((((((                ,(((((((((((((
-#  ((((((((((((/                /((((((((((((((((((.              ,((((((((((((/
-# (((((((((((((              *(((((((((((((((((((((((*             *((((((((((((
-# (((((((((((((            ,(((((((((((((..(((((((((((((           *((((((((((((
-# ((((((((((((,          /((((((((((((*      /((((((((((((/         ((((((((((((
-# (((((((((((((        /((((((((((((/          (((((((((((((*       ((((((((((((
-# (((((((((((((/     /((((((((((((               ,((((((((((((,    *((((((((((((
-#  ((((((((((((((  *(((((((((((/                   *((((((((((((.  ((((((((((((/
-#  *((((((((((((((((((((((((((,                      /(((((((((((((((((((((((((
-#   (((((((((((((((((((((((((                         ((((((((((((((((((((((((,
-#   .(((((((((((((((((((((((/                         ,(((((((((((((((((((((((
-#     ((((((((((((((((((((((/                         ,(((((((((((((((((((((/
-#      *(((((((((((((((((((((                         (((((((((((((((((((((,
-#       ,(((((((((((((((((((((,                      ((((((((((((((((((((/
-#         ,(((((((((((((((((((((*                  /((((((((((((((((((((
-#            ((((((((((((((((((((((,           ,/((((((((((((((((((((,
-#              ,(((((((((((((((((((((((((((((((((((((((((((((((((((
-#                 .(((((((((((((((((((((((((((((((((((((((((((((
-#                     .((((((((((((((((((((((((((((((((((((,.
-#                          .,(((((((((((((((((((((((((.
-#
-###################################################################################
+phpcs:
+  allow_failure: false
diff --git a/modules/recurring_events_ical/tests/src/Kernel/EventICalTest.php b/modules/recurring_events_ical/tests/src/Kernel/EventICalTest.php
index 35549bb1..6431552a 100644
--- a/modules/recurring_events_ical/tests/src/Kernel/EventICalTest.php
+++ b/modules/recurring_events_ical/tests/src/Kernel/EventICalTest.php
@@ -3,8 +3,8 @@
 namespace Drupal\Tests\recurring_events_ical\Kernel;
 
 use Drupal\Core\Datetime\DrupalDateTime;
-use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface;
 use Drupal\KernelTests\KernelTestBase;
+use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface;
 use Drupal\recurring_events\Entity\EventSeries;
 
 /**
diff --git a/modules/recurring_events_registration/recurring_events_registration.api.php b/modules/recurring_events_registration/recurring_events_registration.api.php
index 01097a0c..c201179f 100644
--- a/modules/recurring_events_registration/recurring_events_registration.api.php
+++ b/modules/recurring_events_registration/recurring_events_registration.api.php
@@ -17,7 +17,7 @@ use Drupal\recurring_events_registration\Entity\RegistrantInterface;
  * instance of Drupal\recurring_events_registration\Entity\Registrant for the
  * specified event, which can be retrieved from the registrant entity.
  *
- * @param Drupal\recurring_events_registration\Entity\Registrant $registrant
+ * @param \Drupal\recurring_events_registration\Entity\Registrant $registrant
  *   The default selected registrant.
  *
  * @return \Drupal\recurring_events_registration\Entity\Registrant
@@ -35,7 +35,7 @@ function hook_recurring_events_registration_first_waitlist_alter(Registrant $reg
  *
  * @param bool $send_email
  *   Whether the notification email is sent.
- * @param Drupal\recurring_events_registration\Entity\RegistrantInterface $registrant
+ * @param \Drupal\recurring_events_registration\Entity\RegistrantInterface $registrant
  *   The registrant entity.
  */
 function hook_recurring_events_registration_send_notification_alter(bool &$send_email, RegistrantInterface $registrant) {
diff --git a/modules/recurring_events_registration/src/AccessHandler.php b/modules/recurring_events_registration/src/AccessHandler.php
index 3ae09780..e16e7072 100644
--- a/modules/recurring_events_registration/src/AccessHandler.php
+++ b/modules/recurring_events_registration/src/AccessHandler.php
@@ -50,7 +50,7 @@ class AccessHandler {
    *   The translation interface.
    * @param \Drupal\recurring_events_registration\RegistrationCreationService $creation_service
    *   The registration creation service.
-   * @param Drupal\Core\Routing\CurrentRouteMatch $route_match
+   * @param \Drupal\Core\Routing\CurrentRouteMatch $route_match
    *   The current route match.
    * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
    *   The entity type manager service.
@@ -100,7 +100,7 @@ class AccessHandler {
   /**
    * Access control based on whether the account has the right permission.
    *
-   * @param Drupal\Core\Session\AccountInterface $account
+   * @param \Drupal\Core\Session\AccountInterface $account
    *   The current route.
    *
    * @return bool
diff --git a/modules/recurring_events_registration/src/Controller/RegistrantController.php b/modules/recurring_events_registration/src/Controller/RegistrantController.php
index e28bf6b9..41b38edc 100644
--- a/modules/recurring_events_registration/src/Controller/RegistrantController.php
+++ b/modules/recurring_events_registration/src/Controller/RegistrantController.php
@@ -68,7 +68,7 @@ class RegistrantController extends ControllerBase implements ContainerInjectionI
   /**
    * Check if registration is enabled.
    *
-   * @param Drupal\recurring_events\Entity\EventInstance $eventinstance
+   * @param \Drupal\recurring_events\Entity\EventInstance $eventinstance
    *   The eventinstance entity.
    *
    * @return \Drupal\Core\Access\AccessResultInterface
@@ -91,7 +91,7 @@ class RegistrantController extends ControllerBase implements ContainerInjectionI
   /**
    * Check if the user can contact the registrants.
    *
-   * @param Drupal\recurring_events\Entity\EventInstance $eventinstance
+   * @param \Drupal\recurring_events\Entity\EventInstance $eventinstance
    *   The eventinstance entity.
    *
    * @return \Drupal\Core\Access\AccessResultInterface
@@ -108,7 +108,7 @@ class RegistrantController extends ControllerBase implements ContainerInjectionI
   /**
    * Return a dynamic page title for a Registrant.
    *
-   * @param Drupal\recurring_events_registration\Entity\RegistrantInterface $registrant
+   * @param \Drupal\recurring_events_registration\Entity\RegistrantInterface $registrant
    *   The entity for which to generate a page title.
    *
    * @return string
diff --git a/modules/recurring_events_registration/src/Entity/Registrant.php b/modules/recurring_events_registration/src/Entity/Registrant.php
index ae0b3ccc..57e30517 100644
--- a/modules/recurring_events_registration/src/Entity/Registrant.php
+++ b/modules/recurring_events_registration/src/Entity/Registrant.php
@@ -287,7 +287,7 @@ class Registrant extends EditorialContentEntityBase implements RegistrantInterfa
   /**
    * Set the event series ID.
    *
-   * @param Drupal\recurring_events\Entity\EventSeries $event
+   * @param \Drupal\recurring_events\Entity\EventSeries $event
    *   The event series entity.
    *
    * @return \Drupal\recurring_events_registration\Entity\RegistrantInterface
@@ -308,7 +308,7 @@ class Registrant extends EditorialContentEntityBase implements RegistrantInterfa
   /**
    * Set the event ID.
    *
-   * @param Drupal\recurring_events\Entity\EventInstance $event
+   * @param \Drupal\recurring_events\Entity\EventInstance $event
    *   The eventinstance entity.
    *
    * @return \Drupal\recurring_events_registration\Entity\RegistrantInterface
diff --git a/modules/recurring_events_registration/src/Form/RegistrantDeleteForm.php b/modules/recurring_events_registration/src/Form/RegistrantDeleteForm.php
index 04d3da62..a72de862 100644
--- a/modules/recurring_events_registration/src/Form/RegistrantDeleteForm.php
+++ b/modules/recurring_events_registration/src/Form/RegistrantDeleteForm.php
@@ -46,9 +46,9 @@ class RegistrantDeleteForm extends ContentEntityDeleteForm {
    *
    * @param \Drupal\Core\Entity\EntityRepositoryInterface $entity_repository
    *   The entity repository service.
-   * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info
+   * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface|null $entity_type_bundle_info
    *   The entity type bundle service.
-   * @param \Drupal\Component\Datetime\TimeInterface $time
+   * @param \Drupal\Component\Datetime\TimeInterface|null $time
    *   The time service.
    * @param \Drupal\Core\Messenger\Messenger $messenger
    *   The messenger service.
@@ -57,7 +57,7 @@ class RegistrantDeleteForm extends ContentEntityDeleteForm {
    * @param \Drupal\recurring_events_registration\RegistrationCreationService $creation_service
    *   The creation service.
    */
-  public function __construct(EntityRepositoryInterface $entity_repository, EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, TimeInterface $time = NULL, Messenger $messenger, Renderer $renderer, RegistrationCreationService $creation_service) {
+  public function __construct(EntityRepositoryInterface $entity_repository, ?EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, ?TimeInterface $time = NULL, Messenger $messenger, Renderer $renderer, RegistrationCreationService $creation_service) {
     parent::__construct($entity_repository, $entity_type_bundle_info, $time);
     $this->messenger = $messenger;
     $this->renderer = $renderer;
diff --git a/modules/recurring_events_registration/src/Form/RegistrantForm.php b/modules/recurring_events_registration/src/Form/RegistrantForm.php
index 87c54f71..2a8debd9 100644
--- a/modules/recurring_events_registration/src/Form/RegistrantForm.php
+++ b/modules/recurring_events_registration/src/Form/RegistrantForm.php
@@ -4,7 +4,6 @@ namespace Drupal\recurring_events_registration\Form;
 
 use Drupal\Component\Datetime\TimeInterface;
 use Drupal\Component\Render\FormattableMarkup;
-use Drupal\content_moderation\ModerationInformation;
 use Drupal\Core\Config\ConfigFactory;
 use Drupal\Core\Entity\ContentEntityForm;
 use Drupal\Core\Entity\EntityFieldManager;
@@ -17,6 +16,7 @@ use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\Core\Routing\TrustedRedirectResponse;
 use Drupal\Core\Session\AccountProxyInterface;
 use Drupal\Core\Url;
+use Drupal\content_moderation\ModerationInformation;
 use Drupal\recurring_events_registration\NotificationService;
 use Drupal\recurring_events_registration\RegistrationCreationService;
 use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -136,7 +136,7 @@ class RegistrantForm extends ContentEntityForm {
    *   The entity type manager service.
    * @param \Drupal\recurring_events_registration\NotificationService $notification_service
    *   The registration notification service.
-   * @param \Drupal\content_moderation\ModerationInformation $moderation_information
+   * @param \Drupal\content_moderation\ModerationInformation|null $moderation_information
    *   The moderation information service.
    */
   public function __construct(
@@ -151,7 +151,8 @@ class RegistrantForm extends ContentEntityForm {
     RouteMatchInterface $route_match,
     EntityTypeManagerInterface $entity_type_manager,
     NotificationService $notification_service,
-    ModerationInformation $moderation_information = NULL) {
+    ?ModerationInformation $moderation_information = NULL,
+  ) {
     $this->messenger = $messenger;
     $this->creationService = $creation_service;
     $this->currentUser = $current_user;
diff --git a/modules/recurring_events_registration/src/Form/RegistrantSettingsForm.php b/modules/recurring_events_registration/src/Form/RegistrantSettingsForm.php
index c816f37c..118dc856 100644
--- a/modules/recurring_events_registration/src/Form/RegistrantSettingsForm.php
+++ b/modules/recurring_events_registration/src/Form/RegistrantSettingsForm.php
@@ -63,7 +63,7 @@ class RegistrantSettingsForm extends ConfigFormBase {
     NotificationService $notification_service,
     RegistrationCreationService $creation_service,
     ModuleHandlerInterface $module_handler,
-    RouteBuilderInterface $route_builder
+    RouteBuilderInterface $route_builder,
   ) {
     $this->notificationService = $notification_service;
     $this->creationService = $creation_service;
diff --git a/modules/recurring_events_registration/src/Plugin/ComputedField/AvailabilityCount.php b/modules/recurring_events_registration/src/Plugin/ComputedField/AvailabilityCount.php
index 6992bee4..66d3e66d 100644
--- a/modules/recurring_events_registration/src/Plugin/ComputedField/AvailabilityCount.php
+++ b/modules/recurring_events_registration/src/Plugin/ComputedField/AvailabilityCount.php
@@ -26,7 +26,7 @@ class AvailabilityCount extends FieldItemList {
   /**
    * {@inheritdoc}
    */
-  public function __construct(DataDefinitionInterface $definition, $name = NULL, TypedDataInterface $parent = NULL) {
+  public function __construct(DataDefinitionInterface $definition, $name = NULL, ?TypedDataInterface $parent = NULL) {
     parent::__construct($definition, $name, $parent);
     // @todo Look for a better way to inject this service.
     $this->requestStack = \Drupal::service('request_stack');
diff --git a/modules/recurring_events_registration/src/Plugin/ComputedField/RegistrationCount.php b/modules/recurring_events_registration/src/Plugin/ComputedField/RegistrationCount.php
index a952b000..4c3b6c4f 100644
--- a/modules/recurring_events_registration/src/Plugin/ComputedField/RegistrationCount.php
+++ b/modules/recurring_events_registration/src/Plugin/ComputedField/RegistrationCount.php
@@ -26,7 +26,7 @@ class RegistrationCount extends FieldItemList {
   /**
    * {@inheritdoc}
    */
-  public function __construct(DataDefinitionInterface $definition, $name = NULL, TypedDataInterface $parent = NULL) {
+  public function __construct(DataDefinitionInterface $definition, $name = NULL, ?TypedDataInterface $parent = NULL) {
     parent::__construct($definition, $name, $parent);
     // @todo Look for a better way to inject this service.
     $this->requestStack = \Drupal::service('request_stack');
diff --git a/modules/recurring_events_registration/src/Plugin/ComputedField/WaitlistCount.php b/modules/recurring_events_registration/src/Plugin/ComputedField/WaitlistCount.php
index fc88ebf0..3ef84d64 100644
--- a/modules/recurring_events_registration/src/Plugin/ComputedField/WaitlistCount.php
+++ b/modules/recurring_events_registration/src/Plugin/ComputedField/WaitlistCount.php
@@ -26,7 +26,7 @@ class WaitlistCount extends FieldItemList {
   /**
    * {@inheritdoc}
    */
-  public function __construct(DataDefinitionInterface $definition, $name = NULL, TypedDataInterface $parent = NULL) {
+  public function __construct(DataDefinitionInterface $definition, $name = NULL, ?TypedDataInterface $parent = NULL) {
     parent::__construct($definition, $name, $parent);
     // @todo Look for a better way to inject this service.
     $this->requestStack = \Drupal::service('request_stack');
diff --git a/modules/recurring_events_registration/src/Plugin/views/access/EventRegistrationListAccess.php b/modules/recurring_events_registration/src/Plugin/views/access/EventRegistrationListAccess.php
index 964981ed..a757c987 100644
--- a/modules/recurring_events_registration/src/Plugin/views/access/EventRegistrationListAccess.php
+++ b/modules/recurring_events_registration/src/Plugin/views/access/EventRegistrationListAccess.php
@@ -37,7 +37,7 @@ class EventRegistrationListAccess extends AccessPluginBase {
    *   The plugin_id for the plugin instance.
    * @param mixed $plugin_definition
    *   The plugin implementation definition.
-   * @param Drupal\recurring_events_registration\AccessHandler $access_handler
+   * @param \Drupal\recurring_events_registration\AccessHandler $access_handler
    *   The access handler.
    */
   public function __construct(array $configuration, $plugin_id, $plugin_definition, AccessHandler $access_handler) {
diff --git a/modules/recurring_events_registration/src/RegistrantAccessControlHandler.php b/modules/recurring_events_registration/src/RegistrantAccessControlHandler.php
index 5b2a59ce..59ba9873 100644
--- a/modules/recurring_events_registration/src/RegistrantAccessControlHandler.php
+++ b/modules/recurring_events_registration/src/RegistrantAccessControlHandler.php
@@ -120,11 +120,11 @@ class RegistrantAccessControlHandler extends EntityAccessControlHandler implemen
   /**
    * Check if the user can edit or delete this registrant anonymously.
    *
-   * @param Drupal\Core\Entity\EntityInterface $registrant
+   * @param \Drupal\Core\Entity\EntityInterface $registrant
    *   The registrant to be edited.
    * @param string $operation
    *   The operation being attempted.
-   * @param Drupal\Core\Session\AccountInterface $account
+   * @param \Drupal\Core\Session\AccountInterface $account
    *   The user attempting to gain access.
    *
    * @return \Drupal\Core\Access\AccessResultInterface
diff --git a/modules/recurring_events_registration/src/RegistrationCreationService.php b/modules/recurring_events_registration/src/RegistrationCreationService.php
index 138cb48c..cadbc6a8 100644
--- a/modules/recurring_events_registration/src/RegistrationCreationService.php
+++ b/modules/recurring_events_registration/src/RegistrationCreationService.php
@@ -129,7 +129,7 @@ class RegistrationCreationService {
   /**
    * Set the event entities.
    *
-   * @param Drupal\recurring_events\Entity\EventInstance $event_instance
+   * @param \Drupal\recurring_events\Entity\EventInstance $event_instance
    *   The event instance.
    */
   public function setEventInstance(EventInstance $event_instance) {
@@ -140,7 +140,7 @@ class RegistrationCreationService {
   /**
    * Set the event series, helpful to get a fresh copy of the entity.
    *
-   * @param Drupal\recurring_events\Entity\EventSeries $event_series
+   * @param \Drupal\recurring_events\Entity\EventSeries $event_series
    *   The event series.
    */
   public function setEventSeries(EventSeries $event_series) {
diff --git a/modules/recurring_events_registration/src/Routing/RouteSubscriber.php b/modules/recurring_events_registration/src/Routing/RouteSubscriber.php
index b0aa3798..202ddc13 100644
--- a/modules/recurring_events_registration/src/Routing/RouteSubscriber.php
+++ b/modules/recurring_events_registration/src/Routing/RouteSubscriber.php
@@ -24,9 +24,7 @@ class RouteSubscriber extends RouteSubscriberBase {
    * @param \Drupal\Core\Config\ConfigFactoryInterface $configFactory
    *   The config factory.
    */
-  public function __construct(
-    ConfigFactoryInterface $configFactory
-  ) {
+  public function __construct(ConfigFactoryInterface $configFactory) {
     $this->configFactory = $configFactory;
   }
 
diff --git a/modules/recurring_events_registration/tests/src/Kernel/RegistrantControllerTest.php b/modules/recurring_events_registration/tests/src/Kernel/RegistrantControllerTest.php
index d16a1fec..eed855ff 100644
--- a/modules/recurring_events_registration/tests/src/Kernel/RegistrantControllerTest.php
+++ b/modules/recurring_events_registration/tests/src/Kernel/RegistrantControllerTest.php
@@ -5,8 +5,8 @@ declare(strict_types=1);
 namespace Drupal\Tests\recurring_events_registration\Kernel;
 
 use Drupal\Core\Config\ConfigFactoryInterface;
-use Drupal\field\Entity\FieldStorageConfig;
 use Drupal\KernelTests\KernelTestBase;
+use Drupal\field\Entity\FieldStorageConfig;
 use Drupal\recurring_events\Entity\EventInstance;
 use Drupal\recurring_events_registration\Controller\RegistrantController;
 use Drupal\recurring_events_registration\Entity\Registrant;
diff --git a/recurring_events.api.php b/recurring_events.api.php
index f6fc3506..5dcdf8d8 100644
--- a/recurring_events.api.php
+++ b/recurring_events.api.php
@@ -78,11 +78,11 @@ function hook_recurring_events_event_instance_alter(array &$event_instance = [])
 /**
  * Alter the active EventInstanceCreator plugin.
  *
- * @param Drupal\recurring_events\EventInstanceCreatorInterface $active_plugin
+ * @param \Drupal\recurring_events\EventInstanceCreatorInterface $active_plugin
  *   The active plugin to use.
- * @param Drupal\recurring_events\EventInstanceCreatorPluginManager $plugin_manager
+ * @param \Drupal\recurring_events\EventInstanceCreatorPluginManager $plugin_manager
  *   The plugin manager to discover plugins.
- * @param Drupal\recurring_events\Entity\EventSeries $series
+ * @param \Drupal\recurring_events\Entity\EventSeries $series
  *   The event series for which we need to create instances.
  */
 function hook_recurring_events_event_instance_creator_plugin_alter(EventInstanceCreatorInterface &$active_plugin, EventInstanceCreatorPluginManager $plugin_manager, EventSeries $series) {
@@ -181,7 +181,7 @@ function hook_recurring_events_save_pre_instances_deletion_alter(array &$instanc
  * and recreate them. This hook allows you to execute code prior to the deletion
  * of those instances.
  *
- * @param Drupal\recurring_events\Entity\EventSeries $event_series
+ * @param \Drupal\recurring_events\Entity\EventSeries $event_series
  *   The eventseries being altered.
  */
 function hook_recurring_events_save_pre_instances_deletion(EventSeries $event_series) {
@@ -195,7 +195,7 @@ function hook_recurring_events_save_pre_instances_deletion(EventSeries $event_se
  * and recreate them. This hook allows you to execute code after the deletion
  * of those instances.
  *
- * @param Drupal\recurring_events\Entity\EventSeries $event_series
+ * @param \Drupal\recurring_events\Entity\EventSeries $event_series
  *   The eventseries being altered.
  */
 function hook_recurring_events_save_post_instances_deletion(EventSeries $event_series) {
@@ -209,9 +209,9 @@ function hook_recurring_events_save_post_instances_deletion(EventSeries $event_s
  * and recreate them. This hook allows you to execute code prior to the deletion
  * of each instance.
  *
- * @param Drupal\recurring_events\Entity\EventSeries $event_series
+ * @param \Drupal\recurring_events\Entity\EventSeries $event_series
  *   The eventseries being altered.
- * @param Drupal\recurring_events\Entity\EventInstance $event_instance
+ * @param \Drupal\recurring_events\Entity\EventInstance $event_instance
  *   The event instance being deleted.
  */
 function hook_recurring_events_save_pre_instance_deletion(EventSeries $event_series, EventInstance $event_instance) {
@@ -225,9 +225,9 @@ function hook_recurring_events_save_pre_instance_deletion(EventSeries $event_ser
  * and recreate them. This hook allows you to execute code after the deletion
  * of each instance.
  *
- * @param Drupal\recurring_events\Entity\EventSeries $event_series
+ * @param \Drupal\recurring_events\Entity\EventSeries $event_series
  *   The eventseries being altered.
- * @param Drupal\recurring_events\Entity\EventInstance $event_instance
+ * @param \Drupal\recurring_events\Entity\EventInstance $event_instance
  *   The event instance being deleted.
  */
 function hook_recurring_events_save_post_instance_deletion(EventSeries $event_series, EventInstance $event_instance) {
diff --git a/recurring_events.module b/recurring_events.module
index fb80cabe..4902fe0f 100644
--- a/recurring_events.module
+++ b/recurring_events.module
@@ -676,7 +676,7 @@ function recurring_events_recurring_events_event_instances_pre_create_alter(arra
 /**
  * Implements callback_allowed_values_function().
  */
-function recurring_events_allowed_values_function(FieldStorageDefinitionInterface $definition, FieldableEntityInterface $entity = NULL) {
+function recurring_events_allowed_values_function(FieldStorageDefinitionInterface $definition, ?FieldableEntityInterface $entity = NULL) {
   $values = ['custom' => t('Custom/Single Event')];
   $fields = \Drupal::service('entity_field.manager')->getBaseFieldDefinitions('eventseries');
   foreach ($fields as $field) {
diff --git a/src/Controller/EventInstanceController.php b/src/Controller/EventInstanceController.php
index 93d69a1a..10865482 100644
--- a/src/Controller/EventInstanceController.php
+++ b/src/Controller/EventInstanceController.php
@@ -63,7 +63,7 @@ class EventInstanceController extends ControllerBase implements ContainerInjecti
    *   The renderer service.
    * @param \Drupal\system\SystemManager $systemManager
    *   System manager service.
-   * @param Drupal\Core\Language\LanguageManagerInterface $language_manager
+   * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
    *   The language manager service.
    */
   public function __construct(DateFormatterInterface $date_formatter, RendererInterface $renderer, SystemManager $systemManager, LanguageManagerInterface $language_manager) {
diff --git a/src/EventCreationService.php b/src/EventCreationService.php
index 7eecac8b..d4b23d78 100644
--- a/src/EventCreationService.php
+++ b/src/EventCreationService.php
@@ -144,9 +144,9 @@ class EventCreationService {
   /**
    * Check whether there have been form recurring configuration changes.
    *
-   * @param Drupal\recurring_events\Entity\EventSeries $event
+   * @param \Drupal\recurring_events\Entity\EventSeries $event
    *   The stored event series entity.
-   * @param Drupal\Core\Form\FormStateInterface $form_state
+   * @param \Drupal\Core\Form\FormStateInterface $form_state
    *   The form state of an updated event series entity.
    *
    * @return bool
@@ -163,9 +163,9 @@ class EventCreationService {
   /**
    * Check whether there have been original recurring configuration changes.
    *
-   * @param Drupal\recurring_events\Entity\EventSeries $event
+   * @param \Drupal\recurring_events\Entity\EventSeries $event
    *   The stored event series entity.
-   * @param Drupal\recurring_events\Entity\EventSeries $original
+   * @param \Drupal\recurring_events\Entity\EventSeries $original
    *   The original stored event series entity.
    *
    * @return bool
@@ -182,7 +182,7 @@ class EventCreationService {
   /**
    * Converts an EventSeries entity's recurring configuration to an array.
    *
-   * @param Drupal\recurring_events\Entity\EventSeries $event
+   * @param \Drupal\recurring_events\Entity\EventSeries $event
    *   The stored event series entity.
    *
    * @return array
@@ -211,7 +211,7 @@ class EventCreationService {
   /**
    * Converts a form state object's recurring configuration to an array.
    *
-   * @param Drupal\Core\Form\FormStateInterface $form_state
+   * @param \Drupal\Core\Form\FormStateInterface $form_state
    *   The form state of an updated event series entity.
    *
    * @return array
@@ -298,17 +298,17 @@ class EventCreationService {
   /**
    * Build diff array between stored entity and form state.
    *
-   * @param Drupal\recurring_events\Entity\EventSeries $event
+   * @param \Drupal\recurring_events\Entity\EventSeries $event
    *   The stored event series entity.
-   * @param Drupal\Core\Form\FormStateInterface $form_state
+   * @param \Drupal\Core\Form\FormStateInterface|null $form_state
    *   (Optional) The form state of an updated event series entity.
-   * @param Drupal\recurring_events\Entity\EventSeries $edited
+   * @param \Drupal\recurring_events\Entity\EventSeries|null $edited
    *   (Optional) The edited event series entity.
    *
    * @return array
    *   An array of differences.
    */
-  public function buildDiffArray(EventSeries $event, FormStateInterface $form_state = NULL, EventSeries $edited = NULL) {
+  public function buildDiffArray(EventSeries $event, ?FormStateInterface $form_state = NULL, ?EventSeries $edited = NULL) {
     $diff = [];
 
     $entity_config = $this->convertEntityConfigToArray($event);
@@ -397,7 +397,7 @@ class EventCreationService {
   /**
    * Clear out existing event instances..
    *
-   * @param Drupal\recurring_events\Entity\EventSeries $event
+   * @param \Drupal\recurring_events\Entity\EventSeries $event
    *   The event series entity.
    */
   public function clearEventInstances(EventSeries $event) {
@@ -527,11 +527,11 @@ class EventCreationService {
   /**
    * Create an event instance from an event series.
    *
-   * @param Drupal\recurring_events\Entity\EventSeries $event
+   * @param \Drupal\recurring_events\Entity\EventSeries $event
    *   The stored event series entity.
-   * @param Drupal\Core\Datetime\DrupalDateTime $start_date
+   * @param \Drupal\Core\Datetime\DrupalDateTime $start_date
    *   The start date and time of the event.
-   * @param Drupal\Core\Datetime\DrupalDateTime $end_date
+   * @param \Drupal\Core\Datetime\DrupalDateTime $end_date
    *   The end date and time of the event.
    *
    * @return \Drupal\recurring_events\Entity\EventInstance
@@ -590,12 +590,13 @@ class EventCreationService {
   /**
    * Configure the default field inheritances for event instances.
    *
-   * @param Drupal\recurring_events\Entity\EventInstance $instance
+   * @param \Drupal\recurring_events\Entity\EventInstance $instance
    *   The event instance.
-   * @param int $series_id
-   *   The event series entity ID.
+   * @param int|null $series_id
+   *   Optional event series entity ID. If omitted, the event series ID will be
+   *   taken from the instance.
    */
-  public function configureDefaultInheritances(EventInstance $instance, int $series_id = NULL) {
+  public function configureDefaultInheritances(EventInstance $instance, ?int $series_id = NULL) {
     if (is_null($series_id)) {
       $series_id = $instance->eventseries_id->target_id;
     }
@@ -636,9 +637,9 @@ class EventCreationService {
   /**
    * When adding a new field inheritance, add the default values for it.
    *
-   * @param Drupal\recurring_events\Entity\EventInstance $instance
+   * @param \Drupal\recurring_events\Entity\EventInstance $instance
    *   The event instance for which to configure default inheritance values.
-   * @param Drupal\field_inheritance\Entity\FieldInheritanceInterface $field_inheritance
+   * @param \Drupal\field_inheritance\Entity\FieldInheritanceInterface $field_inheritance
    *   The field inheritance being created or updated.
    */
   public function addNewDefaultInheritance(EventInstance $instance, FieldInheritanceInterface $field_inheritance) {
@@ -747,9 +748,9 @@ class EventCreationService {
   /**
    * Update instance status.
    *
-   * @param Drupal\recurring_events\Entity\EventInstance $instance
+   * @param \Drupal\recurring_events\Entity\EventInstance $instance
    *   The event instance for which to update the status.
-   * @param Drupal\recurring_events\Entity\EventSeries $event
+   * @param \Drupal\recurring_events\Entity\EventSeries $event
    *   The event series entity.
    */
   public function updateInstanceStatus(EventInstance $instance, EventSeries $event) {
diff --git a/src/Form/EventInstanceDeleteForm.php b/src/Form/EventInstanceDeleteForm.php
index 9cbf719f..e0532a80 100644
--- a/src/Form/EventInstanceDeleteForm.php
+++ b/src/Form/EventInstanceDeleteForm.php
@@ -45,16 +45,16 @@ class EventInstanceDeleteForm extends ContentEntityDeleteForm {
    *
    * @param \Drupal\Core\Entity\EntityRepositoryInterface $entity_repository
    *   The entity repository service.
-   * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info
+   * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface|null $entity_type_bundle_info
    *   The entity type bundle info interface.
-   * @param \Drupal\Component\Datetime\TimeInterface $time
+   * @param \Drupal\Component\Datetime\TimeInterface|null $time
    *   The time interface.
    * @param \Drupal\Core\Messenger\Messenger $messenger
    *   The messenger service.
    * @param \Drupal\Core\Datetime\DateFormatter $date_formatter
    *   The date formatter service.
    */
-  public function __construct(EntityRepositoryInterface $entity_repository, EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, TimeInterface $time = NULL, Messenger $messenger, DateFormatter $date_formatter) {
+  public function __construct(EntityRepositoryInterface $entity_repository, ?EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, ?TimeInterface $time = NULL, Messenger $messenger, DateFormatter $date_formatter) {
     parent::__construct($entity_repository, $entity_type_bundle_info, $time);
     $this->messenger = $messenger;
     $this->dateFormatter = $date_formatter;
diff --git a/src/Form/EventInstanceSettingsForm.php b/src/Form/EventInstanceSettingsForm.php
index 6fb15a9d..c3971f2b 100644
--- a/src/Form/EventInstanceSettingsForm.php
+++ b/src/Form/EventInstanceSettingsForm.php
@@ -36,7 +36,7 @@ class EventInstanceSettingsForm extends ConfigFormBase {
    *
    * @param array $form
    *   An associative array containing the structure of the form.
-   * @param Drupal\Core\Form\FormStateInterface $form_state
+   * @param \Drupal\Core\Form\FormStateInterface $form_state
    *   An associative array containing the current state of the form.
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
@@ -53,7 +53,7 @@ class EventInstanceSettingsForm extends ConfigFormBase {
    *
    * @param array $form
    *   An associative array containing the structure of the form.
-   * @param Drupal\Core\Form\FormStateInterface $form_state
+   * @param \Drupal\Core\Form\FormStateInterface $form_state
    *   An associative array containing the current state of the form.
    *
    * @return array
diff --git a/src/Form/EventSeriesDeleteForm.php b/src/Form/EventSeriesDeleteForm.php
index 446cd9c8..7da17ca3 100644
--- a/src/Form/EventSeriesDeleteForm.php
+++ b/src/Form/EventSeriesDeleteForm.php
@@ -67,9 +67,9 @@ class EventSeriesDeleteForm extends ContentEntityDeleteForm {
    *
    * @param \Drupal\Core\Entity\EntityRepositoryInterface $entity_repository
    *   The entity repository service.
-   * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info
+   * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface|null $entity_type_bundle_info
    *   The entity type bundle info interface.
-   * @param \Drupal\Component\Datetime\TimeInterface $time
+   * @param \Drupal\Component\Datetime\TimeInterface|null $time
    *   The time interface.
    * @param \Drupal\Core\Messenger\Messenger $messenger
    *   The messenger service.
@@ -78,7 +78,7 @@ class EventSeriesDeleteForm extends ContentEntityDeleteForm {
    * @param \Drupal\Core\Config\ConfigFactory $config
    *   The config factory service.
    */
-  public function __construct(EntityRepositoryInterface $entity_repository, EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, TimeInterface $time = NULL, Messenger $messenger, Renderer $renderer, ConfigFactory $config) {
+  public function __construct(EntityRepositoryInterface $entity_repository, ?EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, ?TimeInterface $time = NULL, Messenger $messenger, Renderer $renderer, ConfigFactory $config) {
     $this->messenger = $messenger;
     $this->renderer = $renderer;
     $this->config = $config;
diff --git a/src/Form/EventSeriesForm.php b/src/Form/EventSeriesForm.php
index 0e32de66..0e5ec137 100644
--- a/src/Form/EventSeriesForm.php
+++ b/src/Form/EventSeriesForm.php
@@ -141,18 +141,31 @@ class EventSeriesForm extends ContentEntityForm {
    *   The field type plugin manager.
    * @param \Drupal\Core\Entity\EntityRepositoryInterface $entity_repository
    *   The entity repository interface.
-   * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info
+   * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface|null $entity_type_bundle_info
    *   The entity type bundle info interface.
-   * @param \Drupal\Component\Datetime\TimeInterface $time
+   * @param \Drupal\Component\Datetime\TimeInterface|null $time
    *   The time interface.
-   * @param \Drupal\Core\Session\AccountProxyInterface $current_user
+   * @param \Drupal\Core\Session\AccountProxyInterface|null $current_user
    *   The current user.
-   * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
+   * @param \Drupal\Core\Extension\ModuleHandlerInterface|null $module_handler
    *   The module handler service.
-   * @param \Drupal\Core\Config\ConfigFactory $config_factory
+   * @param \Drupal\Core\Config\ConfigFactory|null $config_factory
    *   The config factory.
    */
-  public function __construct(EventCreationService $creation_service, EntityStorageInterface $storage, Messenger $messenger, DateFormatter $date_formatter, EntityFieldManager $entity_field_manager, FieldTypePluginManager $field_type_plugin_manager, EntityRepositoryInterface $entity_repository, EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, TimeInterface $time = NULL, AccountProxyInterface $current_user = NULL, ModuleHandlerInterface $module_handler = NULL, ConfigFactory $config_factory = NULL) {
+  public function __construct(
+    EventCreationService $creation_service,
+    EntityStorageInterface $storage,
+    Messenger $messenger,
+    DateFormatter $date_formatter,
+    EntityFieldManager $entity_field_manager,
+    FieldTypePluginManager $field_type_plugin_manager,
+    EntityRepositoryInterface $entity_repository,
+    ?EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL,
+    ?TimeInterface $time = NULL,
+    ?AccountProxyInterface $current_user = NULL,
+    ?ModuleHandlerInterface $module_handler = NULL,
+    ?ConfigFactory $config_factory = NULL,
+  ) {
     $this->creationService = $creation_service;
     $this->storage = $storage;
     $this->messenger = $messenger;
diff --git a/src/Form/EventSeriesSettingsForm.php b/src/Form/EventSeriesSettingsForm.php
index 600aa897..47da1b26 100644
--- a/src/Form/EventSeriesSettingsForm.php
+++ b/src/Form/EventSeriesSettingsForm.php
@@ -76,7 +76,7 @@ class EventSeriesSettingsForm extends ConfigFormBase {
    *
    * @param array $form
    *   An associative array containing the structure of the form.
-   * @param Drupal\Core\Form\FormStateInterface $form_state
+   * @param \Drupal\Core\Form\FormStateInterface $form_state
    *   An associative array containing the current state of the form.
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
@@ -106,7 +106,7 @@ class EventSeriesSettingsForm extends ConfigFormBase {
    *
    * @param array $form
    *   An associative array containing the structure of the form.
-   * @param Drupal\Core\Form\FormStateInterface $form_state
+   * @param \Drupal\Core\Form\FormStateInterface $form_state
    *   An associative array containing the current state of the form.
    *
    * @return array
diff --git a/src/Plugin/Field/FieldType/ConsecutiveRecurringDate.php b/src/Plugin/Field/FieldType/ConsecutiveRecurringDate.php
index d8129dcb..9ebe6785 100644
--- a/src/Plugin/Field/FieldType/ConsecutiveRecurringDate.php
+++ b/src/Plugin/Field/FieldType/ConsecutiveRecurringDate.php
@@ -290,9 +290,9 @@ class ConsecutiveRecurringDate extends DateRangeItem implements RecurringEventsF
   /**
    * Find all the daily date occurrences between two dates.
    *
-   * @param Drupal\Core\Datetime\DrupalDateTime $start_date
+   * @param \Drupal\Core\Datetime\DrupalDateTime $start_date
    *   The start date.
-   * @param Drupal\Core\Datetime\DrupalDateTime $end_date
+   * @param \Drupal\Core\Datetime\DrupalDateTime $end_date
    *   The end date.
    * @param bool $count_only
    *   Whether to only return a count.
@@ -342,7 +342,7 @@ class ConsecutiveRecurringDate extends DateRangeItem implements RecurringEventsF
   /**
    * Find all the time slots between two times of a specific day.
    *
-   * @param Drupal\Core\Datetime\DrupalDateTime $date
+   * @param \Drupal\Core\Datetime\DrupalDateTime $date
    *   The date.
    * @param array $form_data
    *   The form data used to find the time slots.
diff --git a/src/Plugin/Field/FieldType/DailyRecurringDate.php b/src/Plugin/Field/FieldType/DailyRecurringDate.php
index 5f8b01e2..dc3854b1 100644
--- a/src/Plugin/Field/FieldType/DailyRecurringDate.php
+++ b/src/Plugin/Field/FieldType/DailyRecurringDate.php
@@ -258,9 +258,9 @@ class DailyRecurringDate extends DateRangeItem implements RecurringEventsFieldTy
   /**
    * Find all the daily date occurrences between two dates.
    *
-   * @param Drupal\Core\Datetime\DrupalDateTime $start_date
+   * @param \Drupal\Core\Datetime\DrupalDateTime $start_date
    *   The start date.
-   * @param Drupal\Core\Datetime\DrupalDateTime $end_date
+   * @param \Drupal\Core\Datetime\DrupalDateTime $end_date
    *   The end date.
    *
    * @return array
diff --git a/src/Plugin/Field/FieldType/WeeklyRecurringDate.php b/src/Plugin/Field/FieldType/WeeklyRecurringDate.php
index c3c5be20..a41ff0be 100644
--- a/src/Plugin/Field/FieldType/WeeklyRecurringDate.php
+++ b/src/Plugin/Field/FieldType/WeeklyRecurringDate.php
@@ -197,9 +197,9 @@ class WeeklyRecurringDate extends DailyRecurringDate implements RecurringEventsF
    *
    * @param string $weekday
    *   The name of the day of the week.
-   * @param Drupal\Core\Datetime\DrupalDateTime $start_date
+   * @param \Drupal\Core\Datetime\DrupalDateTime $start_date
    *   The start date.
-   * @param Drupal\Core\Datetime\DrupalDateTime $end_date
+   * @param \Drupal\Core\Datetime\DrupalDateTime $end_date
    *   The end date.
    *
    * @return array
diff --git a/src/Plugin/migrate/destination/EntityEventSeries.php b/src/Plugin/migrate/destination/EntityEventSeries.php
index 3df749c0..de618477 100644
--- a/src/Plugin/migrate/destination/EntityEventSeries.php
+++ b/src/Plugin/migrate/destination/EntityEventSeries.php
@@ -2,12 +2,12 @@
 
 namespace Drupal\recurring_events\Plugin\migrate\destination;
 
-use Drupal\migrate\Plugin\migrate\destination\EntityContentBase;
 use Drupal\migrate\Plugin\MigrationInterface;
+use Drupal\migrate\Plugin\migrate\destination\EntityContentBase;
 use Drupal\migrate\Row;
 use Drupal\recurring_events\Entity\EventSeries;
-use Drupal\recurring_events\Plugin\migrate\process\RecurringDate;
 use Drupal\recurring_events\Plugin\migrate\process\RRuleHelper;
+use Drupal\recurring_events\Plugin\migrate\process\RecurringDate;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -85,7 +85,7 @@ class EntityEventSeries extends EntityContentBase {
   /**
    * {@inheritdoc}
    */
-  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration = NULL) {
+  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, ?MigrationInterface $migration = NULL) {
     $instance = parent::create($container, $configuration, $plugin_id, $plugin_definition, $migration);
     $instance->moduleHandler = $container->get('module_handler');
     return $instance;
diff --git a/src/Plugin/views/filter/TaxonomyIndexTidEventSeriesDepth.php b/src/Plugin/views/filter/TaxonomyIndexTidEventSeriesDepth.php
index 62036173..8c383669 100644
--- a/src/Plugin/views/filter/TaxonomyIndexTidEventSeriesDepth.php
+++ b/src/Plugin/views/filter/TaxonomyIndexTidEventSeriesDepth.php
@@ -74,16 +74,16 @@ class TaxonomyIndexTidEventSeriesDepth extends TaxonomyIndexTid {
    *   The vocabulary storage.
    * @param \Drupal\taxonomy\TermStorageInterface $term_storage
    *   The term storage.
-   * @param \Drupal\Core\Session\AccountInterface $current_user
+   * @param \Drupal\Core\Session\AccountInterface|null $current_user
    *   The current user.
-   * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info
+   * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface|null $entity_type_bundle_info
    *   The entity type bundle service.
-   * @param \Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager
+   * @param \Drupal\Core\Entity\EntityFieldManagerInterface|null $entity_field_manager
    *   The entity field manager.
    * @param \Drupal\Core\Database\Connection $database
    *   The database service.
    */
-  public function __construct(array $configuration, $plugin_id, $plugin_definition, VocabularyStorageInterface $vocabulary_storage, TermStorageInterface $term_storage, AccountInterface $current_user = NULL, EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, EntityFieldManagerInterface $entity_field_manager = NULL, Connection $database) {
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, VocabularyStorageInterface $vocabulary_storage, TermStorageInterface $term_storage, ?AccountInterface $current_user = NULL, ?EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, ?EntityFieldManagerInterface $entity_field_manager = NULL, Connection $database) {
     parent::__construct($configuration, $plugin_id, $plugin_definition, $vocabulary_storage, $term_storage, $current_user);
     $this->entityTypeBundleInfo = $entity_type_bundle_info;
     $this->entityFieldManager = $entity_field_manager;
diff --git a/src/RecurringEventsFieldTypeInterface.php b/src/RecurringEventsFieldTypeInterface.php
index 43fbb0ab..2abace41 100644
--- a/src/RecurringEventsFieldTypeInterface.php
+++ b/src/RecurringEventsFieldTypeInterface.php
@@ -13,7 +13,7 @@ interface RecurringEventsFieldTypeInterface {
   /**
    * Converts an EventSeries entity's recurring configuration to an array.
    *
-   * @param Drupal\recurring_events\Entity\EventSeries $event
+   * @param \Drupal\recurring_events\Entity\EventSeries $event
    *   The stored event series entity.
    *
    * @return array
@@ -24,7 +24,7 @@ interface RecurringEventsFieldTypeInterface {
   /**
    * Converts a form state object's recurring configuration to an array.
    *
-   * @param Drupal\Core\Form\FormStateInterface $form_state
+   * @param \Drupal\Core\Form\FormStateInterface $form_state
    *   The form state of an updated event series entity.
    *
    * @return array
diff --git a/tests/src/Unit/Plugin/migrate/destination/EntityEventSeriesTest.php b/tests/src/Unit/Plugin/migrate/destination/EntityEventSeriesTest.php
index 23e0c0e0..c2fefc08 100644
--- a/tests/src/Unit/Plugin/migrate/destination/EntityEventSeriesTest.php
+++ b/tests/src/Unit/Plugin/migrate/destination/EntityEventSeriesTest.php
@@ -8,9 +8,9 @@ use Drupal\Core\Field\FieldTypePluginManagerInterface;
 use Drupal\Core\Language\LanguageInterface;
 use Drupal\Core\Language\LanguageManagerInterface;
 use Drupal\Core\Session\AccountSwitcherInterface;
+use Drupal\Tests\migrate\Unit\Plugin\migrate\destination\EntityTestBase;
 use Drupal\migrate\Row;
 use Drupal\recurring_events\Plugin\migrate\destination\EntityEventSeries;
-use Drupal\Tests\migrate\Unit\Plugin\migrate\destination\EntityTestBase;
 use Prophecy\Argument;
 
 /**
diff --git a/tests/src/Unit/Plugin/migrate/process/RecurringDateTest.php b/tests/src/Unit/Plugin/migrate/process/RecurringDateTest.php
index bd6a403a..6546344a 100644
--- a/tests/src/Unit/Plugin/migrate/process/RecurringDateTest.php
+++ b/tests/src/Unit/Plugin/migrate/process/RecurringDateTest.php
@@ -7,8 +7,8 @@ use Drupal\Core\Language\LanguageInterface;
 use Drupal\Core\Language\LanguageManagerInterface;
 use Drupal\Core\StringTranslation\TranslatableMarkup;
 use Drupal\Core\StringTranslation\TranslationInterface;
-use Drupal\recurring_events\Plugin\migrate\process\RecurringDate;
 use Drupal\Tests\migrate\Unit\process\MigrateProcessTestCase;
+use Drupal\recurring_events\Plugin\migrate\process\RecurringDate;
 use Prophecy\Argument;
 
 /**
-- 
GitLab