diff --git a/core/lib/Drupal/Core/Config/ConfigFactory.php b/core/lib/Drupal/Core/Config/ConfigFactory.php
index 112cd9f311aaed6207b3c5d16cd8da2ef61c3e93..852f1d07b4741b8164237bd28aa7e258e4f64977 100644
--- a/core/lib/Drupal/Core/Config/ConfigFactory.php
+++ b/core/lib/Drupal/Core/Config/ConfigFactory.php
@@ -382,7 +382,7 @@ public function onConfigDelete(ConfigCrudEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[ConfigEvents::SAVE][] = ['onConfigSave', 255];
     $events[ConfigEvents::DELETE][] = ['onConfigDelete', 255];
     return $events;
diff --git a/core/lib/Drupal/Core/Config/ConfigFactoryOverrideBase.php b/core/lib/Drupal/Core/Config/ConfigFactoryOverrideBase.php
index 82e066965e9dd32387f36fccae7eb0bc056fbb42..c859f7f9fcbb4d06df18d541f7c584e7bb3ba7e8 100644
--- a/core/lib/Drupal/Core/Config/ConfigFactoryOverrideBase.php
+++ b/core/lib/Drupal/Core/Config/ConfigFactoryOverrideBase.php
@@ -44,7 +44,7 @@ abstract public function onConfigRename(ConfigRenameEvent $event);
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[ConfigEvents::COLLECTION_INFO][] = ['addCollections'];
     $events[ConfigEvents::SAVE][] = ['onConfigSave', 20];
     $events[ConfigEvents::DELETE][] = ['onConfigDelete', 20];
diff --git a/core/lib/Drupal/Core/Config/ConfigImportValidateEventSubscriberBase.php b/core/lib/Drupal/Core/Config/ConfigImportValidateEventSubscriberBase.php
index 13263656cd1dc273b13c9cb97ce6a92f6aea7b04..1d1a5f58d9033e91bb3b79616353a444023ee2d5 100644
--- a/core/lib/Drupal/Core/Config/ConfigImportValidateEventSubscriberBase.php
+++ b/core/lib/Drupal/Core/Config/ConfigImportValidateEventSubscriberBase.php
@@ -22,7 +22,7 @@ abstract public function onConfigImporterValidate(ConfigImporterEvent $event);
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[ConfigEvents::IMPORT_VALIDATE][] = ['onConfigImporterValidate', 20];
     return $events;
   }
diff --git a/core/lib/Drupal/Core/Config/Development/ConfigSchemaChecker.php b/core/lib/Drupal/Core/Config/Development/ConfigSchemaChecker.php
index acd39b49feecb7ee442e1b36810d9c529fe03c27..428428d5c10f813f3c648a107aa0a414cb4bcbd3 100644
--- a/core/lib/Drupal/Core/Config/Development/ConfigSchemaChecker.php
+++ b/core/lib/Drupal/Core/Config/Development/ConfigSchemaChecker.php
@@ -99,7 +99,7 @@ public function onConfigSave(ConfigCrudEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[ConfigEvents::SAVE][] = ['onConfigSave', 255];
     return $events;
   }
diff --git a/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php b/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php
index 15d18cfc0049d0cbc2ae679724fc203218972386..889a535a1280cf09571590fc3d8597d519c912b6 100644
--- a/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php
+++ b/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php
@@ -249,7 +249,7 @@ public function onConfigDelete(ConfigCrudEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[ConfigEvents::SAVE][] = ['onConfigSave', 128];
     $events[ConfigEvents::DELETE][] = ['onConfigDelete', 128];
     return $events;
diff --git a/core/lib/Drupal/Core/Config/Importer/FinalMissingContentSubscriber.php b/core/lib/Drupal/Core/Config/Importer/FinalMissingContentSubscriber.php
index 3dca3fbf00147482e9aca4090e25757bf5068028..186aa95ae1256d27fa0fd0959e8dbc738ad8aa77 100644
--- a/core/lib/Drupal/Core/Config/Importer/FinalMissingContentSubscriber.php
+++ b/core/lib/Drupal/Core/Config/Importer/FinalMissingContentSubscriber.php
@@ -30,7 +30,7 @@ public function onMissingContent(MissingContentEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // This should always be the final event as it will mark all content
     // dependencies as resolved.
     $events[ConfigEvents::IMPORT_MISSING_CONTENT][] = ['onMissingContent', -1024];
diff --git a/core/lib/Drupal/Core/Database/ReplicaKillSwitch.php b/core/lib/Drupal/Core/Database/ReplicaKillSwitch.php
index 584a97c67b3958772b22bb657a357040702b0e65..d5ac045d8a73c4522f0af6ae4bf7afd3e98fe4fe 100644
--- a/core/lib/Drupal/Core/Database/ReplicaKillSwitch.php
+++ b/core/lib/Drupal/Core/Database/ReplicaKillSwitch.php
@@ -105,7 +105,7 @@ public function checkReplicaServer(RequestEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::REQUEST][] = ['checkReplicaServer'];
     return $events;
   }
diff --git a/core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php b/core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php
index d70f2ce0743cb13b9f4f52b43609fde209dd1523..7fdf31912a69851568f46d72cb6ef1526c9bd3c7 100644
--- a/core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php
+++ b/core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php
@@ -245,7 +245,7 @@ public static function setLinkActiveClass($html_markup, $current_path, $is_front
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Should run after any other response subscriber that modifies the markup.
     $events[KernelEvents::RESPONSE][] = ['onResponse', -512];
 
diff --git a/core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php
index 5f730dcf4d4f002efec16cd9f366c1fbd183f9df..266dfc6a82385d6aba8da55f3f2e40c19801b2be 100644
--- a/core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php
@@ -109,7 +109,7 @@ public function onResponse(ResponseEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::RESPONSE][] = ['onResponse', -100];
     $events[KernelEvents::REQUEST][] = ['onRequest', 50];
 
diff --git a/core/lib/Drupal/Core/EventSubscriber/AnonymousUserResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/AnonymousUserResponseSubscriber.php
index efb26ac7a556575c25fa77350196c090f3c46c49..be4505f539db0217f20b558ef67e016e809c6d41 100644
--- a/core/lib/Drupal/Core/EventSubscriber/AnonymousUserResponseSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/AnonymousUserResponseSubscriber.php
@@ -71,7 +71,7 @@ public function onRespond(ResponseEvent $event) {
    * @return array
    *   An array of event listener definitions.
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Priority 5, so that it runs before FinishResponseSubscriber, but after
     // event subscribers that add the associated cacheability metadata (which
     // have priority 10). This one is conditional, so must run after those.
diff --git a/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php
index 129cd692bf5693e7b9be64101434ef8273274d00..659805f0393b59677c6e711d4b6d3a125f26bfcf 100644
--- a/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php
@@ -140,7 +140,7 @@ public function onExceptionAccessDenied(ExceptionEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // The priority for authentication must be higher than the highest event
     // subscriber accessing the current user. Especially it must be higher than
     // LanguageRequestSubscriber as LanguageManager accesses the current user if
diff --git a/core/lib/Drupal/Core/EventSubscriber/CacheRouterRebuildSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/CacheRouterRebuildSubscriber.php
index c1f532799efceec69df15b02d43d8a2aa3c5538b..c65fd87c4506af30dd6dce38c1886f77d75410d0 100644
--- a/core/lib/Drupal/Core/EventSubscriber/CacheRouterRebuildSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/CacheRouterRebuildSubscriber.php
@@ -23,7 +23,7 @@ public function onRouterFinished() {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events = [];
     // Act only when the router rebuild is finished.
     $events[RoutingEvents::FINISHED][] = ['onRouterFinished', 200];
diff --git a/core/lib/Drupal/Core/EventSubscriber/ClientErrorResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/ClientErrorResponseSubscriber.php
index ea5b046781ccd49829df027269879f3b247a4b43..0e37c1e96e35c2053cf70e4981c5b359e081a9ef 100644
--- a/core/lib/Drupal/Core/EventSubscriber/ClientErrorResponseSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/ClientErrorResponseSubscriber.php
@@ -39,7 +39,7 @@ public function onRespond(ResponseEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Priority 10, so that it runs before FinishResponseSubscriber, which will
     // expose the cacheability metadata in the form of headers.
     $events[KernelEvents::RESPONSE][] = ['onRespond', 10];
diff --git a/core/lib/Drupal/Core/EventSubscriber/ConfigSnapshotSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/ConfigSnapshotSubscriber.php
index 20e0cd6773f012fa9599bfcf1adbbfa1c1a4ecfb..1cd5162ac2ac93e4d51516dcd2a76ef43f496ad9 100644
--- a/core/lib/Drupal/Core/EventSubscriber/ConfigSnapshotSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/ConfigSnapshotSubscriber.php
@@ -66,7 +66,7 @@ public function onConfigImporterImport(ConfigImporterEvent $event) {
    * @return array
    *   An array of event listener definitions.
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[ConfigEvents::IMPORT][] = ['onConfigImporterImport', 40];
     return $events;
   }
diff --git a/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php
index f904bc5f7a2232d77f5b59810b9df3a2a36378a2..56ff7b1379b8790c8322ac815c0a3db89ba012ea 100644
--- a/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php
@@ -166,7 +166,7 @@ protected function wrapControllerExecutionInRenderContext($controller, array $ar
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::CONTROLLER][] = ['onController'];
 
     return $events;
diff --git a/core/lib/Drupal/Core/EventSubscriber/EnforcedFormResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/EnforcedFormResponseSubscriber.php
index e3c4a8720395bb3b6f52c5b59abf3b1bcb8d7cc2..19a156d7caecdbc4f8e9f7c1df07ce3abc04a351 100644
--- a/core/lib/Drupal/Core/EventSubscriber/EnforcedFormResponseSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/EnforcedFormResponseSubscriber.php
@@ -36,7 +36,7 @@ public function onKernelResponse(ResponseEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::EXCEPTION] = ['onKernelException', 128];
     $events[KernelEvents::RESPONSE] = ['onKernelResponse', 128];
 
diff --git a/core/lib/Drupal/Core/EventSubscriber/EntityRouteAlterSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/EntityRouteAlterSubscriber.php
index bca8f684b1c0282ea2399b1ad9d9ec4fa804a226..5aaafc170a7cf0587417d7915da721d1224d72a3 100644
--- a/core/lib/Drupal/Core/EventSubscriber/EntityRouteAlterSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/EntityRouteAlterSubscriber.php
@@ -52,7 +52,7 @@ public function onRoutingRouteAlterSetType(RouteBuildEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[RoutingEvents::ALTER][] = ['onRoutingRouteAlterSetType', -150];
     return $events;
   }
diff --git a/core/lib/Drupal/Core/EventSubscriber/EntityRouteProviderSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/EntityRouteProviderSubscriber.php
index 8246f784ddfa7bdbbf179728eea524bc19f7047f..f00395433e2d04317020a9c9a3fcd48c656c58b8 100644
--- a/core/lib/Drupal/Core/EventSubscriber/EntityRouteProviderSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/EntityRouteProviderSubscriber.php
@@ -62,7 +62,7 @@ public function onDynamicRouteEvent(RouteBuildEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[RoutingEvents::DYNAMIC][] = ['onDynamicRouteEvent'];
     return $events;
   }
diff --git a/core/lib/Drupal/Core/EventSubscriber/ExceptionDetectNeedsInstallSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/ExceptionDetectNeedsInstallSubscriber.php
index ae0fcbebdbd6e3dd3cc0100519bcd429b71b7aa0..9c75d90b85583335a6416192ae0b9309390184a4 100644
--- a/core/lib/Drupal/Core/EventSubscriber/ExceptionDetectNeedsInstallSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/ExceptionDetectNeedsInstallSubscriber.php
@@ -57,7 +57,7 @@ public function onException(ExceptionEvent $event) {
    * @return array
    *   An array of event listener definitions.
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::EXCEPTION][] = ['onException', 100];
     return $events;
   }
diff --git a/core/lib/Drupal/Core/EventSubscriber/ExceptionLoggingSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/ExceptionLoggingSubscriber.php
index 6b4bd1f14e66469f0f06a97fe382d9b5c872de2f..83e22bf9d28375a8c7270da9e28b41bc2959237a 100644
--- a/core/lib/Drupal/Core/EventSubscriber/ExceptionLoggingSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/ExceptionLoggingSubscriber.php
@@ -100,7 +100,7 @@ public function onException(ExceptionEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::EXCEPTION][] = ['onException', 50];
     return $events;
   }
diff --git a/core/lib/Drupal/Core/EventSubscriber/ExcludedModulesEventSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/ExcludedModulesEventSubscriber.php
index 93884d2b28e1f68e3d8dfd340d54a4015603b956..4f18c888dddb4eace130b105509f0e203bfbfc99 100644
--- a/core/lib/Drupal/Core/EventSubscriber/ExcludedModulesEventSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/ExcludedModulesEventSubscriber.php
@@ -54,7 +54,7 @@ public function __construct(StorageInterface $active_storage, Settings $settings
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // React early on export and late on import.
     return [
       'config.transform.import' => ['onConfigTransformImport', -500],
diff --git a/core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php
index 7c641fbc73ace23444410c33309bc3a1e75655b4..c940fea3ba5b3551ce903511ce60c5eafd5b0dfb 100644
--- a/core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php
@@ -141,7 +141,7 @@ public function onException(ExceptionEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Run as the final (very late) KernelEvents::EXCEPTION subscriber.
     $events[KernelEvents::EXCEPTION][] = ['onException', -256];
     return $events;
diff --git a/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php
index 9d70038a787f4089685a1f5d28091e551f05627e..bdbf05c1e0c554f8e330b7ef3a104214d92e0086 100644
--- a/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php
@@ -315,7 +315,7 @@ protected function setExpiresNoCache(Response $response) {
    * @return array
    *   An array of event listener definitions.
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::RESPONSE][] = ['onRespond'];
     // There is no specific reason for choosing 16 beside it should be executed
     // before ::onRespond().
diff --git a/core/lib/Drupal/Core/EventSubscriber/HtmlResponsePlaceholderStrategySubscriber.php b/core/lib/Drupal/Core/EventSubscriber/HtmlResponsePlaceholderStrategySubscriber.php
index 7db706f3b0160dc1703143a48448b687d5ee4d00..8b9ab1d016382a13304facca26952c4efda88826 100644
--- a/core/lib/Drupal/Core/EventSubscriber/HtmlResponsePlaceholderStrategySubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/HtmlResponsePlaceholderStrategySubscriber.php
@@ -61,7 +61,7 @@ public function onRespond(ResponseEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Run shortly before HtmlResponseSubscriber.
     $events[KernelEvents::RESPONSE][] = ['onRespond', 5];
     return $events;
diff --git a/core/lib/Drupal/Core/EventSubscriber/HtmlResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/HtmlResponseSubscriber.php
index 0526bbcc9b5dc5a72b08c8ff556b0ef29b2e4fdc..df02677d694d20811bc235a3538495347d216d73 100644
--- a/core/lib/Drupal/Core/EventSubscriber/HtmlResponseSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/HtmlResponseSubscriber.php
@@ -48,7 +48,7 @@ public function onRespond(ResponseEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::RESPONSE][] = ['onRespond'];
     return $events;
   }
diff --git a/core/lib/Drupal/Core/EventSubscriber/HttpExceptionSubscriberBase.php b/core/lib/Drupal/Core/EventSubscriber/HttpExceptionSubscriberBase.php
index 7aa00f8557bcd2f366aeaef92faa8487c7a85b98..9ace7c25292cab64c7e277cde9a40d310da417ba 100644
--- a/core/lib/Drupal/Core/EventSubscriber/HttpExceptionSubscriberBase.php
+++ b/core/lib/Drupal/Core/EventSubscriber/HttpExceptionSubscriberBase.php
@@ -120,7 +120,7 @@ public function onException(ExceptionEvent $event) {
    * @return array
    *   An array of event listener definitions.
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::EXCEPTION][] = ['onException', static::getPriority()];
     return $events;
   }
diff --git a/core/lib/Drupal/Core/EventSubscriber/KernelDestructionSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/KernelDestructionSubscriber.php
index 331a5d59484a104528f74a9ee6737dbef0c4c085..dfc7ab30b25aae129436fc0d30879b20788408bf 100644
--- a/core/lib/Drupal/Core/EventSubscriber/KernelDestructionSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/KernelDestructionSubscriber.php
@@ -59,7 +59,7 @@ public function onKernelTerminate(TerminateEvent $event) {
    * @return array
    *   An array of event listener definitions.
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::TERMINATE][] = ['onKernelTerminate', 100];
     return $events;
   }
diff --git a/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php
index 8ad4aadae857f8f23d2cdaae8e9e11e4200459df..a4c42695b95ea0a02da850e00964acb2b656478c 100644
--- a/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php
@@ -101,7 +101,7 @@ public function onViewRenderArray(ViewEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::VIEW][] = ['onViewRenderArray'];
 
     return $events;
diff --git a/core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php
index 06a126333499796a7af8dad66cb2c6aec9643a6f..579d07d4380fa6a338545f496aabc96ffc3a0bc0 100644
--- a/core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php
@@ -154,7 +154,7 @@ protected function getSiteMaintenanceMessage() {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::REQUEST][] = ['onKernelRequestMaintenance', 30];
     $events[KernelEvents::EXCEPTION][] = ['onKernelRequestMaintenance'];
     return $events;
diff --git a/core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php
index 621cdeb7e50a4ccc329af1a453fd71752119c7f2..b94aa9fa5bdf9a0b2f23f023814aeb8399823c23 100644
--- a/core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php
@@ -101,7 +101,7 @@ protected function menuLinksRebuild() {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Run after CachedRouteRebuildSubscriber.
     $events[RoutingEvents::FINISHED][] = ['onRouterRebuild', 100];
     return $events;
diff --git a/core/lib/Drupal/Core/EventSubscriber/OptionsRequestSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/OptionsRequestSubscriber.php
index 018ab6575d3debc08e37eed2f662124019a9ea2a..66f557108152c630e9a9e95995f87c65e2aa2eb6 100644
--- a/core/lib/Drupal/Core/EventSubscriber/OptionsRequestSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/OptionsRequestSubscriber.php
@@ -60,7 +60,7 @@ public function onRequest(RequestEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Set a high priority so it is executed before routing.
     $events[KernelEvents::REQUEST][] = ['onRequest', 1000];
     return $events;
diff --git a/core/lib/Drupal/Core/EventSubscriber/ParamConverterSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/ParamConverterSubscriber.php
index 3b12516853168c1ce5db80db1cf8c5cc05f18b07..0e3952753ee3c8d9505d82d97c2f10fd1bb3e447 100644
--- a/core/lib/Drupal/Core/EventSubscriber/ParamConverterSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/ParamConverterSubscriber.php
@@ -43,7 +43,7 @@ public function onRoutingRouteAlterSetParameterConverters(RouteBuildEvent $event
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Run after \Drupal\system\EventSubscriber\AdminRouteSubscriber.
     $events[RoutingEvents::ALTER][] = ['onRoutingRouteAlterSetParameterConverters', -220];
     return $events;
diff --git a/core/lib/Drupal/Core/EventSubscriber/PathRootsSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/PathRootsSubscriber.php
index 0ded041a26b1bf012370cf04a92965bf6edf99ba..508e111650b4169e6b7f300b9b2ca8d09fa480f5 100644
--- a/core/lib/Drupal/Core/EventSubscriber/PathRootsSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/PathRootsSubscriber.php
@@ -64,7 +64,7 @@ public function onRouteFinished() {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events = [];
     // Try to set a low priority to ensure that all routes are already added.
     $events[RoutingEvents::ALTER][] = ['onRouteAlter', -1024];
diff --git a/core/lib/Drupal/Core/EventSubscriber/PsrResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/PsrResponseSubscriber.php
index e5d920900d243a78264b6b02fe8571fbe946cc06..85c788aa3099bb0aea904632bd20d11747696e32 100644
--- a/core/lib/Drupal/Core/EventSubscriber/PsrResponseSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/PsrResponseSubscriber.php
@@ -49,7 +49,7 @@ public function onKernelView(ViewEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::VIEW][] = ['onKernelView'];
     return $events;
   }
diff --git a/core/lib/Drupal/Core/EventSubscriber/RedirectLeadingSlashesSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/RedirectLeadingSlashesSubscriber.php
index 2b4eb93b39cdf38d629a68338820ada889f81544..dce347bcf7bdae8c65f5336f6d99d8052b851b80 100644
--- a/core/lib/Drupal/Core/EventSubscriber/RedirectLeadingSlashesSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/RedirectLeadingSlashesSubscriber.php
@@ -41,7 +41,7 @@ public function redirect(RequestEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::REQUEST][] = ['redirect', 1000];
     return $events;
   }
diff --git a/core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php
index afd22cda3b31fbe2745d53e674808627852eae2c..6add632887ccaadb6fbe224c07e00872af53021c 100644
--- a/core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php
@@ -134,7 +134,7 @@ protected function getDestinationAsAbsoluteUrl($destination, $scheme_and_host) {
    * @return array
    *   An array of event listener definitions.
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::RESPONSE][] = ['checkRedirectUrl'];
     return $events;
   }
diff --git a/core/lib/Drupal/Core/EventSubscriber/RenderArrayNonHtmlSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/RenderArrayNonHtmlSubscriber.php
index f88b91b3f2122feaa4f78be79181dd8357797c74..c6f20372cd25fcfd5241f2f4f807eea072f31f25 100644
--- a/core/lib/Drupal/Core/EventSubscriber/RenderArrayNonHtmlSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/RenderArrayNonHtmlSubscriber.php
@@ -34,7 +34,7 @@ public function onRespond(ViewEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::VIEW][] = ['onRespond', -10];
     return $events;
   }
diff --git a/core/lib/Drupal/Core/EventSubscriber/RequestCloseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/RequestCloseSubscriber.php
index 88a77dba299401bf9b7b4afac1e557dca1338bad..bfde31939b49345bf8a040ec55e065ef0fccfbf9 100644
--- a/core/lib/Drupal/Core/EventSubscriber/RequestCloseSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/RequestCloseSubscriber.php
@@ -48,7 +48,7 @@ public function onTerminate(TerminateEvent $event) {
    * @return array
    *   An array of event listener definitions.
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::TERMINATE][] = ['onTerminate', 100];
 
     return $events;
diff --git a/core/lib/Drupal/Core/EventSubscriber/ResponseGeneratorSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/ResponseGeneratorSubscriber.php
index 2b5c1461a99bf1929635778b45f2c82f00e08001..37d8cfdd7abdb074d55a41c588ba125e5e927269 100644
--- a/core/lib/Drupal/Core/EventSubscriber/ResponseGeneratorSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/ResponseGeneratorSubscriber.php
@@ -32,7 +32,7 @@ public function onRespond(ResponseEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::RESPONSE][] = ['onRespond'];
     return $events;
   }
diff --git a/core/lib/Drupal/Core/EventSubscriber/RouteAccessResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/RouteAccessResponseSubscriber.php
index add077dea5c2d9efae619798498b642efd247878..1ccde84e87d08825f771264b2fc35081f0e58374 100644
--- a/core/lib/Drupal/Core/EventSubscriber/RouteAccessResponseSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/RouteAccessResponseSubscriber.php
@@ -47,7 +47,7 @@ public function onRespond(ResponseEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Priority 10, so that it runs before FinishResponseSubscriber, which will
     // expose the cacheability metadata in the form of headers.
     $events[KernelEvents::RESPONSE][] = ['onRespond', 10];
diff --git a/core/lib/Drupal/Core/EventSubscriber/RouteMethodSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/RouteMethodSubscriber.php
index 31888352137e57f1845efed15183e25cf918b4ea..de7e60c1006a0b66bb65365cb20b53d382fd0f8e 100644
--- a/core/lib/Drupal/Core/EventSubscriber/RouteMethodSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/RouteMethodSubscriber.php
@@ -35,7 +35,7 @@ public function onRouteBuilding(RouteBuildEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Set a higher priority to ensure that routes get the default HTTP methods
     // as early as possible.
     $events[RoutingEvents::ALTER][] = ['onRouteBuilding', 5000];
diff --git a/core/lib/Drupal/Core/EventSubscriber/RssResponseRelativeUrlFilter.php b/core/lib/Drupal/Core/EventSubscriber/RssResponseRelativeUrlFilter.php
index 5da62bd82382938dad44f8e09d15556da6576bbf..593ea902bb351e40bfb3de13b19c3479db373ebd 100644
--- a/core/lib/Drupal/Core/EventSubscriber/RssResponseRelativeUrlFilter.php
+++ b/core/lib/Drupal/Core/EventSubscriber/RssResponseRelativeUrlFilter.php
@@ -70,7 +70,7 @@ protected function transformRootRelativeUrlsToAbsolute($rss_markup, Request $req
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Should run after any other response subscriber that modifies the markup.
     // @see \Drupal\Core\EventSubscriber\ActiveLinkResponseFilter
     $events[KernelEvents::RESPONSE][] = ['onResponse', -512];
diff --git a/core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php b/core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php
index a224b891ae897ebe0353985392457099a154604c..f21cefae6582d6d2ae37f4c4cc75ede073e9274f 100644
--- a/core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php
+++ b/core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php
@@ -156,7 +156,7 @@ protected function formatSize($size) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Run before exception.logger.
     $events[KernelEvents::EXCEPTION] = ['onException', 51];
     // Run before main_content_view_subscriber.
diff --git a/core/lib/Drupal/Core/Routing/Enhancer/ParamConversionEnhancer.php b/core/lib/Drupal/Core/Routing/Enhancer/ParamConversionEnhancer.php
index 445c4fe3f48c37c310227e9022d29979de76a191..819072d6f7e6a2fae0075824a7ddf2c6fdea079e 100644
--- a/core/lib/Drupal/Core/Routing/Enhancer/ParamConversionEnhancer.php
+++ b/core/lib/Drupal/Core/Routing/Enhancer/ParamConversionEnhancer.php
@@ -85,7 +85,7 @@ public function onException(ExceptionEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::EXCEPTION][] = ['onException', 75];
     return $events;
   }
diff --git a/core/lib/Drupal/Core/Routing/RoutePreloader.php b/core/lib/Drupal/Core/Routing/RoutePreloader.php
index f9bc874b69ea38b8cc7aa9818ef72028e5251304..9081941e6c3573dcf867c641cde3691b3ccb708e 100644
--- a/core/lib/Drupal/Core/Routing/RoutePreloader.php
+++ b/core/lib/Drupal/Core/Routing/RoutePreloader.php
@@ -118,7 +118,7 @@ public function onFinishedRoutes() {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Set a really low priority to catch as many as possible routes.
     $events[RoutingEvents::ALTER] = ['onAlterRoutes', -1024];
     $events[RoutingEvents::FINISHED] = ['onFinishedRoutes'];
diff --git a/core/lib/Drupal/Core/Routing/RouteProvider.php b/core/lib/Drupal/Core/Routing/RouteProvider.php
index 24c6f6ea057599a050eaf7fc1425df166068a7c9..beb302f72a302b02c692b7e4336017ef55b7cb71 100644
--- a/core/lib/Drupal/Core/Routing/RouteProvider.php
+++ b/core/lib/Drupal/Core/Routing/RouteProvider.php
@@ -424,7 +424,7 @@ public function reset() {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[RoutingEvents::FINISHED][] = ['reset'];
     return $events;
   }
diff --git a/core/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php b/core/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php
index 0b3f9fd10969b7e5cd3881c50b4af7cb29678000..262172271204f2d5c4f94078e3b72c6dda7eff8e 100644
--- a/core/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php
+++ b/core/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php
@@ -171,7 +171,7 @@ public function hasRebuilt() {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[RoutingEvents::DYNAMIC][] = ['routerRebuilding', 3000];
     $events[RoutingEvents::FINISHED][] = ['routerRebuildFinished', -3000];
     return $events;
diff --git a/core/lib/Drupal/Core/Routing/RouteSubscriberBase.php b/core/lib/Drupal/Core/Routing/RouteSubscriberBase.php
index b6f95840c37b05da9a54ba0a8cfe51516dc35b36..e0ab611b9b7c2f8e4283761337e68ee916ac2921 100644
--- a/core/lib/Drupal/Core/Routing/RouteSubscriberBase.php
+++ b/core/lib/Drupal/Core/Routing/RouteSubscriberBase.php
@@ -21,7 +21,7 @@ abstract protected function alterRoutes(RouteCollection $collection);
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[RoutingEvents::ALTER] = 'onAlterRoutes';
     return $events;
   }
diff --git a/core/lib/Drupal/Core/Test/PerformanceTestRecorder.php b/core/lib/Drupal/Core/Test/PerformanceTestRecorder.php
index 8be037bdf530ac281abe55cfa398558fa4c91218..e896df473749a94f6f4e37dd7b2d2b1cb74abc98 100644
--- a/core/lib/Drupal/Core/Test/PerformanceTestRecorder.php
+++ b/core/lib/Drupal/Core/Test/PerformanceTestRecorder.php
@@ -81,7 +81,7 @@ public function onRouteBuilderFinish() {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events = [];
     $events[RoutingEvents::FINISHED][] = ['onRouteBuilderFinish', -9999999];
     return $events;
diff --git a/core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php b/core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php
index 634ff5f6a4bcddd746fdb70e79bd4f2d7df5ce7c..c237f07ea34d7e1cd0d4feb92a47569514360825 100644
--- a/core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php
+++ b/core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php
@@ -73,7 +73,7 @@ public function onTerminate(TerminateEvent $event) {
    * @return array
    *   An array of event listener definitions.
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     return [KernelEvents::TERMINATE => [['onTerminate', 100]]];
   }
 
diff --git a/core/modules/big_pipe/src/EventSubscriber/HtmlResponseBigPipeSubscriber.php b/core/modules/big_pipe/src/EventSubscriber/HtmlResponseBigPipeSubscriber.php
index 08b03f97dce4216fc1f8fe1245cd85cf09fdf907..e818522a69ffae32c87434d154a9c1f0e44bbf50 100644
--- a/core/modules/big_pipe/src/EventSubscriber/HtmlResponseBigPipeSubscriber.php
+++ b/core/modules/big_pipe/src/EventSubscriber/HtmlResponseBigPipeSubscriber.php
@@ -112,7 +112,7 @@ protected function getBigPipeService(ResponseEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Run after HtmlResponsePlaceholderStrategySubscriber (priority 5), i.e.
     // after BigPipeStrategy has been applied, but before normal (priority 0)
     // response subscribers have been applied, because by then it'll be too late
diff --git a/core/modules/big_pipe/src/EventSubscriber/NoBigPipeRouteAlterSubscriber.php b/core/modules/big_pipe/src/EventSubscriber/NoBigPipeRouteAlterSubscriber.php
index 8b3c9c23a7c8cd2cd15815c3c115d99fb2d6cf45..1ba1702e3cb32010142f36437f8121b6b41d12c0 100644
--- a/core/modules/big_pipe/src/EventSubscriber/NoBigPipeRouteAlterSubscriber.php
+++ b/core/modules/big_pipe/src/EventSubscriber/NoBigPipeRouteAlterSubscriber.php
@@ -40,7 +40,7 @@ public function onRoutingRouteAlterSetNoBigPipe(RouteBuildEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[RoutingEvents::ALTER][] = ['onRoutingRouteAlterSetNoBigPipe'];
     return $events;
   }
diff --git a/core/modules/big_pipe/tests/modules/big_pipe_test/src/EventSubscriber/BigPipeTestSubscriber.php b/core/modules/big_pipe/tests/modules/big_pipe_test/src/EventSubscriber/BigPipeTestSubscriber.php
index 5bf8d5a3b34f62c8139aed263a0e59f8e91042c4..c21d153acec651448e9e78a0a56aff1c45c7f574 100644
--- a/core/modules/big_pipe/tests/modules/big_pipe_test/src/EventSubscriber/BigPipeTestSubscriber.php
+++ b/core/modules/big_pipe/tests/modules/big_pipe_test/src/EventSubscriber/BigPipeTestSubscriber.php
@@ -71,7 +71,7 @@ public function onRespondSetBigPipeDebugPlaceholderHeaders(ResponseEvent $event)
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Run just before \Drupal\big_pipe\EventSubscriber\HtmlResponseBigPipeSubscriber::onRespond().
     $events[KernelEvents::RESPONSE][] = ['onRespondSetBigPipeDebugPlaceholderHeaders', -9999];
 
diff --git a/core/modules/block/src/EventSubscriber/BlockPageDisplayVariantSubscriber.php b/core/modules/block/src/EventSubscriber/BlockPageDisplayVariantSubscriber.php
index 89f361f44048a9c326cd6752dbf1cd67735bed9c..c7dc9fc81a396cfafa7c6cfb2b321caf399a1ac1 100644
--- a/core/modules/block/src/EventSubscriber/BlockPageDisplayVariantSubscriber.php
+++ b/core/modules/block/src/EventSubscriber/BlockPageDisplayVariantSubscriber.php
@@ -26,7 +26,7 @@ public function onSelectPageDisplayVariant(PageDisplayVariantSelectionEvent $eve
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[RenderEvents::SELECT_PAGE_DISPLAY_VARIANT][] = ['onSelectPageDisplayVariant'];
     return $events;
   }
diff --git a/core/modules/color/src/EventSubscriber/ColorConfigCacheInvalidator.php b/core/modules/color/src/EventSubscriber/ColorConfigCacheInvalidator.php
index 46b67a1d230e0ada6783ec5121a011298c666989..b39af35e9dd496f567f32e10f4bef8cd19c689ce 100644
--- a/core/modules/color/src/EventSubscriber/ColorConfigCacheInvalidator.php
+++ b/core/modules/color/src/EventSubscriber/ColorConfigCacheInvalidator.php
@@ -46,7 +46,7 @@ public function onChange(ConfigCrudEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[ConfigEvents::SAVE][] = ['onChange'];
     $events[ConfigEvents::DELETE][] = ['onChange'];
 
diff --git a/core/modules/config/src/ConfigSubscriber.php b/core/modules/config/src/ConfigSubscriber.php
index 779bab67ddcbb71c8dbb567f9842c0811eb29fa4..b42999a712845363386f935d69ca09e564fc162e 100644
--- a/core/modules/config/src/ConfigSubscriber.php
+++ b/core/modules/config/src/ConfigSubscriber.php
@@ -33,7 +33,7 @@ public function onConfigImporterValidate(ConfigImporterEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[ConfigEvents::IMPORT_VALIDATE][] = ['onConfigImporterValidate', 20];
     return $events;
   }
diff --git a/core/modules/config/tests/config_collection_install_test/src/EventSubscriber.php b/core/modules/config/tests/config_collection_install_test/src/EventSubscriber.php
index ae386612842df8a586fafbfc5b2edf03609b1e61..7f6a60f23766d2705b0a179463b257539aece2c0 100644
--- a/core/modules/config/tests/config_collection_install_test/src/EventSubscriber.php
+++ b/core/modules/config/tests/config_collection_install_test/src/EventSubscriber.php
@@ -42,7 +42,7 @@ public function addCollections(ConfigCollectionInfo $collection_info) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[ConfigEvents::COLLECTION_INFO][] = ['addCollections'];
     return $events;
   }
diff --git a/core/modules/config/tests/config_events_test/src/EventSubscriber.php b/core/modules/config/tests/config_events_test/src/EventSubscriber.php
index 0cdc4416c315a88051ec2484f9ec04a2e75d3ee4..8a79b8b606b17fb25d77543555ce59acd4cabbed 100644
--- a/core/modules/config/tests/config_events_test/src/EventSubscriber.php
+++ b/core/modules/config/tests/config_events_test/src/EventSubscriber.php
@@ -47,7 +47,7 @@ public function configEventRecorder(ConfigCrudEvent $event, $name) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[ConfigEvents::SAVE][] = ['configEventRecorder'];
     $events[ConfigEvents::DELETE][] = ['configEventRecorder'];
     $events[ConfigEvents::RENAME][] = ['configEventRecorder'];
diff --git a/core/modules/config/tests/config_import_test/src/EventSubscriber.php b/core/modules/config/tests/config_import_test/src/EventSubscriber.php
index a0691c3f0edcdf04d928936be0dd55b9f643f20d..4da76d83df698c80f958ce1b5e69e738fc161039 100644
--- a/core/modules/config/tests/config_import_test/src/EventSubscriber.php
+++ b/core/modules/config/tests/config_import_test/src/EventSubscriber.php
@@ -133,7 +133,7 @@ public function onConfigDelete(ConfigCrudEvent $event) {
    * @return array
    *   An array of event listener definitions.
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[ConfigEvents::SAVE][] = ['onConfigSave', 40];
     $events[ConfigEvents::DELETE][] = ['onConfigDelete', 40];
     $events[ConfigEvents::IMPORT_VALIDATE] = ['onConfigImporterValidate'];
diff --git a/core/modules/config/tests/config_transformer_test/src/EventSubscriber.php b/core/modules/config/tests/config_transformer_test/src/EventSubscriber.php
index 1370020abd589a549c1fb684bbdaa3ff2ff5a935..bec371642f9484dace7e3d61b8690c9b2a2841d7 100644
--- a/core/modules/config/tests/config_transformer_test/src/EventSubscriber.php
+++ b/core/modules/config/tests/config_transformer_test/src/EventSubscriber.php
@@ -105,7 +105,7 @@ public function onExportTransform(StorageTransformEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[ConfigEvents::STORAGE_TRANSFORM_IMPORT][] = ['onImportTransform'];
     $events[ConfigEvents::STORAGE_TRANSFORM_EXPORT][] = ['onExportTransform'];
     return $events;
diff --git a/core/modules/config_translation/src/Routing/RouteSubscriber.php b/core/modules/config_translation/src/Routing/RouteSubscriber.php
index 10044aa7f80e1648f55eb9deeb51d18e4fb0f920..5897212cd6a1f75356d4ac9cd434fd9a44e37e45 100644
--- a/core/modules/config_translation/src/Routing/RouteSubscriber.php
+++ b/core/modules/config_translation/src/Routing/RouteSubscriber.php
@@ -46,7 +46,7 @@ protected function alterRoutes(RouteCollection $collection) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Come after field_ui.
     $events[RoutingEvents::ALTER] = ['onAlterRoutes', -110];
     return $events;
diff --git a/core/modules/config_translation/tests/modules/config_translation_test/src/EventSubscriber/ConfigTranslationTestSubscriber.php b/core/modules/config_translation/tests/modules/config_translation_test/src/EventSubscriber/ConfigTranslationTestSubscriber.php
index 15fc6ac40a3baa629381e505263d5c90337160a3..305dbb0ecac90c94143d8c7a00472827fa158797 100644
--- a/core/modules/config_translation/tests/modules/config_translation_test/src/EventSubscriber/ConfigTranslationTestSubscriber.php
+++ b/core/modules/config_translation/tests/modules/config_translation_test/src/EventSubscriber/ConfigTranslationTestSubscriber.php
@@ -14,7 +14,7 @@ class ConfigTranslationTestSubscriber implements EventSubscriberInterface {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     return [
       ConfigTranslationEvents::POPULATE_MAPPER => [
         ['addConfigNames'],
diff --git a/core/modules/content_moderation/src/Routing/ContentModerationRouteSubscriber.php b/core/modules/content_moderation/src/Routing/ContentModerationRouteSubscriber.php
index 53da1fe07cc603728799f0650cbc7044b799cf8b..650af845d9ebf9ecf8e33371b23f781942af4e01 100644
--- a/core/modules/content_moderation/src/Routing/ContentModerationRouteSubscriber.php
+++ b/core/modules/content_moderation/src/Routing/ContentModerationRouteSubscriber.php
@@ -102,7 +102,7 @@ protected function getModeratedEntityTypes() {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events = parent::getSubscribedEvents();
     // This needs to run after that EntityResolverManager has set the route
     // entity type.
diff --git a/core/modules/content_translation/src/Routing/ContentTranslationRouteSubscriber.php b/core/modules/content_translation/src/Routing/ContentTranslationRouteSubscriber.php
index 6cd3b350dfe80009660fc218409b9e638e5d4a0a..8e68d69591c9ef7c7f322de40aa43f7f8491db46 100644
--- a/core/modules/content_translation/src/Routing/ContentTranslationRouteSubscriber.php
+++ b/core/modules/content_translation/src/Routing/ContentTranslationRouteSubscriber.php
@@ -173,7 +173,7 @@ protected function alterRoutes(RouteCollection $collection) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events = parent::getSubscribedEvents();
     // Should run after AdminRouteSubscriber so the routes can inherit admin
     // status of the edit routes on entities. Therefore priority -210.
diff --git a/core/modules/dynamic_page_cache/src/EventSubscriber/DynamicPageCacheSubscriber.php b/core/modules/dynamic_page_cache/src/EventSubscriber/DynamicPageCacheSubscriber.php
index 22b51b9ea55c4ba55d0a4e7398868bfcd15bc06f..2f75ccfaff1b99c3a2591c946a7ccc6d7401ae15 100644
--- a/core/modules/dynamic_page_cache/src/EventSubscriber/DynamicPageCacheSubscriber.php
+++ b/core/modules/dynamic_page_cache/src/EventSubscriber/DynamicPageCacheSubscriber.php
@@ -304,7 +304,7 @@ protected function renderArrayToResponse(array $render_array) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events = [];
 
     // Run after AuthenticationSubscriber (necessary for the 'user' cache
diff --git a/core/modules/editor/src/EventSubscriber/EditorConfigTranslationSubscriber.php b/core/modules/editor/src/EventSubscriber/EditorConfigTranslationSubscriber.php
index eb43ddc6b53a08be3a771e5850458bf0470eda74..d505ef224e302f96d1933d1c817bd378c3a6e50c 100644
--- a/core/modules/editor/src/EventSubscriber/EditorConfigTranslationSubscriber.php
+++ b/core/modules/editor/src/EventSubscriber/EditorConfigTranslationSubscriber.php
@@ -33,7 +33,7 @@ public function __construct(ConfigFactoryInterface $config_factory) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events = [];
     if (class_exists('Drupal\config_translation\Event\ConfigTranslationEvents')) {
       $events[ConfigTranslationEvents::POPULATE_MAPPER][] = ['addConfigNames'];
diff --git a/core/modules/field_ui/src/Routing/RouteSubscriber.php b/core/modules/field_ui/src/Routing/RouteSubscriber.php
index 046176a83b97e9cbfdf8f3be91f649698c6e6397..75e6b4b6916ba35a5c0370fc4c03c3ce53ab9b41 100644
--- a/core/modules/field_ui/src/Routing/RouteSubscriber.php
+++ b/core/modules/field_ui/src/Routing/RouteSubscriber.php
@@ -161,7 +161,7 @@ protected function alterRoutes(RouteCollection $collection) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events = parent::getSubscribedEvents();
     $events[RoutingEvents::ALTER] = ['onAlterRoutes', -100];
     return $events;
diff --git a/core/modules/jsonapi/src/EventSubscriber/JsonApiRequestValidator.php b/core/modules/jsonapi/src/EventSubscriber/JsonApiRequestValidator.php
index db33f307e14542419184d2c36a649588a5c5caf6..43b16a105529896a798bc0e9aa874a6932632138 100644
--- a/core/modules/jsonapi/src/EventSubscriber/JsonApiRequestValidator.php
+++ b/core/modules/jsonapi/src/EventSubscriber/JsonApiRequestValidator.php
@@ -83,7 +83,7 @@ protected function validateQueryParams(Request $request) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::REQUEST][] = ['onRequest'];
     return $events;
   }
diff --git a/core/modules/jsonapi/src/EventSubscriber/ResourceObjectNormalizationCacher.php b/core/modules/jsonapi/src/EventSubscriber/ResourceObjectNormalizationCacher.php
index c16a23be8a9da55fe1818c0b5e1767e9dc31e346..ca88533a7a2931f55a863ae97b3973cde8647feb 100644
--- a/core/modules/jsonapi/src/EventSubscriber/ResourceObjectNormalizationCacher.php
+++ b/core/modules/jsonapi/src/EventSubscriber/ResourceObjectNormalizationCacher.php
@@ -173,7 +173,7 @@ protected static function generateLookupRenderArray(ResourceObject $object) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::TERMINATE][] = ['onTerminate'];
     return $events;
   }
diff --git a/core/modules/jsonapi/src/EventSubscriber/ResourceResponseSubscriber.php b/core/modules/jsonapi/src/EventSubscriber/ResourceResponseSubscriber.php
index edf81cb677eca4b53f992f74a975519436473f49..6d47e9d2343735ddfb8798da56a619e8a08cacc4 100644
--- a/core/modules/jsonapi/src/EventSubscriber/ResourceResponseSubscriber.php
+++ b/core/modules/jsonapi/src/EventSubscriber/ResourceResponseSubscriber.php
@@ -61,7 +61,7 @@ public function __construct(SerializerInterface $serializer) {
    * @see \Drupal\rest\EventSubscriber\ResourceResponseSubscriber::getSubscribedEvents()
    * @see \Drupal\dynamic_page_cache\EventSubscriber\DynamicPageCacheSubscriber
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Run before the dynamic page cache subscriber (priority 100), so that
     // Dynamic Page Cache can cache flattened responses.
     $events[KernelEvents::RESPONSE][] = ['onResponse', 128];
diff --git a/core/modules/jsonapi/src/EventSubscriber/ResourceResponseValidator.php b/core/modules/jsonapi/src/EventSubscriber/ResourceResponseValidator.php
index 1ba0cd0196c9b3c1a60073cdd945362c40737066..3f08f56a8a69dbc857c563ba65a28936bc9e81e5 100644
--- a/core/modules/jsonapi/src/EventSubscriber/ResourceResponseValidator.php
+++ b/core/modules/jsonapi/src/EventSubscriber/ResourceResponseValidator.php
@@ -76,7 +76,7 @@ public function __construct(LoggerInterface $logger, ModuleHandlerInterface $mod
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::RESPONSE][] = ['onResponse'];
     return $events;
   }
diff --git a/core/modules/jsonapi/tests/modules/jsonapi_test_resource_type_building/src/EventSubscriber/ResourceTypeBuildEventSubscriber.php b/core/modules/jsonapi/tests/modules/jsonapi_test_resource_type_building/src/EventSubscriber/ResourceTypeBuildEventSubscriber.php
index 658ac0afc085582becf166a2ab53fbf962f0f186..f97df3ee841799b32429f4e5ee371a9685f99ce7 100644
--- a/core/modules/jsonapi/tests/modules/jsonapi_test_resource_type_building/src/EventSubscriber/ResourceTypeBuildEventSubscriber.php
+++ b/core/modules/jsonapi/tests/modules/jsonapi_test_resource_type_building/src/EventSubscriber/ResourceTypeBuildEventSubscriber.php
@@ -16,7 +16,7 @@ class ResourceTypeBuildEventSubscriber implements EventSubscriberInterface {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     return [
       ResourceTypeBuildEvents::BUILD => [
         ['disableResourceType'],
diff --git a/core/modules/language/src/EventSubscriber/ConfigSubscriber.php b/core/modules/language/src/EventSubscriber/ConfigSubscriber.php
index 5fd08e6b65cd3500caffee4a5a8387c40f605045..ff35d9b6d6a14f3dda2fdd280f844d121783e51d 100644
--- a/core/modules/language/src/EventSubscriber/ConfigSubscriber.php
+++ b/core/modules/language/src/EventSubscriber/ConfigSubscriber.php
@@ -140,7 +140,7 @@ public function setPathProcessorLanguage(PathProcessorLanguage $path_processor_l
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[ConfigEvents::SAVE][] = ['onConfigSave', 0];
     return $events;
   }
diff --git a/core/modules/language/src/EventSubscriber/LanguageRequestSubscriber.php b/core/modules/language/src/EventSubscriber/LanguageRequestSubscriber.php
index e7320f34a5633e2a9ce4d85302179a2ef2a890e8..e43680bf3ac3ad66e401ceff3c1f5d83db586887 100644
--- a/core/modules/language/src/EventSubscriber/LanguageRequestSubscriber.php
+++ b/core/modules/language/src/EventSubscriber/LanguageRequestSubscriber.php
@@ -103,7 +103,7 @@ private function setLanguageOverrides() {
    * @return array
    *   An array of event listener definitions.
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::REQUEST][] = ['onKernelRequestLanguage', 255];
     $events[DrupalKernelInterface::CONTAINER_INITIALIZE_SUBREQUEST_FINISHED][] = ['onContainerInitializeSubrequestFinished', 255];
 
diff --git a/core/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php b/core/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php
index 8ed8137f253f5ad1dfb0d9f3e029ecf3dbb89995..083de3983d73669c145a0db195081597dc60be2a 100644
--- a/core/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php
+++ b/core/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php
@@ -47,7 +47,7 @@ public function __construct(AccountInterface $current_user) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[LayoutBuilderEvents::SECTION_COMPONENT_BUILD_RENDER_ARRAY] = ['onBuildRender', 100];
     return $events;
   }
diff --git a/core/modules/layout_builder/src/EventSubscriber/PrepareLayout.php b/core/modules/layout_builder/src/EventSubscriber/PrepareLayout.php
index e335b87ab83854bc90837ab2bccf457aede2c9d3..ec8122b2fd98a84279dcab57495aaba8aac9f625 100644
--- a/core/modules/layout_builder/src/EventSubscriber/PrepareLayout.php
+++ b/core/modules/layout_builder/src/EventSubscriber/PrepareLayout.php
@@ -51,7 +51,7 @@ public function __construct(LayoutTempstoreRepositoryInterface $layout_tempstore
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[LayoutBuilderEvents::PREPARE_LAYOUT][] = ['onPrepareLayout', 10];
     return $events;
   }
diff --git a/core/modules/layout_builder/src/EventSubscriber/SetInlineBlockDependency.php b/core/modules/layout_builder/src/EventSubscriber/SetInlineBlockDependency.php
index d1ff4ad3dcb06858bcdb90e7ddde2d0f21e018d7..a1fb950be7c7014be38d70a2341d3db45f65ee48 100644
--- a/core/modules/layout_builder/src/EventSubscriber/SetInlineBlockDependency.php
+++ b/core/modules/layout_builder/src/EventSubscriber/SetInlineBlockDependency.php
@@ -79,7 +79,7 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager, Con
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     return [
       BlockContentEvents::BLOCK_CONTENT_GET_DEPENDENCY => 'onGetDependency',
     ];
diff --git a/core/modules/layout_builder/src/Routing/LayoutBuilderRoutes.php b/core/modules/layout_builder/src/Routing/LayoutBuilderRoutes.php
index 60d09379685c352718fa96e435014bbc1a8f5eb8..6039e24247b2542270b484dc374aee816b31b7dd 100644
--- a/core/modules/layout_builder/src/Routing/LayoutBuilderRoutes.php
+++ b/core/modules/layout_builder/src/Routing/LayoutBuilderRoutes.php
@@ -48,7 +48,7 @@ public function onAlterRoutes(RouteBuildEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Run after \Drupal\field_ui\Routing\RouteSubscriber.
     $events[RoutingEvents::ALTER] = ['onAlterRoutes', -110];
     return $events;
diff --git a/core/modules/layout_builder/tests/modules/layout_builder_element_test/src/EventSubscriber/TestPrepareLayout.php b/core/modules/layout_builder/tests/modules/layout_builder_element_test/src/EventSubscriber/TestPrepareLayout.php
index cec4af43bb061495f9911fbbcbd72bf339a1d1f6..0d9c1afd5026ce0149be9663437b2fc3289e5cdc 100644
--- a/core/modules/layout_builder/tests/modules/layout_builder_element_test/src/EventSubscriber/TestPrepareLayout.php
+++ b/core/modules/layout_builder/tests/modules/layout_builder_element_test/src/EventSubscriber/TestPrepareLayout.php
@@ -52,7 +52,7 @@ public function __construct(LayoutTempstoreRepositoryInterface $layout_tempstore
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Act before core's layout builder subscriber.
     $events[LayoutBuilderEvents::PREPARE_LAYOUT][] = ['onBeforePrepareLayout', 20];
     // Act after core's layout builder subscriber.
diff --git a/core/modules/locale/src/EventSubscriber/LocaleTranslationCacheTag.php b/core/modules/locale/src/EventSubscriber/LocaleTranslationCacheTag.php
index 49680979069ab2f78208dce662efb545bff26c8e..0faa7e32502006c9147ece6718b607dd853fef33 100644
--- a/core/modules/locale/src/EventSubscriber/LocaleTranslationCacheTag.php
+++ b/core/modules/locale/src/EventSubscriber/LocaleTranslationCacheTag.php
@@ -38,7 +38,7 @@ public function saveTranslation() {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[LocaleEvents::SAVE_TRANSLATION][] = ['saveTranslation'];
     return $events;
   }
diff --git a/core/modules/locale/src/LocaleConfigSubscriber.php b/core/modules/locale/src/LocaleConfigSubscriber.php
index 44b21e3739b4d067e0bc2db3301a27956873446b..c3a1bb7b0fecaf116cb874cc5160635de2f7538d 100644
--- a/core/modules/locale/src/LocaleConfigSubscriber.php
+++ b/core/modules/locale/src/LocaleConfigSubscriber.php
@@ -70,7 +70,7 @@ public function __construct(ConfigFactoryInterface $config_factory, LocaleConfig
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[LanguageConfigOverrideEvents::SAVE_OVERRIDE] = 'onOverrideChange';
     $events[LanguageConfigOverrideEvents::DELETE_OVERRIDE] = 'onOverrideChange';
     $events[ConfigEvents::SAVE] = 'onConfigSave';
diff --git a/core/modules/media/src/EventSubscriber/MediaConfigSubscriber.php b/core/modules/media/src/EventSubscriber/MediaConfigSubscriber.php
index 82721e02b387950c95128570f0775af2bc2de053..21efa1a1f7a1054872ef0c3966d267509dfa6c67 100644
--- a/core/modules/media/src/EventSubscriber/MediaConfigSubscriber.php
+++ b/core/modules/media/src/EventSubscriber/MediaConfigSubscriber.php
@@ -84,7 +84,7 @@ public function onSave(ConfigCrudEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[ConfigEvents::SAVE][] = ['onSave'];
     return $events;
   }
diff --git a/core/modules/migrate/src/Plugin/PluginEventSubscriber.php b/core/modules/migrate/src/Plugin/PluginEventSubscriber.php
index d503638269be0d9fee8e41a722dc0d5f4beef1c9..1e839faf0cb688d445f399d4d07c0b5ab02498e3 100644
--- a/core/modules/migrate/src/Plugin/PluginEventSubscriber.php
+++ b/core/modules/migrate/src/Plugin/PluginEventSubscriber.php
@@ -81,7 +81,7 @@ public function postRollback(MigrateRollbackEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events = [];
     $events[MigrateEvents::PRE_IMPORT][] = ['preImport'];
     $events[MigrateEvents::POST_IMPORT][] = ['postImport'];
diff --git a/core/modules/node/src/EventSubscriber/NodeAdminRouteSubscriber.php b/core/modules/node/src/EventSubscriber/NodeAdminRouteSubscriber.php
index a726ae8a649ef67f84128abeda17284d2a1cf371..2c52e5a38e754e0e765cc6ce078fa3b8bf78f6ce 100644
--- a/core/modules/node/src/EventSubscriber/NodeAdminRouteSubscriber.php
+++ b/core/modules/node/src/EventSubscriber/NodeAdminRouteSubscriber.php
@@ -69,7 +69,7 @@ public function onConfigSave(ConfigCrudEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events = parent::getSubscribedEvents();
     $events[ConfigEvents::SAVE][] = ['onConfigSave', 0];
     return $events;
diff --git a/core/modules/node/src/EventSubscriber/NodeTranslationExceptionSubscriber.php b/core/modules/node/src/EventSubscriber/NodeTranslationExceptionSubscriber.php
index 35203168a54498c329c9de9619041bb4aef78bdf..98728b367f76bab88809b401cbe961e2d2271ec1 100644
--- a/core/modules/node/src/EventSubscriber/NodeTranslationExceptionSubscriber.php
+++ b/core/modules/node/src/EventSubscriber/NodeTranslationExceptionSubscriber.php
@@ -117,7 +117,7 @@ public function onException(ExceptionEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events = [];
 
     $events[KernelEvents::EXCEPTION] = ['onException'];
diff --git a/core/modules/node/src/EventSubscriber/NodeTranslationMigrateSubscriber.php b/core/modules/node/src/EventSubscriber/NodeTranslationMigrateSubscriber.php
index 5911f0e05f796035ca4a7f3ed3bf61c0747d1272..39e1f5aceb7beba6315d2f5677df3c416f48dd05 100644
--- a/core/modules/node/src/EventSubscriber/NodeTranslationMigrateSubscriber.php
+++ b/core/modules/node/src/EventSubscriber/NodeTranslationMigrateSubscriber.php
@@ -101,7 +101,7 @@ public function onPostImport(MigrateImportEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events = [];
 
     $events[MigrateEvents::POST_ROW_SAVE] = ['onPostRowSave'];
diff --git a/core/modules/path_alias/src/EventSubscriber/PathAliasSubscriber.php b/core/modules/path_alias/src/EventSubscriber/PathAliasSubscriber.php
index 6ed435a0b540d239435388b711ba0b7dbcfb9daf..3dce19b18b52f120efd91fbf30160707a913943b 100644
--- a/core/modules/path_alias/src/EventSubscriber/PathAliasSubscriber.php
+++ b/core/modules/path_alias/src/EventSubscriber/PathAliasSubscriber.php
@@ -69,7 +69,7 @@ public function onKernelTerminate(TerminateEvent $event) {
    * @return array
    *   An array of event listener definitions.
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::CONTROLLER][] = ['onKernelController', 200];
     $events[KernelEvents::TERMINATE][] = ['onKernelTerminate', 200];
     return $events;
diff --git a/core/modules/rest/src/EventSubscriber/EntityResourcePostRouteSubscriber.php b/core/modules/rest/src/EventSubscriber/EntityResourcePostRouteSubscriber.php
index 80d29dc3f413e1ac47ddf297ff77a7c1f8f13e18..42830f66b2ed04c4e45e32dded9d3fe0ebde0b85 100644
--- a/core/modules/rest/src/EventSubscriber/EntityResourcePostRouteSubscriber.php
+++ b/core/modules/rest/src/EventSubscriber/EntityResourcePostRouteSubscriber.php
@@ -64,7 +64,7 @@ public function onDynamicRouteEvent(RouteBuildEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Priority -10, to run after \Drupal\rest\Routing\ResourceRoutes, which has
     // priority 0.
     $events[RoutingEvents::DYNAMIC][] = ['onDynamicRouteEvent', -10];
diff --git a/core/modules/rest/src/EventSubscriber/ResourceResponseSubscriber.php b/core/modules/rest/src/EventSubscriber/ResourceResponseSubscriber.php
index 47ea8800aea751710e42a5c883dc5f9328d40e20..2fe460fce393dee63d96648153e74f9709570a1c 100644
--- a/core/modules/rest/src/EventSubscriber/ResourceResponseSubscriber.php
+++ b/core/modules/rest/src/EventSubscriber/ResourceResponseSubscriber.php
@@ -200,7 +200,7 @@ protected function flattenResponse(ResourceResponseInterface $response) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Run before \Drupal\dynamic_page_cache\EventSubscriber\DynamicPageCacheSubscriber
     // (priority 100), so that Dynamic Page Cache can cache flattened responses.
     $events[KernelEvents::RESPONSE][] = ['onResponse', 128];
diff --git a/core/modules/rest/src/Routing/ResourceRoutes.php b/core/modules/rest/src/Routing/ResourceRoutes.php
index f8ebbff151d3d4f1b65d52cf5588a6fc756e16f4..f4628130f81c3c34fcf5abc914c58e9f20771a84 100644
--- a/core/modules/rest/src/Routing/ResourceRoutes.php
+++ b/core/modules/rest/src/Routing/ResourceRoutes.php
@@ -140,7 +140,7 @@ protected function getRoutesForResourceConfig(RestResourceConfigInterface $rest_
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[RoutingEvents::DYNAMIC] = 'onDynamicRouteEvent';
     return $events;
   }
diff --git a/core/modules/serialization/src/EventSubscriber/UserRouteAlterSubscriber.php b/core/modules/serialization/src/EventSubscriber/UserRouteAlterSubscriber.php
index 147b593aa1a9d42888628b0d84ec6a3b29b5506b..8f84eb54626e822770e21aca513ab212765f1ea1 100644
--- a/core/modules/serialization/src/EventSubscriber/UserRouteAlterSubscriber.php
+++ b/core/modules/serialization/src/EventSubscriber/UserRouteAlterSubscriber.php
@@ -31,7 +31,7 @@ public function __construct(array $serializer_formats) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[RoutingEvents::ALTER][] = 'onRoutingAlterAddFormats';
     return $events;
   }
diff --git a/core/modules/system/src/EventSubscriber/AdminRouteSubscriber.php b/core/modules/system/src/EventSubscriber/AdminRouteSubscriber.php
index 06a6ba4890e4131886247bd578c87804435ea3ab..7c1d9a30a5401a271acdc21bb0bb5fa073741675 100644
--- a/core/modules/system/src/EventSubscriber/AdminRouteSubscriber.php
+++ b/core/modules/system/src/EventSubscriber/AdminRouteSubscriber.php
@@ -27,7 +27,7 @@ protected function alterRoutes(RouteCollection $collection) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events = parent::getSubscribedEvents();
 
     // Use a lower priority than \Drupal\field_ui\Routing\RouteSubscriber or
diff --git a/core/modules/system/src/EventSubscriber/ConfigCacheTag.php b/core/modules/system/src/EventSubscriber/ConfigCacheTag.php
index 68050aa85a00b968c9310de75a3b7e5053176f39..8202edd2e7782366e3f875daa69668367b7972e8 100644
--- a/core/modules/system/src/EventSubscriber/ConfigCacheTag.php
+++ b/core/modules/system/src/EventSubscriber/ConfigCacheTag.php
@@ -79,7 +79,7 @@ public function onSave(ConfigCrudEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[ConfigEvents::SAVE][] = ['onSave'];
     return $events;
   }
diff --git a/core/modules/system/src/EventSubscriber/SecurityFileUploadEventSubscriber.php b/core/modules/system/src/EventSubscriber/SecurityFileUploadEventSubscriber.php
index 4aeeb574d35e690836bd4705100e61687e50dfce..e90959e325b1818cf6065ed32789064ba7ff2917 100644
--- a/core/modules/system/src/EventSubscriber/SecurityFileUploadEventSubscriber.php
+++ b/core/modules/system/src/EventSubscriber/SecurityFileUploadEventSubscriber.php
@@ -34,7 +34,7 @@ public function __construct(ConfigFactoryInterface $config_factory) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // This event must be run last to ensure the filename obeys the security
     // rules.
     $events[FileUploadSanitizeNameEvent::class][] = ['sanitizeName', PHP_INT_MIN];
diff --git a/core/modules/system/src/SystemConfigSubscriber.php b/core/modules/system/src/SystemConfigSubscriber.php
index 76830b70a6e2b07d094dc6a4ff77440892f264c1..5f7fe18ddfc1b7e1f71b862fa4697dd7825366f1 100644
--- a/core/modules/system/src/SystemConfigSubscriber.php
+++ b/core/modules/system/src/SystemConfigSubscriber.php
@@ -84,7 +84,7 @@ public function onConfigImporterValidateSiteUUID(ConfigImporterEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[ConfigEvents::SAVE][] = ['onConfigSave', 0];
     // The empty check has a high priority so that it can stop propagation if
     // there is no configuration to import.
diff --git a/core/modules/system/src/TimeZoneResolver.php b/core/modules/system/src/TimeZoneResolver.php
index 551a8d5cda70403a214ab3750bc5bc5eaaa4a5a4..050b843e99b34de02c19827ddf4766e7859fcd3a 100644
--- a/core/modules/system/src/TimeZoneResolver.php
+++ b/core/modules/system/src/TimeZoneResolver.php
@@ -71,7 +71,7 @@ public function onConfigSave(ConfigCrudEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[ConfigEvents::SAVE][] = ['onConfigSave', 0];
     // The priority for this must run directly after the authentication
     // subscriber.
diff --git a/core/modules/system/tests/modules/display_variant_test/src/EventSubscriber/TestPageDisplayVariantSubscriber.php b/core/modules/system/tests/modules/display_variant_test/src/EventSubscriber/TestPageDisplayVariantSubscriber.php
index e24266e0336586d0d7b7812ce3e932a7f7cb12f8..01900c2ed1ce0c1cdc83202f8947ae827809d28a 100644
--- a/core/modules/system/tests/modules/display_variant_test/src/EventSubscriber/TestPageDisplayVariantSubscriber.php
+++ b/core/modules/system/tests/modules/display_variant_test/src/EventSubscriber/TestPageDisplayVariantSubscriber.php
@@ -31,7 +31,7 @@ public function onSelectPageDisplayVariant(PageDisplayVariantSelectionEvent $eve
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[RenderEvents::SELECT_PAGE_DISPLAY_VARIANT][] = ['onSelectPageDisplayVariant'];
     return $events;
   }
diff --git a/core/modules/system/tests/modules/early_rendering_controller_test/src/TestDomainObjectViewSubscriber.php b/core/modules/system/tests/modules/early_rendering_controller_test/src/TestDomainObjectViewSubscriber.php
index c251d581d01f5605e22ff3ee8d175080e44b8e80..560d17e1a1682acf72c7e4b5ed0b2d06ad6f5062 100644
--- a/core/modules/system/tests/modules/early_rendering_controller_test/src/TestDomainObjectViewSubscriber.php
+++ b/core/modules/system/tests/modules/early_rendering_controller_test/src/TestDomainObjectViewSubscriber.php
@@ -37,7 +37,7 @@ public function onViewTestDomainObject(ViewEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::VIEW][] = ['onViewTestDomainObject'];
 
     return $events;
diff --git a/core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php b/core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php
index 63a2618ec5e24ca640350d1adca107eef323a842..d00395ac58b596f760a79435090abb464558e60a 100644
--- a/core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php
+++ b/core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php
@@ -79,7 +79,7 @@ public function __construct(StateInterface $state, EntityLastInstalledSchemaRepo
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     return static::getEntityTypeEvents() + static::getFieldStorageDefinitionEvents();
   }
 
diff --git a/core/modules/system/tests/modules/entity_test_update/src/EventSubscriber/EntitySchemaSubscriber.php b/core/modules/system/tests/modules/entity_test_update/src/EventSubscriber/EntitySchemaSubscriber.php
index a53aff8a8207646683e4f94e2f1bf26b5ea92463..45a1d1f35d80b60d7429fe37ca849805cbd6d11f 100644
--- a/core/modules/system/tests/modules/entity_test_update/src/EventSubscriber/EntitySchemaSubscriber.php
+++ b/core/modules/system/tests/modules/entity_test_update/src/EventSubscriber/EntitySchemaSubscriber.php
@@ -48,7 +48,7 @@ public function __construct(EntityDefinitionUpdateManagerInterface $entityDefini
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     return static::getEntityTypeEvents();
   }
 
diff --git a/core/modules/system/tests/modules/form_test/src/EventSubscriber/FormTestEventSubscriber.php b/core/modules/system/tests/modules/form_test/src/EventSubscriber/FormTestEventSubscriber.php
index 410b3e7f44fcd8dfcbc7563f0e6a9f171c914fc3..0d3b204049090229bb93af8a31199403a9d04814 100644
--- a/core/modules/system/tests/modules/form_test/src/EventSubscriber/FormTestEventSubscriber.php
+++ b/core/modules/system/tests/modules/form_test/src/EventSubscriber/FormTestEventSubscriber.php
@@ -38,7 +38,7 @@ public function onKernelResponse(ResponseEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::REQUEST][] = ['onKernelRequest'];
     $events[KernelEvents::RESPONSE][] = ['onKernelResponse'];
     return $events;
diff --git a/core/modules/system/tests/modules/hold_test/src/EventSubscriber/HoldTestSubscriber.php b/core/modules/system/tests/modules/hold_test/src/EventSubscriber/HoldTestSubscriber.php
index c5264ba1d6f54896a17bb0187b01377f6b7d122b..523e257f7004b6b94a8385997660524b18d5341a 100644
--- a/core/modules/system/tests/modules/hold_test/src/EventSubscriber/HoldTestSubscriber.php
+++ b/core/modules/system/tests/modules/hold_test/src/EventSubscriber/HoldTestSubscriber.php
@@ -67,7 +67,7 @@ protected function hold($type) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::REQUEST][] = ['onRequest'];
     $events[KernelEvents::RESPONSE][] = ['onRespond'];
     return $events;
diff --git a/core/modules/system/tests/modules/module_install_class_loader_test1/src/EventSubscriber.php b/core/modules/system/tests/modules/module_install_class_loader_test1/src/EventSubscriber.php
index ce0ef4981ae86e9c8ffc14ae73540ba465574bfe..e9e851799f4d0a53e2af7d18a472d5c814e0c53d 100644
--- a/core/modules/system/tests/modules/module_install_class_loader_test1/src/EventSubscriber.php
+++ b/core/modules/system/tests/modules/module_install_class_loader_test1/src/EventSubscriber.php
@@ -13,7 +13,7 @@ class EventSubscriber implements EventSubscriberInterface {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events = [];
     // If the autoloader is not fixed during module install when the modules
     // module_install_class_loader_test1 and module_install_class_loader_test2
diff --git a/core/modules/system/tests/modules/module_install_class_loader_test2/src/EventSubscriber.php b/core/modules/system/tests/modules/module_install_class_loader_test2/src/EventSubscriber.php
index d994ca3d278be196fd90a0b65c74cd0e6a22eafd..edcf1b409d55b42570d9d5d1a2975e8d5dd10f63 100644
--- a/core/modules/system/tests/modules/module_install_class_loader_test2/src/EventSubscriber.php
+++ b/core/modules/system/tests/modules/module_install_class_loader_test2/src/EventSubscriber.php
@@ -12,7 +12,7 @@ class EventSubscriber implements EventSubscriberInterface {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     return [];
   }
 
diff --git a/core/modules/system/tests/modules/service_provider_test/src/TestClass.php b/core/modules/system/tests/modules/service_provider_test/src/TestClass.php
index 5724af1c02a6ed54d27107f2e5f4596d02db2a81..14de650795b7795698babf5576daa38c345ba9c7 100644
--- a/core/modules/system/tests/modules/service_provider_test/src/TestClass.php
+++ b/core/modules/system/tests/modules/service_provider_test/src/TestClass.php
@@ -57,7 +57,7 @@ public function onKernelResponseTest(ResponseEvent $event) {
    * @return array
    *   An array of event listener definitions.
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::REQUEST][] = ['onKernelRequestTest'];
     $events[KernelEvents::RESPONSE][] = ['onKernelResponseTest'];
     return $events;
diff --git a/core/modules/system/tests/modules/session_test/src/EventSubscriber/SessionTestSubscriber.php b/core/modules/system/tests/modules/session_test/src/EventSubscriber/SessionTestSubscriber.php
index 13d1b711ad7ca555c9f711b55004e3725e34f92c..38b797a8a27d270eab61f6190fe81ecbd910a04d 100644
--- a/core/modules/system/tests/modules/session_test/src/EventSubscriber/SessionTestSubscriber.php
+++ b/core/modules/system/tests/modules/session_test/src/EventSubscriber/SessionTestSubscriber.php
@@ -48,7 +48,7 @@ public function onKernelResponseSessionTest(ResponseEvent $event) {
    * @return array
    *   An array of event listener definitions.
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::RESPONSE][] = ['onKernelResponseSessionTest'];
     $events[KernelEvents::REQUEST][] = ['onKernelRequestSessionTest'];
     return $events;
diff --git a/core/modules/system/tests/modules/theme_test/src/EventSubscriber/ThemeTestSubscriber.php b/core/modules/system/tests/modules/theme_test/src/EventSubscriber/ThemeTestSubscriber.php
index 337ab4c3b151ea8b754b130c2881060e5f8ac897..5afc762fe5e3a80aa3fa1b25738af5be0d40fd1e 100644
--- a/core/modules/system/tests/modules/theme_test/src/EventSubscriber/ThemeTestSubscriber.php
+++ b/core/modules/system/tests/modules/theme_test/src/EventSubscriber/ThemeTestSubscriber.php
@@ -93,7 +93,7 @@ public function onView(RequestEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::REQUEST][] = ['onRequest'];
     $events[KernelEvents::VIEW][] = ['onView', -1000];
     return $events;
diff --git a/core/modules/user/src/Authentication/Provider/Cookie.php b/core/modules/user/src/Authentication/Provider/Cookie.php
index aea58f67ea80405e73b6ff153f2651c466faeb4e..20c2719a25a3b5ee9e304e2df750d72bcce1f602 100644
--- a/core/modules/user/src/Authentication/Provider/Cookie.php
+++ b/core/modules/user/src/Authentication/Provider/Cookie.php
@@ -154,7 +154,7 @@ public function addCheckToUrl(ResponseEvent $event) {
    * @return array
    *   An array of event listener definitions.
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::RESPONSE][] = ['addCheckToUrl', -1000];
     return $events;
   }
diff --git a/core/modules/user/src/EventSubscriber/AccessDeniedSubscriber.php b/core/modules/user/src/EventSubscriber/AccessDeniedSubscriber.php
index 9a80dc9c22c5b06686520f9c54188b8d1f4c619b..54d5275997eea6bd5beca9bcaa6c8252805ce6fa 100644
--- a/core/modules/user/src/EventSubscriber/AccessDeniedSubscriber.php
+++ b/core/modules/user/src/EventSubscriber/AccessDeniedSubscriber.php
@@ -78,7 +78,7 @@ public function onException(ExceptionEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Use a higher priority than
     // \Drupal\Core\EventSubscriber\ExceptionLoggingSubscriber, because there's
     // no need to log the exception if we can redirect.
diff --git a/core/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php b/core/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php
index dbaf637ce7ae2b98ea4be1cef2045cfc5c3f4281..e805162c0825d242b39be2f764bbcf0cfe540dc9 100644
--- a/core/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php
+++ b/core/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php
@@ -67,7 +67,7 @@ public function onKernelRequestMaintenance(RequestEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[KernelEvents::REQUEST][] = ['onKernelRequestMaintenance', 31];
     return $events;
   }
diff --git a/core/modules/user/src/EventSubscriber/UserFloodSubscriber.php b/core/modules/user/src/EventSubscriber/UserFloodSubscriber.php
index ba0c324c1ae2b0cad5ee3f83decfd2400f1884b8..83538025d611593d0e30710bfabe49bb31322dc0 100644
--- a/core/modules/user/src/EventSubscriber/UserFloodSubscriber.php
+++ b/core/modules/user/src/EventSubscriber/UserFloodSubscriber.php
@@ -33,7 +33,7 @@ public function __construct(LoggerInterface $logger = NULL) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events[UserEvents::FLOOD_BLOCKED_USER][] = ['blockedUser'];
     $events[UserEvents::FLOOD_BLOCKED_IP][] = ['blockedIp'];
     return $events;
diff --git a/core/modules/user/src/EventSubscriber/UserRequestSubscriber.php b/core/modules/user/src/EventSubscriber/UserRequestSubscriber.php
index 6fb12a65c82a28de98fbf5d5d5d9a816c99a309f..11fe4ec7304f0021f3bb277d8f46ed158a94d83a 100644
--- a/core/modules/user/src/EventSubscriber/UserRequestSubscriber.php
+++ b/core/modules/user/src/EventSubscriber/UserRequestSubscriber.php
@@ -59,7 +59,7 @@ public function onKernelTerminate(TerminateEvent $event) {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Should go before other subscribers start to write their caches. Notably
     // before \Drupal\Core\EventSubscriber\KernelDestructionSubscriber to
     // prevent instantiation of destructed services.
diff --git a/core/modules/views/src/EventSubscriber/RouteSubscriber.php b/core/modules/views/src/EventSubscriber/RouteSubscriber.php
index 50a3ca11d7ce15a37ebfed512dafdeb4b39cb88e..7cc6d56183ee807b155d3d077cd263414ffb52e5 100644
--- a/core/modules/views/src/EventSubscriber/RouteSubscriber.php
+++ b/core/modules/views/src/EventSubscriber/RouteSubscriber.php
@@ -74,7 +74,7 @@ public function reset() {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     $events = parent::getSubscribedEvents();
     $events[RoutingEvents::FINISHED] = ['routeRebuildFinished'];
     // Ensure to run after the entity resolver subscriber
diff --git a/core/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php b/core/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php
index 52d112d840b504fde200afaaf3759983ef41eccc..15a1f6c79ff0fc305a8bf8c7d1681cac4b9a27fe 100644
--- a/core/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php
+++ b/core/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php
@@ -99,7 +99,7 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager, Log
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     return static::getEntityTypeEvents();
   }
 
diff --git a/core/modules/workspaces/src/EventSubscriber/EntitySchemaSubscriber.php b/core/modules/workspaces/src/EventSubscriber/EntitySchemaSubscriber.php
index 6f521014a230dbc072c29b799a7208e8ff10a9a3..5882d49b776cf4b9bbe1ea1ed552396edf749c83 100644
--- a/core/modules/workspaces/src/EventSubscriber/EntitySchemaSubscriber.php
+++ b/core/modules/workspaces/src/EventSubscriber/EntitySchemaSubscriber.php
@@ -60,7 +60,7 @@ public function __construct(EntityDefinitionUpdateManagerInterface $entityDefini
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     return static::getEntityTypeEvents();
   }
 
diff --git a/core/modules/workspaces/src/EventSubscriber/WorkspaceRequestSubscriber.php b/core/modules/workspaces/src/EventSubscriber/WorkspaceRequestSubscriber.php
index 09f391d5042dba65196906270a5fddd1e05362ee..2852f30365879aaf0cb4f956dacf1067468a9545 100644
--- a/core/modules/workspaces/src/EventSubscriber/WorkspaceRequestSubscriber.php
+++ b/core/modules/workspaces/src/EventSubscriber/WorkspaceRequestSubscriber.php
@@ -95,7 +95,7 @@ public function onKernelRequest(RequestEvent $event) {
   /**
    * {@inheritDoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Use a priority of 190 in order to run after the generic core subscriber.
     // @see \Drupal\Core\EventSubscriber\PathSubscriber::getSubscribedEvents()
     $events[KernelEvents::CONTROLLER][] = ['onKernelController', 190];
diff --git a/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php b/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php
index f60e2b9a4738050e9f7e1de1bb15ef0dbde98d15..d8a99cd70430344bfdbb8e87bab8ed8bcbad4e7f 100644
--- a/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php
+++ b/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php
@@ -621,7 +621,7 @@ public function foo(Event $e, $name, $dispatcher) {
 
 class TestEventSubscriber implements EventSubscriberInterface {
 
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     return ['pre.foo' => 'preFoo', 'post.foo' => 'postFoo'];
   }
 
@@ -629,7 +629,7 @@ public static function getSubscribedEvents() {
 
 class TestEventSubscriberWithPriorities implements EventSubscriberInterface {
 
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     return [
       'pre.foo' => ['preFoo', 10],
       'post.foo' => ['postFoo'],
@@ -640,7 +640,7 @@ public static function getSubscribedEvents() {
 
 class TestEventSubscriberWithMultipleListeners implements EventSubscriberInterface {
 
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     return [
       'pre.foo' => [
         ['preFoo1'],