From 367e25f66ff1614cf56ec20d8c8f67435b3c3734 Mon Sep 17 00:00:00 2001
From: quietone <quietone@2572884.no-reply.drupal.org>
Date: Tue, 18 Feb 2025 21:28:00 +1300
Subject: [PATCH] Issue #3483146 by nicxvan, sourav_paul, vladimiraus,
 mstrelan, smustgrave: Add string return type to all hook_help implementations

---
 core/.phpstan-baseline.php                    | 462 ------------------
 .../src/Hook/AnnouncementsFeedHooks.php       |   3 +-
 .../src/Hook/AutomatedCronHooks.php           |   3 +-
 core/modules/ban/src/Hook/BanHooks.php        |   3 +-
 .../basic_auth/src/Hook/BasicAuthHooks.php    |   3 +-
 .../big_pipe/src/Hook/BigPipeHooks.php        |   3 +-
 core/modules/block/src/Hook/BlockHooks.php    |   3 +-
 .../src/Hook/BlockContentHooks.php            |   3 +-
 .../breakpoint/src/Hook/BreakpointHooks.php   |   3 +-
 .../ckeditor5/src/Hook/Ckeditor5Hooks.php     |   3 +-
 .../modules/comment/src/Hook/CommentHooks.php |   3 +-
 core/modules/config/src/Hook/ConfigHooks.php  |   3 +-
 .../src/Hook/ConfigTranslationHooks.php       |   3 +-
 .../modules/contact/src/Hook/ContactHooks.php |   3 +-
 .../src/Hook/ContentModerationHooks.php       |   3 +-
 .../src/Hook/ContentTranslationHooks.php      |   3 +-
 .../contextual/src/Hook/ContextualHooks.php   |   3 +-
 .../datetime/src/Hook/DatetimeHooks.php       |   3 +-
 .../src/Hook/DatetimeRangeHooks.php           |   3 +-
 core/modules/dblog/src/Hook/DblogHooks.php    |   3 +-
 .../src/Hook/DynamicPageCacheHooks.php        |   3 +-
 core/modules/editor/src/Hook/EditorHooks.php  |   3 +-
 core/modules/field/src/Hook/FieldHooks.php    |   3 +-
 .../src/Hook/FieldLayoutHooks.php             |   3 +-
 .../field_ui/src/Hook/FieldUiHooks.php        |   3 +-
 core/modules/filter/src/Hook/FilterHooks.php  |   3 +-
 core/modules/help/help.api.php                |   5 +-
 core/modules/help/src/Hook/HelpHooks.php      |   3 +-
 .../src/Hook/HelpPageTestHooks.php            |   2 +-
 .../help_test/src/Hook/HelpTestHooks.php      |   3 +-
 .../src/Hook/HelpTopicsTestHooks.php          |   3 +-
 .../src/Hook/MoreHelpPageTestHooks.php        |   3 +-
 .../modules/history/src/Hook/HistoryHooks.php |   3 +-
 core/modules/image/src/Hook/ImageHooks.php    |   3 +-
 .../src/Hook/InlineFormErrorsHooks.php        |   3 +-
 .../modules/jsonapi/src/Hook/JsonapiHooks.php |   2 +-
 .../language/src/Hook/LanguageHooks.php       |   3 +-
 ...LayoutBuilderExposeAllFieldBlocksHooks.php |   2 +-
 .../src/Hook/LayoutBuilderHooks.php           |   3 +-
 .../src/Hook/LayoutDiscoveryHooks.php         |   3 +-
 core/modules/link/src/Hook/LinkHooks.php      |   3 +-
 core/modules/locale/src/Hook/LocaleHooks.php  |   3 +-
 core/modules/media/src/Hook/MediaHooks.php    |   3 +-
 .../src/Hook/MediaLibraryHooks.php            |   3 +-
 .../src/Hook/MenuLinkContentHooks.php         |   3 +-
 core/modules/menu_ui/src/Hook/MenuUiHooks.php |   3 +-
 .../modules/migrate/src/Hook/MigrateHooks.php |   3 +-
 .../src/Hook/MigrateDrupalHooks.php           |   3 +-
 .../src/Hook/MigrateDrupalUiHooks.php         |   3 +-
 core/modules/mysql/src/Hook/MysqlHooks.php    |   3 +-
 .../src/Hook/NavigationTopBarHooks.php        |   3 +-
 .../navigation/src/Hook/NavigationHooks.php   |   3 +-
 core/modules/node/src/Hook/NodeHooks1.php     |   3 +-
 .../modules/options/src/Hook/OptionsHooks.php |   3 +-
 .../page_cache/src/Hook/PageCacheHooks.php    |   3 +-
 core/modules/path/src/Hook/PathHooks.php      |   3 +-
 core/modules/pgsql/src/Hook/PgsqlHooks.php    |   3 +-
 core/modules/phpass/src/Hook/PhpassHooks.php  |   3 +-
 .../src/Hook/ResponsiveImageHooks.php         |   3 +-
 core/modules/rest/src/Hook/RestHooks.php      |   3 +-
 core/modules/search/src/Hook/SearchHooks.php  |   3 +-
 .../src/Hook/SerializationHooks.php           |   3 +-
 .../src/Hook/SettingsTrayHooks.php            |   3 +-
 .../shortcut/src/Hook/ShortcutHooks.php       |   3 +-
 core/modules/sqlite/src/Hook/SqliteHooks.php  |   3 +-
 core/modules/syslog/src/Hook/SyslogHooks.php  |   3 +-
 core/modules/system/src/Hook/SystemHooks.php  |   3 +-
 ...xperimentalModuleRequirementsTestHooks.php |   3 +-
 .../src/Hook/ExperimentalModuleTestHooks.php  |   3 +-
 .../system_test/src/Hook/SystemTestHooks.php  |   3 +-
 .../taxonomy/src/Hook/TaxonomyHooks.php       |   3 +-
 .../telephone/src/Hook/TelephoneHooks.php     |   3 +-
 core/modules/text/src/Hook/TextHooks.php      |   3 +-
 .../modules/toolbar/src/Hook/ToolbarHooks.php |   3 +-
 core/modules/update/src/Hook/UpdateHooks.php  |   3 +-
 core/modules/user/src/Hook/UserHooks.php      |   3 +-
 core/modules/views/src/Hook/ViewsHooks.php    |   3 +-
 .../views_ui/src/Hook/ViewsUiHooks.php        |   3 +-
 .../workflows/src/Hook/WorkflowsHooks.php     |   3 +-
 79 files changed, 154 insertions(+), 541 deletions(-)

diff --git a/core/.phpstan-baseline.php b/core/.phpstan-baseline.php
index 5468cfee172c..34507f85460a 100644
--- a/core/.phpstan-baseline.php
+++ b/core/.phpstan-baseline.php
@@ -11503,12 +11503,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/UniqueFieldValueValidator.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\announcements_feed\\\\Hook\\\\AnnouncementsFeedHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/announcements_feed/src/Hook/AnnouncementsFeedHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Function automated_cron_settings_submit\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -11521,12 +11515,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/automated_cron/src/EventSubscriber/AutomatedCron.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\automated_cron\\\\Hook\\\\AutomatedCronHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/automated_cron/src/Hook/AutomatedCronHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\ban\\\\BanIpManager\\:\\:banIp\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -11581,12 +11569,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/ban/src/Form/BanDelete.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\ban\\\\Hook\\\\BanHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/ban/src/Hook/BanHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\Tests\\\\ban\\\\Kernel\\\\Migrate\\\\d7\\\\MigrateBlockedIpsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -11599,12 +11581,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/ban/tests/src/Kernel/Migrate/d7/MigrateBlockedIpsTest.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\basic_auth\\\\Hook\\\\BasicAuthHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/basic_auth/src/Hook/BasicAuthHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\basic_auth_test\\\\BasicAuthTestController\\:\\:modifyState\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -11635,12 +11611,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/big_pipe/src/EventSubscriber/NoBigPipeRouteAlterSubscriber.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\big_pipe\\\\Hook\\\\BigPipeHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/big_pipe/src/Hook/BigPipeHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\big_pipe\\\\Render\\\\BigPipe\\:\\:performPostSendTasks\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -11905,12 +11875,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/block/src/Form/BlockDeleteForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\block\\\\Hook\\\\BlockHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/block/src/Hook/BlockHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\block_test\\\\BlockRenderAlterContent\\:\\:preRender\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -12271,12 +12235,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/block_content/src/Event/BlockContentGetDependencyEvent.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\block_content\\\\Hook\\\\BlockContentHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/block_content/src/Hook/BlockContentHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\block_content\\\\Plugin\\\\Block\\\\BlockContentBlock\\:\\:blockSubmit\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -12565,12 +12523,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/breakpoint/src/BreakpointManager.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\breakpoint\\\\Hook\\\\BreakpointHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/breakpoint/src/Hook/BreakpointHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Function _update_ckeditor5_html_filter\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -12595,12 +12547,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/ckeditor5/src/EventSubscriber/CKEditor5CacheTag.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\ckeditor5\\\\Hook\\\\Ckeditor5Hooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/ckeditor5/src/Hook/Ckeditor5Hooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\ckeditor5\\\\Plugin\\\\CKEditor5Plugin\\\\Alignment\\:\\:setConfiguration\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -13441,12 +13387,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/comment/src/Form/DeleteForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\comment\\\\Hook\\\\CommentHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/comment/src/Hook/CommentHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\comment\\\\Plugin\\\\EntityReferenceSelection\\\\CommentSelection\\:\\:entityQueryAlter\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -14233,12 +14173,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/config/src/Form/ConfigSync.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\config\\\\Hook\\\\ConfigHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/config/src/Hook/ConfigHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\config_collection_install_test\\\\EventSubscriber\\:\\:addCollections\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -14731,12 +14665,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/config_translation/src/FormElement/PluralVariants.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\config_translation\\\\Hook\\\\ConfigTranslationHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/config_translation/src/Hook/ConfigTranslationHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\config_translation\\\\Routing\\\\RouteSubscriber\\:\\:alterRoutes\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -14875,12 +14803,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/contact/src/Entity/Message.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\contact\\\\Hook\\\\ContactHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/contact/src/Hook/ContactHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\contact\\\\MailHandler\\:\\:sendMailMessages\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -15463,12 +15385,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/content_moderation/src/Form/EntityModerationForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\content_moderation\\\\ModerationInformation\\:\\:getAffectedRevisionTranslation\\(\\) should return Drupal\\\\Core\\\\Entity\\\\ContentEntityInterface but return statement is missing\\.$#',
 	'identifier' => 'return.missing',
@@ -16297,12 +16213,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/content_translation/src/FieldTranslationSynchronizerInterface.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\content_translation\\\\Hook\\\\ContentTranslationHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/content_translation/src/Hook/ContentTranslationHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\content_translation\\\\Plugin\\\\Validation\\\\Constraint\\\\ContentTranslationSynchronizedFieldsConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -16609,12 +16519,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/contextual/src/ContextualController.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\contextual\\\\Hook\\\\ContextualHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/contextual/src/Hook/ContextualHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\contextual\\\\Plugin\\\\views\\\\field\\\\ContextualLinks\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -16663,12 +16567,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/datetime/src/DateTimeComputed.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\datetime\\\\Hook\\\\DatetimeHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/datetime/src/Hook/DatetimeHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\datetime\\\\Plugin\\\\Field\\\\FieldFormatter\\\\DateTimeFormatterBase\\:\\:setTimeZone\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -16801,12 +16699,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\datetime_range\\\\Hook\\\\DatetimeRangeHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/datetime_range/src/Hook/DatetimeRangeHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\datetime_range\\\\Plugin\\\\Field\\\\FieldType\\\\DateRangeFieldItemList\\:\\:defaultValuesForm\\(\\) should return array but return statement is missing\\.$#',
 	'identifier' => 'return.missing',
@@ -16885,12 +16777,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/dblog/src/Form/DblogFilterForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\dblog\\\\Hook\\\\DblogHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/dblog/src/Hook/DblogHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Variable \\$view in isset\\(\\) always exists and is not nullable\\.$#',
 	'identifier' => 'isset.variable',
@@ -16999,12 +16885,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/dynamic_page_cache/src/EventSubscriber/DynamicPageCacheSubscriber.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\dynamic_page_cache\\\\Hook\\\\DynamicPageCacheHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/dynamic_page_cache/src/Hook/DynamicPageCacheHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Function _editor_delete_file_usage\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -17071,12 +16951,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/editor/src/EventSubscriber/EditorConfigTranslationSubscriber.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\editor\\\\Hook\\\\EditorHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/editor/src/Hook/EditorHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\editor\\\\Plugin\\\\EditorBase\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -17317,12 +17191,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/field/src/FieldConfigStorage.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\field\\\\Hook\\\\FieldHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/field/src/Hook/FieldHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\field\\\\Plugin\\\\migrate\\\\field\\\\Email\\:\\:defineValueProcessPipeline\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -18085,12 +17953,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/field_layout/src/Form/FieldLayoutEntityViewDisplayEditForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\field_layout\\\\Hook\\\\FieldLayoutHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/field_layout/src/Hook/FieldLayoutHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\field_layout_test\\\\Form\\\\EmbeddedForm\\:\\:submitForm\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -18403,12 +18265,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/field_ui/src/Form/FieldStorageReuseForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\field_ui\\\\Hook\\\\FieldUiHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/field_ui/src/Hook/FieldUiHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\field_ui\\\\Plugin\\\\Derivative\\\\FieldUiLocalTask\\:\\:alterLocalTasks\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -19741,12 +19597,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/filter/src/Form/FilterDisableForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\filter\\\\Hook\\\\FilterHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/filter/src/Hook/FilterHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\filter\\\\Plugin\\\\Filter\\\\FilterHtml\\:\\:filterElementAttributes\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -19915,12 +19765,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/help/src/HelpTopicTwigLoader.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\help\\\\Hook\\\\HelpHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/help/src/Hook/HelpHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\help\\\\Plugin\\\\Search\\\\HelpSearch\\:\\:indexClear\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -19957,36 +19801,12 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/help/src/Plugin/Search/HelpSearch.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\help_page_test\\\\Hook\\\\HelpPageTestHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/help/tests/modules/help_page_test/src/Hook/HelpPageTestHooks.php',
-];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\help_test\\\\Hook\\\\HelpTestHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/help/tests/modules/help_test/src/Hook/HelpTestHooks.php',
-];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\help_topics_test\\\\Hook\\\\HelpTopicsTestHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/help/tests/modules/help_topics_test/src/Hook/HelpTopicsTestHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\help_topics_twig_tester\\\\HelpTestTwigNodeVisitor\\:\\:setStateValue\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
 	'count' => 1,
 	'path' => __DIR__ . '/modules/help/tests/modules/help_topics_twig_tester/src/HelpTestTwigNodeVisitor.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\more_help_page_test\\\\Hook\\\\MoreHelpPageTestHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/help/tests/modules/more_help_page_test/src/Hook/MoreHelpPageTestHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\Tests\\\\help\\\\Functional\\\\HelpTopicSearchTest\\:\\:cronRun\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -20029,12 +19849,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/history/src/Controller/HistoryController.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\history\\\\Hook\\\\HistoryHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/history/src/Hook/HistoryHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\history\\\\Plugin\\\\views\\\\field\\\\HistoryUserTimestamp\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -20299,12 +20113,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/image/src/Form/ImageStyleFormBase.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\image\\\\Hook\\\\ImageHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/image/src/Hook/ImageHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\image\\\\ImageEffectBase\\:\\:setConfiguration\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -20737,12 +20545,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/inline_form_errors/src/FormErrorHandler.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\inline_form_errors\\\\Hook\\\\InlineFormErrorsHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/inline_form_errors/src/Hook/InlineFormErrorsHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\inline_form_errors\\\\InlineFormErrorsServiceProvider\\:\\:alter\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -20935,12 +20737,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/jsonapi/src/Exception/UnprocessableHttpEntityException.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\jsonapi\\\\Hook\\\\JsonapiHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/jsonapi/src/Hook/JsonapiHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\jsonapi\\\\JsonApiResource\\\\Data\\:\\:getIterator\\(\\) return type with generic class ArrayIterator does not specify its types\\: TKey, TValue$#',
 	'identifier' => 'missingType.generics',
@@ -22045,12 +21841,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/language/src/Form/NegotiationUrlForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\language\\\\Hook\\\\LanguageHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/language/src/Hook/LanguageHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\language\\\\HttpKernel\\\\PathProcessorLanguage\\:\\:initConfigSubscriber\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -22537,12 +22327,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/language/tests/src/Unit/Menu/LanguageLocalTasksTest.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\layout_builder_expose_all_field_blocks\\\\Hook\\\\LayoutBuilderExposeAllFieldBlocksHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/layout_builder/modules/layout_builder_expose_all_field_blocks/src/Hook/LayoutBuilderExposeAllFieldBlocksHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\layout_builder\\\\Annotation\\\\SectionStorage\\:\\:get\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -22855,12 +22639,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/layout_builder/src/Form/RevertOverridesForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\layout_builder\\\\Hook\\\\LayoutBuilderHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/layout_builder/src/Hook/LayoutBuilderHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\layout_builder\\\\InlineBlockEntityOperations\\:\\:create\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -23707,12 +23485,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/layout_builder/tests/src/Unit/SectionTest.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\layout_discovery\\\\Hook\\\\LayoutDiscoveryHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/layout_discovery/src/Hook/LayoutDiscoveryHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\Tests\\\\layout_discovery\\\\Kernel\\\\LayoutTest\\:\\:processCallback\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -23725,12 +23497,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/layout_discovery/tests/src/Kernel/LayoutTest.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\link\\\\Hook\\\\LinkHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/link/src/Hook/LinkHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\link\\\\Plugin\\\\Field\\\\FieldType\\\\LinkItem\\:\\:setValue\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -24175,12 +23941,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/locale/src/Form/TranslationStatusForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\locale\\\\Hook\\\\LocaleHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/locale/src/Hook/LocaleHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\locale\\\\LocaleConfigManager\\:\\:deleteLanguageTranslations\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -24823,12 +24583,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/media/src/Form/MediaTypeDeleteConfirmForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\media\\\\Hook\\\\MediaHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/media/src/Hook/MediaHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\media\\\\MediaForm\\:\\:form\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -25699,12 +25453,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/media_library/src/Form/SettingsForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\media_library\\\\Hook\\\\MediaLibraryHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/media_library/src/Hook/MediaLibraryHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\media_library\\\\MediaLibraryServiceProvider\\:\\:register\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -26005,12 +25753,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/menu_link_content/src/Form/MenuLinkContentForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\menu_link_content\\\\Hook\\\\MenuLinkContentHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/menu_link_content/src/Hook/MenuLinkContentHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\menu_link_content\\\\MenuLinkContentInterface\\:\\:setInsidePlugin\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -26233,12 +25975,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/menu_ui/src/Form/MenuLinkResetForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\menu_ui\\\\Hook\\\\MenuUiHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/menu_ui/src/Hook/MenuUiHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\menu_ui\\\\MenuForm\\:\\:buildOverviewForm\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -26365,12 +26101,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/migrate/src/Form/MessageForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\migrate\\\\Hook\\\\MigrateHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/migrate/src/Hook/MigrateHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Constructor of class Drupal\\\\migrate\\\\MigrateException has an unused parameter \\$code\\.$#',
 	'identifier' => 'constructor.unusedParameter',
@@ -27403,12 +27133,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/migrate_drupal/src/FieldDiscoveryInterface.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\migrate_drupal\\\\Hook\\\\MigrateDrupalHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/migrate_drupal/src/Hook/MigrateDrupalHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\migrate_drupal\\\\MigrateDrupalServiceProvider\\:\\:alter\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -28069,12 +27793,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Form/ReviewForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Hook\\\\MigrateDrupalUiHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/migrate_drupal_ui/src/Hook/MigrateDrupalUiHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\migrate_drupal_ui\\\\Routing\\\\MigrateDrupalUiRouteSubscriber\\:\\:alterRoutes\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -28321,12 +28039,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/mysql/src/Driver/Database/mysql/Schema.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\mysql\\\\Hook\\\\MysqlHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/mysql/src/Hook/MysqlHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\Tests\\\\mysql\\\\Kernel\\\\mysql\\\\DbDumpTest\\:\\:assertPathAliasExists\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -28351,12 +28063,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/mysql/tests/src/Kernel/mysql/SchemaTest.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\navigation_top_bar\\\\Hook\\\\NavigationTopBarHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/navigation/modules/navigation_top_bar/src/Hook/NavigationTopBarHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Function navigation_post_update_set_logo_dimensions_default\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -28387,12 +28093,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/navigation/src/Form/SettingsForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\navigation\\\\Hook\\\\NavigationHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/navigation/src/Hook/NavigationHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\navigation\\\\NavigationContentLinks\\:\\:create\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -28699,12 +28399,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/node/src/Form/RebuildPermissionsForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\node\\\\Hook\\\\NodeHooks1\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/node/src/Hook/NodeHooks1.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\node\\\\NodeAccessControlHandler\\:\\:deleteGrants\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -29659,12 +29353,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/options/options.module',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\options\\\\Hook\\\\OptionsHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/options/src/Hook/OptionsHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Access to an undefined property Drupal\\\\options\\\\Plugin\\\\Field\\\\FieldType\\\\ListItemBase\\:\\:\\$value\\.$#',
 	'identifier' => 'property.notFound',
@@ -29773,12 +29461,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/options/tests/src/Kernel/Views/OptionsTestBase.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\page_cache\\\\Hook\\\\PageCacheHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/page_cache/src/Hook/PageCacheHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\page_cache\\\\StackMiddleware\\\\PageCache\\:\\:set\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -29875,12 +29557,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/path/src/Form/PathFilterForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\path\\\\Hook\\\\PathHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/path/src/Hook/PathHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\path\\\\PathAliasForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#',
 	'identifier' => 'return.missing',
@@ -30409,24 +30085,12 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/pgsql/src/Driver/Database/pgsql/Upsert.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\pgsql\\\\Hook\\\\PgsqlHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/pgsql/src/Hook/PgsqlHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\Tests\\\\pgsql\\\\Unit\\\\SchemaTest\\:\\:providerComputedConstraintName\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
 	'count' => 1,
 	'path' => __DIR__ . '/modules/pgsql/tests/src/Unit/SchemaTest.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\phpass\\\\Hook\\\\PhpassHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/phpass/src/Hook/PhpassHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\Tests\\\\phpass\\\\Unit\\\\PasswordVerifyTest\\:\\:providerLongPasswords\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -30439,12 +30103,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/responsive_image/responsive_image.module',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\responsive_image\\\\Hook\\\\ResponsiveImageHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/responsive_image/src/Hook/ResponsiveImageHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Variable \\$responsive_image_styles in empty\\(\\) always exists and is not falsy\\.$#',
 	'identifier' => 'empty.variable',
@@ -30601,12 +30259,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/rest/src/EventSubscriber/ResourceResponseSubscriber.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\rest\\\\Hook\\\\RestHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/rest/src/Hook/RestHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\rest\\\\Plugin\\\\rest\\\\resource\\\\EntityResource\\:\\:addLinkHeaders\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -31327,12 +30979,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/search/src/Form/SearchPageFormBase.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\search\\\\Hook\\\\SearchHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/search/src/Hook/SearchHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\search\\\\Plugin\\\\Block\\\\SearchBlock\\:\\:blockSubmit\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -31873,12 +31519,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/serialization/src/EventSubscriber/UserRouteAlterSubscriber.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\serialization\\\\Hook\\\\SerializationHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/serialization/src/Hook/SerializationHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\serialization\\\\Normalizer\\\\ComplexDataNormalizer\\:\\:normalize\\(\\) return type with generic class ArrayObject does not specify its types\\: TKey, TValue$#',
 	'identifier' => 'missingType.generics',
@@ -32137,12 +31777,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/settings_tray/src/Block/BlockEntitySettingTrayForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\settings_tray\\\\Hook\\\\SettingsTrayHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/settings_tray/src/Hook/SettingsTrayHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\settings_tray_test\\\\Form\\\\SettingsTrayFormAnnotationIsClassBlockForm\\:\\:submitConfigurationForm\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -32275,12 +31909,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/shortcut/src/Form/SwitchShortcutSet.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\shortcut\\\\Hook\\\\ShortcutHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/shortcut/src/Hook/ShortcutHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\shortcut\\\\ShortcutForm\\:\\:form\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -32749,18 +32377,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/sqlite/src/Driver/Database/sqlite/Schema.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\sqlite\\\\Hook\\\\SqliteHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/sqlite/src/Hook/SqliteHooks.php',
-];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\syslog\\\\Hook\\\\SyslogHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/syslog/src/Hook/SyslogHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\syslog\\\\Logger\\\\SysLog\\:\\:openConnection\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -33283,12 +32899,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/system/src/Form/ThemeSettingsForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\system\\\\Hook\\\\SystemHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/system/src/Hook/SystemHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\system\\\\PhpStorage\\\\MockPhpStorage\\:\\:getConfiguration\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -34893,18 +34503,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\experimental_module_requirements_test\\\\Hook\\\\ExperimentalModuleRequirementsTestHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/system/tests/modules/experimental_module_requirements_test/src/Hook/ExperimentalModuleRequirementsTestHooks.php',
-];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\experimental_module_test\\\\Hook\\\\ExperimentalModuleTestHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/system/tests/modules/experimental_module_test/src/Hook/ExperimentalModuleTestHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\form_test\\\\Callbacks\\:\\:validateName\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -36267,12 +35865,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Form/CopyFieldValueTestForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\system_test\\\\Hook\\\\SystemTestHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/system/tests/modules/system_test/src/Hook/SystemTestHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\system_test\\\\MockFileTransfer\\:\\:getSettingsForm\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -38451,12 +38043,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/taxonomy/src/Form/VocabularyResetForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\taxonomy\\\\Hook\\\\TaxonomyHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/taxonomy/src/Hook/TaxonomyHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\taxonomy\\\\Plugin\\\\Validation\\\\Constraint\\\\TaxonomyTermHierarchyConstraintValidator\\:\\:create\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -39243,18 +38829,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/taxonomy/tests/src/Unit/Menu/TaxonomyLocalTasksTest.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\telephone\\\\Hook\\\\TelephoneHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/telephone/src/Hook/TelephoneHooks.php',
-];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\text\\\\Hook\\\\TextHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/text/src/Hook/TextHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\text\\\\Plugin\\\\Field\\\\FieldType\\\\TextFieldItemList\\:\\:defaultValuesFormValidate\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -39327,12 +38901,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/toolbar/src/Controller/ToolbarController.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\toolbar\\\\Hook\\\\ToolbarHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/toolbar/src/Hook/ToolbarHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\Tests\\\\toolbar\\\\Functional\\\\ToolbarCacheContextsTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -39411,12 +38979,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/update/src/Form/UpdateReady.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\update\\\\Hook\\\\UpdateHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/update/src/Hook/UpdateHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\update\\\\ProjectCoreCompatibility\\:\\:setReleaseMessage\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -39981,12 +39543,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/user/src/Form/UserPermissionsForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\user\\\\Hook\\\\UserHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/user/src/Hook/UserHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\user\\\\Plugin\\\\Action\\\\AddRoleUser\\:\\:execute\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -41547,12 +41103,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/views/src/Form/ViewsFormMainForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/views/src/Hook/ViewsHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\views\\\\ManyToOneHelper\\:\\:addFilter\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -49281,12 +48831,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/views_ui/src/Form/BreakLockForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\views_ui\\\\Hook\\\\ViewsUiHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/views_ui/src/Hook/ViewsUiHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\views_ui\\\\ViewAddForm\\:\\:cancel\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
@@ -49995,12 +49539,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/workflows/src/Form/WorkflowTransitionEditForm.php',
 ];
-$ignoreErrors[] = [
-	'message' => '#^Method Drupal\\\\workflows\\\\Hook\\\\WorkflowsHooks\\:\\:help\\(\\) has no return type specified\\.$#',
-	'identifier' => 'missingType.return',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/workflows/src/Hook/WorkflowsHooks.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^Method Drupal\\\\workflows\\\\Plugin\\\\WorkflowTypeBase\\:\\:setConfiguration\\(\\) has no return type specified\\.$#',
 	'identifier' => 'missingType.return',
diff --git a/core/modules/announcements_feed/src/Hook/AnnouncementsFeedHooks.php b/core/modules/announcements_feed/src/Hook/AnnouncementsFeedHooks.php
index 47eb5113d9c0..5c87ef9a74e5 100644
--- a/core/modules/announcements_feed/src/Hook/AnnouncementsFeedHooks.php
+++ b/core/modules/announcements_feed/src/Hook/AnnouncementsFeedHooks.php
@@ -19,7 +19,7 @@ class AnnouncementsFeedHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.announcements_feed':
         $output = '';
@@ -35,6 +35,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/automated_cron/src/Hook/AutomatedCronHooks.php b/core/modules/automated_cron/src/Hook/AutomatedCronHooks.php
index 3c0ffbdfc86d..05c4ee14505c 100644
--- a/core/modules/automated_cron/src/Hook/AutomatedCronHooks.php
+++ b/core/modules/automated_cron/src/Hook/AutomatedCronHooks.php
@@ -18,7 +18,7 @@ class AutomatedCronHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.automated_cron':
         $output = '';
@@ -37,6 +37,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/ban/src/Hook/BanHooks.php b/core/modules/ban/src/Hook/BanHooks.php
index b299f4274514..db2dcf30ec5f 100644
--- a/core/modules/ban/src/Hook/BanHooks.php
+++ b/core/modules/ban/src/Hook/BanHooks.php
@@ -18,7 +18,7 @@ class BanHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.ban':
         $output = '';
@@ -34,6 +34,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
       case 'ban.admin_page':
         return '<p>' . $this->t('IP addresses listed here are banned from your site. Banned addresses are completely forbidden from accessing the site and instead see a brief message explaining the situation.') . '</p>';
     }
+    return NULL;
   }
 
 }
diff --git a/core/modules/basic_auth/src/Hook/BasicAuthHooks.php b/core/modules/basic_auth/src/Hook/BasicAuthHooks.php
index a133c99ef230..73a8e64ed767 100644
--- a/core/modules/basic_auth/src/Hook/BasicAuthHooks.php
+++ b/core/modules/basic_auth/src/Hook/BasicAuthHooks.php
@@ -18,7 +18,7 @@ class BasicAuthHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.basic_auth':
         $output = '';
@@ -31,6 +31,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         ]) . '</p>';
         return $output;
     }
+    return NULL;
   }
 
 }
diff --git a/core/modules/big_pipe/src/Hook/BigPipeHooks.php b/core/modules/big_pipe/src/Hook/BigPipeHooks.php
index f9d2a87f1c0a..0e6a56b8f6ec 100644
--- a/core/modules/big_pipe/src/Hook/BigPipeHooks.php
+++ b/core/modules/big_pipe/src/Hook/BigPipeHooks.php
@@ -19,7 +19,7 @@ class BigPipeHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.big_pipe':
         $output = '<h2>' . $this->t('About') . '</h2>';
@@ -33,6 +33,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/block/src/Hook/BlockHooks.php b/core/modules/block/src/Hook/BlockHooks.php
index 5b0991bcc502..a40532284a15 100644
--- a/core/modules/block/src/Hook/BlockHooks.php
+++ b/core/modules/block/src/Hook/BlockHooks.php
@@ -23,7 +23,7 @@ class BlockHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.block':
         $block_content = \Drupal::moduleHandler()->moduleExists('block_content') ? Url::fromRoute('help.page', ['name' => 'block_content'])->toString() : '#';
@@ -54,6 +54,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
       $output .= '<p>' . Link::fromTextAndUrl($this->t('Demonstrate block regions (@theme)', ['@theme' => $themes[$demo_theme]->info['name']]), Url::fromRoute('block.admin_demo', ['theme' => $demo_theme]))->toString() . '</p>';
       return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/block_content/src/Hook/BlockContentHooks.php b/core/modules/block_content/src/Hook/BlockContentHooks.php
index d7907dfdf34d..6852bd4d49ed 100644
--- a/core/modules/block_content/src/Hook/BlockContentHooks.php
+++ b/core/modules/block_content/src/Hook/BlockContentHooks.php
@@ -23,7 +23,7 @@ class BlockContentHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.block_content':
         $field_ui = \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#';
@@ -48,6 +48,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/breakpoint/src/Hook/BreakpointHooks.php b/core/modules/breakpoint/src/Hook/BreakpointHooks.php
index b1da0df2d45e..55e0f605b6bf 100644
--- a/core/modules/breakpoint/src/Hook/BreakpointHooks.php
+++ b/core/modules/breakpoint/src/Hook/BreakpointHooks.php
@@ -17,7 +17,7 @@ class BreakpointHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.breakpoint':
         $output = '';
@@ -41,6 +41,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/ckeditor5/src/Hook/Ckeditor5Hooks.php b/core/modules/ckeditor5/src/Hook/Ckeditor5Hooks.php
index bd3f133c0eea..d47451528cf5 100644
--- a/core/modules/ckeditor5/src/Hook/Ckeditor5Hooks.php
+++ b/core/modules/ckeditor5/src/Hook/Ckeditor5Hooks.php
@@ -23,7 +23,7 @@ class Ckeditor5Hooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.ckeditor5':
         $output = '';
@@ -87,6 +87,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/comment/src/Hook/CommentHooks.php b/core/modules/comment/src/Hook/CommentHooks.php
index 196fdf6890b9..b4550ad66eb8 100644
--- a/core/modules/comment/src/Hook/CommentHooks.php
+++ b/core/modules/comment/src/Hook/CommentHooks.php
@@ -31,7 +31,7 @@ class CommentHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.comment':
         $output = '<h2>' . $this->t('About') . '</h2>';
@@ -68,6 +68,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output = '<p>' . $this->t('This page provides a list of all comment types on the site and allows you to manage the fields, form and display settings for each.') . '</p>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/config/src/Hook/ConfigHooks.php b/core/modules/config/src/Hook/ConfigHooks.php
index 1fafec387a77..b28e2519fb22 100644
--- a/core/modules/config/src/Hook/ConfigHooks.php
+++ b/core/modules/config/src/Hook/ConfigHooks.php
@@ -19,7 +19,7 @@ class ConfigHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.config':
         $output = '';
@@ -69,6 +69,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '<p>' . $this->t('Import a single configuration item by pasting its YAML structure into the text field.') . '</p>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/config_translation/src/Hook/ConfigTranslationHooks.php b/core/modules/config_translation/src/Hook/ConfigTranslationHooks.php
index f1fd2434efca..21daa8b7a2c9 100644
--- a/core/modules/config_translation/src/Hook/ConfigTranslationHooks.php
+++ b/core/modules/config_translation/src/Hook/ConfigTranslationHooks.php
@@ -21,7 +21,7 @@ class ConfigTranslationHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.config_translation':
         $output = '';
@@ -62,6 +62,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output = '<p>' . $this->t('This page lists all configuration items on your site that have translatable text, like your site name, role names, etc.') . '</p>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/contact/src/Hook/ContactHooks.php b/core/modules/contact/src/Hook/ContactHooks.php
index 16fb53327227..3ed2831c122b 100644
--- a/core/modules/contact/src/Hook/ContactHooks.php
+++ b/core/modules/contact/src/Hook/ContactHooks.php
@@ -21,7 +21,7 @@ class ContactHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.contact':
         $menu_page = \Drupal::moduleHandler()->moduleExists('menu_ui') ? Url::fromRoute('entity.menu.collection')->toString() : '#';
@@ -43,6 +43,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/content_moderation/src/Hook/ContentModerationHooks.php b/core/modules/content_moderation/src/Hook/ContentModerationHooks.php
index ad2d2fe411de..bace7d9d24ee 100644
--- a/core/modules/content_moderation/src/Hook/ContentModerationHooks.php
+++ b/core/modules/content_moderation/src/Hook/ContentModerationHooks.php
@@ -41,7 +41,7 @@ class ContentModerationHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       // Main module help for the content_moderation module.
       case 'help.page.content_moderation':
@@ -78,6 +78,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/content_translation/src/Hook/ContentTranslationHooks.php b/core/modules/content_translation/src/Hook/ContentTranslationHooks.php
index 69fb38b71204..0f38a7f005db 100644
--- a/core/modules/content_translation/src/Hook/ContentTranslationHooks.php
+++ b/core/modules/content_translation/src/Hook/ContentTranslationHooks.php
@@ -29,7 +29,7 @@ class ContentTranslationHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.content_translation':
         $output = '';
@@ -79,6 +79,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         }
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/contextual/src/Hook/ContextualHooks.php b/core/modules/contextual/src/Hook/ContextualHooks.php
index f0d0c7efb9ab..3c3f451d0d84 100644
--- a/core/modules/contextual/src/Hook/ContextualHooks.php
+++ b/core/modules/contextual/src/Hook/ContextualHooks.php
@@ -75,7 +75,7 @@ public function pageAttachments(array &$page): void {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.contextual':
         $output = '';
@@ -105,6 +105,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/datetime/src/Hook/DatetimeHooks.php b/core/modules/datetime/src/Hook/DatetimeHooks.php
index 34b9eb81eb5d..66fbd1babfe8 100644
--- a/core/modules/datetime/src/Hook/DatetimeHooks.php
+++ b/core/modules/datetime/src/Hook/DatetimeHooks.php
@@ -18,7 +18,7 @@ class DatetimeHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.datetime':
         $output = '';
@@ -47,6 +47,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
 }
diff --git a/core/modules/datetime_range/src/Hook/DatetimeRangeHooks.php b/core/modules/datetime_range/src/Hook/DatetimeRangeHooks.php
index 2bc26e726c19..bd8aa1a77be6 100644
--- a/core/modules/datetime_range/src/Hook/DatetimeRangeHooks.php
+++ b/core/modules/datetime_range/src/Hook/DatetimeRangeHooks.php
@@ -18,7 +18,7 @@ class DatetimeRangeHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.datetime_range':
         $output = '';
@@ -47,6 +47,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
 }
diff --git a/core/modules/dblog/src/Hook/DblogHooks.php b/core/modules/dblog/src/Hook/DblogHooks.php
index d6675f88d353..5303fcc090e4 100644
--- a/core/modules/dblog/src/Hook/DblogHooks.php
+++ b/core/modules/dblog/src/Hook/DblogHooks.php
@@ -21,7 +21,7 @@ class DblogHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.dblog':
         $output = '';
@@ -41,6 +41,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
       case 'dblog.overview':
         return '<p>' . $this->t('The Database Logging module logs system events in the Drupal database. Monitor your site or debug site problems on this page.') . '</p>';
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/dynamic_page_cache/src/Hook/DynamicPageCacheHooks.php b/core/modules/dynamic_page_cache/src/Hook/DynamicPageCacheHooks.php
index 7eab2af3795e..43a88cea8153 100644
--- a/core/modules/dynamic_page_cache/src/Hook/DynamicPageCacheHooks.php
+++ b/core/modules/dynamic_page_cache/src/Hook/DynamicPageCacheHooks.php
@@ -17,7 +17,7 @@ class DynamicPageCacheHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.dynamic_page_cache':
         $output = '<h2>' . $this->t('About') . '</h2>';
@@ -32,6 +32,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
 }
diff --git a/core/modules/editor/src/Hook/EditorHooks.php b/core/modules/editor/src/Hook/EditorHooks.php
index 92958c468fff..952dbff1db5e 100644
--- a/core/modules/editor/src/Hook/EditorHooks.php
+++ b/core/modules/editor/src/Hook/EditorHooks.php
@@ -26,7 +26,7 @@ class EditorHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.editor':
         $output = '';
@@ -55,6 +55,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/field/src/Hook/FieldHooks.php b/core/modules/field/src/Hook/FieldHooks.php
index 888fd503acdc..aa759522f458 100644
--- a/core/modules/field/src/Hook/FieldHooks.php
+++ b/core/modules/field/src/Hook/FieldHooks.php
@@ -67,7 +67,7 @@ class FieldHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.field':
         $field_ui_url = \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#';
@@ -160,6 +160,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/field_layout/src/Hook/FieldLayoutHooks.php b/core/modules/field_layout/src/Hook/FieldLayoutHooks.php
index 7d8b0b80145b..04b7ae4a55f9 100644
--- a/core/modules/field_layout/src/Hook/FieldLayoutHooks.php
+++ b/core/modules/field_layout/src/Hook/FieldLayoutHooks.php
@@ -27,7 +27,7 @@ class FieldLayoutHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.field_layout':
         $output = '<h2>' . $this->t('About') . '</h2>';
@@ -37,6 +37,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         ]) . '</p>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/field_ui/src/Hook/FieldUiHooks.php b/core/modules/field_ui/src/Hook/FieldUiHooks.php
index ff4a88dc8da1..06434e2ec4df 100644
--- a/core/modules/field_ui/src/Hook/FieldUiHooks.php
+++ b/core/modules/field_ui/src/Hook/FieldUiHooks.php
@@ -25,7 +25,7 @@ class FieldUiHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.field_ui':
         $output = '';
@@ -68,6 +68,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
       case 'entity.field_storage_config.collection':
         return '<p>' . $this->t('This list shows all fields currently in use for easy reference.') . '</p>';
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/filter/src/Hook/FilterHooks.php b/core/modules/filter/src/Hook/FilterHooks.php
index e08779ad0be5..cda7d6ec9fda 100644
--- a/core/modules/filter/src/Hook/FilterHooks.php
+++ b/core/modules/filter/src/Hook/FilterHooks.php
@@ -18,7 +18,7 @@ class FilterHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.filter':
         $output = '';
@@ -61,6 +61,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output = '<p>' . $this->t('A text format contains filters that change the display of user input; for example, stripping out malicious HTML or making URLs clickable. Filters are executed from top to bottom and the order is important, since one filter may prevent another filter from doing its job. For example, when URLs are converted into links before disallowed HTML tags are removed, all links may be removed. When this happens, the order of filters may need to be rearranged.') . '</p>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/help/help.api.php b/core/modules/help/help.api.php
index 1dc6fb0d84e7..9546e6b9776b 100644
--- a/core/modules/help/help.api.php
+++ b/core/modules/help/help.api.php
@@ -65,11 +65,11 @@
  *   The current route match. This can be used to generate different help
  *   output for different pages that share the same route.
  *
- * @return string|array
+ * @return string|\Stringable|array|null
  *   A render array, localized string, or object that can be rendered into
  *   a string, containing the help text.
  */
-function hook_help($route_name, RouteMatchInterface $route_match) {
+function hook_help($route_name, RouteMatchInterface $route_match): string|\Stringable|array|null {
   switch ($route_name) {
     // Main module help for the block module.
     case 'help.page.block':
@@ -79,6 +79,7 @@ function hook_help($route_name, RouteMatchInterface $route_match) {
     case 'block.admin_display':
       return '<p>' . t('This page provides a drag-and-drop interface for assigning a block to a region, and for controlling the order of blocks within regions. Since not all themes implement the same regions, or display regions in the same way, blocks are positioned on a per-theme basis. Remember that your changes will not be saved until you click the <em>Save blocks</em> button at the bottom of the page.') . '</p>';
   }
+  return NULL;
 }
 
 /**
diff --git a/core/modules/help/src/Hook/HelpHooks.php b/core/modules/help/src/Hook/HelpHooks.php
index b2367f7debb6..201a08b0a725 100644
--- a/core/modules/help/src/Hook/HelpHooks.php
+++ b/core/modules/help/src/Hook/HelpHooks.php
@@ -19,7 +19,7 @@ class HelpHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): string|array|null {
     switch ($route_name) {
       case 'help.main':
         $output = '<h2>' . $this->t('Getting Started') . '</h2>';
@@ -87,6 +87,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $help_home = Url::fromRoute('help.main')->toString();
         return '<p>' . $this->t('See the <a href=":help_page">Help page</a> for more topics.', [':help_page' => $help_home]) . '</p>';
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/help/tests/modules/help_page_test/src/Hook/HelpPageTestHooks.php b/core/modules/help/tests/modules/help_page_test/src/Hook/HelpPageTestHooks.php
index d45575b021ca..0d06550c714a 100644
--- a/core/modules/help/tests/modules/help_page_test/src/Hook/HelpPageTestHooks.php
+++ b/core/modules/help/tests/modules/help_page_test/src/Hook/HelpPageTestHooks.php
@@ -16,7 +16,7 @@ class HelpPageTestHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): string|array {
     switch ($route_name) {
       case 'help.page.help_page_test':
         // Make the help text conform to core standards. See
diff --git a/core/modules/help/tests/modules/help_test/src/Hook/HelpTestHooks.php b/core/modules/help/tests/modules/help_test/src/Hook/HelpTestHooks.php
index e716664ff48b..4175f500cd13 100644
--- a/core/modules/help/tests/modules/help_test/src/Hook/HelpTestHooks.php
+++ b/core/modules/help/tests/modules/help_test/src/Hook/HelpTestHooks.php
@@ -16,9 +16,10 @@ class HelpTestHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): null {
     // Do not implement a module overview page to test an empty implementation.
     // @see \Drupal\help\Tests\HelpTest
+    return NULL;
   }
 
 }
diff --git a/core/modules/help/tests/modules/help_topics_test/src/Hook/HelpTopicsTestHooks.php b/core/modules/help/tests/modules/help_topics_test/src/Hook/HelpTopicsTestHooks.php
index f1704f4c408d..a363dc709af7 100644
--- a/core/modules/help/tests/modules/help_topics_test/src/Hook/HelpTopicsTestHooks.php
+++ b/core/modules/help/tests/modules/help_topics_test/src/Hook/HelpTopicsTestHooks.php
@@ -16,11 +16,12 @@ class HelpTopicsTestHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.help_topics_test':
         return 'Some kind of non-empty output for testing';
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/help/tests/modules/more_help_page_test/src/Hook/MoreHelpPageTestHooks.php b/core/modules/help/tests/modules/more_help_page_test/src/Hook/MoreHelpPageTestHooks.php
index 96665384d6a2..b882be1752c0 100644
--- a/core/modules/help/tests/modules/more_help_page_test/src/Hook/MoreHelpPageTestHooks.php
+++ b/core/modules/help/tests/modules/more_help_page_test/src/Hook/MoreHelpPageTestHooks.php
@@ -16,12 +16,13 @@ class MoreHelpPageTestHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?array {
     switch ($route_name) {
       // Return help for the same route as the help_page_test module.
       case 'help_page_test.test_array':
         return ['#markup' => 'Help text from more_help_page_test_help module.'];
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/history/src/Hook/HistoryHooks.php b/core/modules/history/src/Hook/HistoryHooks.php
index 7508305f705d..0d2c107d7f04 100644
--- a/core/modules/history/src/Hook/HistoryHooks.php
+++ b/core/modules/history/src/Hook/HistoryHooks.php
@@ -21,7 +21,7 @@ class HistoryHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.history':
         $output = '<h2>' . $this->t('About') . '</h2>';
@@ -33,6 +33,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         ]) . '</p>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/image/src/Hook/ImageHooks.php b/core/modules/image/src/Hook/ImageHooks.php
index f864ee9a06a2..2d6af269220b 100644
--- a/core/modules/image/src/Hook/ImageHooks.php
+++ b/core/modules/image/src/Hook/ImageHooks.php
@@ -25,7 +25,7 @@ class ImageHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.image':
         $field_ui_url = \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#';
@@ -75,6 +75,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $effect_definition = $effect->getPluginDefinition();
         return isset($effect_definition['description']) ? '<p>' . $effect_definition['description'] . '</p>' : NULL;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/inline_form_errors/src/Hook/InlineFormErrorsHooks.php b/core/modules/inline_form_errors/src/Hook/InlineFormErrorsHooks.php
index 97df9077f85f..f9284cb9eaee 100644
--- a/core/modules/inline_form_errors/src/Hook/InlineFormErrorsHooks.php
+++ b/core/modules/inline_form_errors/src/Hook/InlineFormErrorsHooks.php
@@ -18,7 +18,7 @@ class InlineFormErrorsHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.inline_form_errors':
         $output = '';
@@ -34,6 +34,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '<dd>' . $this->t('In browsers that support HTML5 form validation, users will first see the error messages generated by their browser. In this case, the inline form error messages are only displayed after the HTML5 validation errors have been resolved.') . '</dd>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/jsonapi/src/Hook/JsonapiHooks.php b/core/modules/jsonapi/src/Hook/JsonapiHooks.php
index bafe5467a5b0..7db75a3297be 100644
--- a/core/modules/jsonapi/src/Hook/JsonapiHooks.php
+++ b/core/modules/jsonapi/src/Hook/JsonapiHooks.php
@@ -22,7 +22,7 @@ class JsonapiHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.jsonapi':
         $output = '<h2>' . $this->t('About') . '</h2>';
diff --git a/core/modules/language/src/Hook/LanguageHooks.php b/core/modules/language/src/Hook/LanguageHooks.php
index ef0b7c84861e..3135d8c06a6e 100644
--- a/core/modules/language/src/Hook/LanguageHooks.php
+++ b/core/modules/language/src/Hook/LanguageHooks.php
@@ -34,7 +34,7 @@ class LanguageHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.language':
         $output = '';
@@ -136,6 +136,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
       case 'language.content_settings_page':
         return '<p>' . $this->t("Change language settings for <em>content types</em>, <em>taxonomy vocabularies</em>, <em>user profiles</em>, or any other supported element on your site. By default, language settings hide the language selector and the language is the site's default language.") . '</p>';
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/layout_builder/modules/layout_builder_expose_all_field_blocks/src/Hook/LayoutBuilderExposeAllFieldBlocksHooks.php b/core/modules/layout_builder/modules/layout_builder_expose_all_field_blocks/src/Hook/LayoutBuilderExposeAllFieldBlocksHooks.php
index 6b213b2dc702..7ae49b6217c5 100644
--- a/core/modules/layout_builder/modules/layout_builder_expose_all_field_blocks/src/Hook/LayoutBuilderExposeAllFieldBlocksHooks.php
+++ b/core/modules/layout_builder/modules/layout_builder_expose_all_field_blocks/src/Hook/LayoutBuilderExposeAllFieldBlocksHooks.php
@@ -17,7 +17,7 @@ class LayoutBuilderExposeAllFieldBlocksHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.layout_builder_expose_all_field_blocks':
         $output = '<h2>' . $this->t('About') . '</h2>';
diff --git a/core/modules/layout_builder/src/Hook/LayoutBuilderHooks.php b/core/modules/layout_builder/src/Hook/LayoutBuilderHooks.php
index 7f30060ad3fd..d12f9f0bc684 100644
--- a/core/modules/layout_builder/src/Hook/LayoutBuilderHooks.php
+++ b/core/modules/layout_builder/src/Hook/LayoutBuilderHooks.php
@@ -38,7 +38,7 @@ class LayoutBuilderHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     // Add help text to the Layout Builder UI.
     if ($route_match->getRouteObject()->getOption('_layout_builder')) {
       $output = '<p>' . $this->t('This layout builder tool allows you to configure the layout of the main content area.') . '</p>';
@@ -82,6 +82,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/layout_discovery/src/Hook/LayoutDiscoveryHooks.php b/core/modules/layout_discovery/src/Hook/LayoutDiscoveryHooks.php
index bc127e6257f0..9464c15d487f 100644
--- a/core/modules/layout_discovery/src/Hook/LayoutDiscoveryHooks.php
+++ b/core/modules/layout_discovery/src/Hook/LayoutDiscoveryHooks.php
@@ -16,7 +16,7 @@ class LayoutDiscoveryHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name) {
+  public function help($route_name): ?string {
     switch ($route_name) {
       case 'help.page.layout_discovery':
         $output = '<h2>' . $this->t('About') . '</h2>';
@@ -26,6 +26,7 @@ public function help($route_name) {
         ]) . '</p>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/link/src/Hook/LinkHooks.php b/core/modules/link/src/Hook/LinkHooks.php
index 8bfe2cb7ab11..b7d90d41005b 100644
--- a/core/modules/link/src/Hook/LinkHooks.php
+++ b/core/modules/link/src/Hook/LinkHooks.php
@@ -19,7 +19,7 @@ class LinkHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.link':
         $output = '';
@@ -54,6 +54,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/locale/src/Hook/LocaleHooks.php b/core/modules/locale/src/Hook/LocaleHooks.php
index cb8268439f46..69a47783a7d5 100644
--- a/core/modules/locale/src/Hook/LocaleHooks.php
+++ b/core/modules/locale/src/Hook/LocaleHooks.php
@@ -23,7 +23,7 @@ class LocaleHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.locale':
         $output = '';
@@ -87,6 +87,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
       case 'locale.translate_export':
         return '<p>' . $this->t('This page exports the translated strings used by your site. An export file may be in Gettext Portable Object (<em>.po</em>) form, which includes both the original string and the translation (used to share translations with others), or in Gettext Portable Object Template (<em>.pot</em>) form, which includes the original strings only (used to create new translations with a Gettext translation editor).') . '</p>';
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/media/src/Hook/MediaHooks.php b/core/modules/media/src/Hook/MediaHooks.php
index 1e45715a8821..d6b657d9d09e 100644
--- a/core/modules/media/src/Hook/MediaHooks.php
+++ b/core/modules/media/src/Hook/MediaHooks.php
@@ -26,7 +26,7 @@ class MediaHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.media':
         $output = '<h2>' . $this->t('About') . '</h2>';
@@ -71,6 +71,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '<p>' . $this->t('Use <em>Media</em> reference fields for most files, images, audio, videos, and remote media. Use <em>File</em> or <em>Image</em> reference fields when creating your own media types, or for legacy files and images created before installing the Media module.') . '</p>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/media_library/src/Hook/MediaLibraryHooks.php b/core/modules/media_library/src/Hook/MediaLibraryHooks.php
index 0d0435006518..b31adba834c2 100644
--- a/core/modules/media_library/src/Hook/MediaLibraryHooks.php
+++ b/core/modules/media_library/src/Hook/MediaLibraryHooks.php
@@ -32,7 +32,7 @@ class MediaLibraryHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.media_library':
         $output = '<h2>' . $this->t('About') . '</h2>';
@@ -76,6 +76,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</ul>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/menu_link_content/src/Hook/MenuLinkContentHooks.php b/core/modules/menu_link_content/src/Hook/MenuLinkContentHooks.php
index e696519b68a8..94e4c77eae21 100644
--- a/core/modules/menu_link_content/src/Hook/MenuLinkContentHooks.php
+++ b/core/modules/menu_link_content/src/Hook/MenuLinkContentHooks.php
@@ -21,7 +21,7 @@ class MenuLinkContentHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.menu_link_content':
         $output = '';
@@ -41,6 +41,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</p>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/menu_ui/src/Hook/MenuUiHooks.php b/core/modules/menu_ui/src/Hook/MenuUiHooks.php
index 572c554c317f..ac7c7602f3be 100644
--- a/core/modules/menu_ui/src/Hook/MenuUiHooks.php
+++ b/core/modules/menu_ui/src/Hook/MenuUiHooks.php
@@ -28,7 +28,7 @@ class MenuUiHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.menu_ui':
         $output = '';
@@ -60,6 +60,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
     elseif ($route_name == 'entity.menu.collection' && \Drupal::moduleHandler()->moduleExists('block') && \Drupal::currentUser()->hasPermission('administer blocks')) {
       return '<p>' . $this->t('Each menu has a corresponding block that is managed on the <a href=":blocks">Block layout page</a>.', [':blocks' => Url::fromRoute('block.admin_display')->toString()]) . '</p>';
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/migrate/src/Hook/MigrateHooks.php b/core/modules/migrate/src/Hook/MigrateHooks.php
index 4f54ec197922..22d05cf8b4ac 100644
--- a/core/modules/migrate/src/Hook/MigrateHooks.php
+++ b/core/modules/migrate/src/Hook/MigrateHooks.php
@@ -17,7 +17,7 @@ class MigrateHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.migrate':
         $output = '<h2>' . $this->t('About') . '</h2>';
@@ -26,6 +26,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</p>';
         return $output;
     }
+    return NULL;
   }
 
 }
diff --git a/core/modules/migrate_drupal/src/Hook/MigrateDrupalHooks.php b/core/modules/migrate_drupal/src/Hook/MigrateDrupalHooks.php
index 1fbeeda44bc4..3db220c05196 100644
--- a/core/modules/migrate_drupal/src/Hook/MigrateDrupalHooks.php
+++ b/core/modules/migrate_drupal/src/Hook/MigrateDrupalHooks.php
@@ -23,7 +23,7 @@ class MigrateDrupalHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.migrate_drupal':
         $output = '';
@@ -36,6 +36,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         ]) . '</p>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/migrate_drupal_ui/src/Hook/MigrateDrupalUiHooks.php b/core/modules/migrate_drupal_ui/src/Hook/MigrateDrupalUiHooks.php
index 5ff282cd0995..02cc98ffb466 100644
--- a/core/modules/migrate_drupal_ui/src/Hook/MigrateDrupalUiHooks.php
+++ b/core/modules/migrate_drupal_ui/src/Hook/MigrateDrupalUiHooks.php
@@ -18,7 +18,7 @@ class MigrateDrupalUiHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.migrate_drupal_ui':
         $output = '';
@@ -47,6 +47,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
 }
diff --git a/core/modules/mysql/src/Hook/MysqlHooks.php b/core/modules/mysql/src/Hook/MysqlHooks.php
index c1ada0bf7432..ba1d45c2d671 100644
--- a/core/modules/mysql/src/Hook/MysqlHooks.php
+++ b/core/modules/mysql/src/Hook/MysqlHooks.php
@@ -17,7 +17,7 @@ class MysqlHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.mysql':
         $output = '';
@@ -27,6 +27,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         ]) . '</p>';
         return $output;
     }
+    return NULL;
   }
 
 }
diff --git a/core/modules/navigation/modules/navigation_top_bar/src/Hook/NavigationTopBarHooks.php b/core/modules/navigation/modules/navigation_top_bar/src/Hook/NavigationTopBarHooks.php
index 459fe60dc604..7c76e867bb2d 100644
--- a/core/modules/navigation/modules/navigation_top_bar/src/Hook/NavigationTopBarHooks.php
+++ b/core/modules/navigation/modules/navigation_top_bar/src/Hook/NavigationTopBarHooks.php
@@ -17,7 +17,7 @@ class NavigationTopBarHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.navigation_top_bar':
         $output = '<h2>' . $this->t('About') . '</h2>';
@@ -28,6 +28,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '<p>' . $this->t('For more information, see the <a href=":docs">online documentation for the Navigation Top Bar module</a>.', [':docs' => 'https://www.drupal.org/project/navigation']) . '</p>';
         return $output;
     }
+    return NULL;
   }
 
 }
diff --git a/core/modules/navigation/src/Hook/NavigationHooks.php b/core/modules/navigation/src/Hook/NavigationHooks.php
index 740ac71add28..f380aee48a05 100644
--- a/core/modules/navigation/src/Hook/NavigationHooks.php
+++ b/core/modules/navigation/src/Hook/NavigationHooks.php
@@ -37,7 +37,7 @@ public function __construct(
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.navigation':
         $output = '';
@@ -55,6 +55,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
       $output .= '<p>' . $this->t('Forms and links inside the content of the layout builder tool have been disabled.') . '</p>';
       return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/node/src/Hook/NodeHooks1.php b/core/modules/node/src/Hook/NodeHooks1.php
index 7f8bdd8c1872..8e25f2eb066c 100644
--- a/core/modules/node/src/Hook/NodeHooks1.php
+++ b/core/modules/node/src/Hook/NodeHooks1.php
@@ -30,7 +30,7 @@ class NodeHooks1 {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     // Remind site administrators about the {node_access} table being flagged
     // for rebuild. We don't need to issue the message on the confirm form, or
     // while the rebuild is being processed.
@@ -108,6 +108,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $help = $type->getHelp();
         return !empty($help) ? Xss::filterAdmin($help) : '';
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/options/src/Hook/OptionsHooks.php b/core/modules/options/src/Hook/OptionsHooks.php
index add3bba5dd39..c4827f7baee2 100644
--- a/core/modules/options/src/Hook/OptionsHooks.php
+++ b/core/modules/options/src/Hook/OptionsHooks.php
@@ -20,7 +20,7 @@ class OptionsHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.options':
         $output = '';
@@ -49,6 +49,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/page_cache/src/Hook/PageCacheHooks.php b/core/modules/page_cache/src/Hook/PageCacheHooks.php
index ad4612b11e9e..ef40aed361a1 100644
--- a/core/modules/page_cache/src/Hook/PageCacheHooks.php
+++ b/core/modules/page_cache/src/Hook/PageCacheHooks.php
@@ -18,7 +18,7 @@ class PageCacheHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.page_cache':
         $output = '<h2>' . $this->t('About') . '</h2>';
@@ -42,6 +42,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
 }
diff --git a/core/modules/path/src/Hook/PathHooks.php b/core/modules/path/src/Hook/PathHooks.php
index ec9312749701..7c0d4331204a 100644
--- a/core/modules/path/src/Hook/PathHooks.php
+++ b/core/modules/path/src/Hook/PathHooks.php
@@ -27,7 +27,7 @@ class PathHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.path':
         $output = '';
@@ -58,6 +58,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
       case 'entity.path_alias.add_form':
         return '<p>' . $this->t('Enter the path you wish to create the alias for, followed by the name of the new alias.') . '</p>';
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/pgsql/src/Hook/PgsqlHooks.php b/core/modules/pgsql/src/Hook/PgsqlHooks.php
index d199f65f1516..c53f4720c949 100644
--- a/core/modules/pgsql/src/Hook/PgsqlHooks.php
+++ b/core/modules/pgsql/src/Hook/PgsqlHooks.php
@@ -17,7 +17,7 @@ class PgsqlHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.pgsql':
         $output = '';
@@ -27,6 +27,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         ]) . '</p>';
         return $output;
     }
+    return NULL;
   }
 
 }
diff --git a/core/modules/phpass/src/Hook/PhpassHooks.php b/core/modules/phpass/src/Hook/PhpassHooks.php
index 422d623006cb..edf0e2f4780d 100644
--- a/core/modules/phpass/src/Hook/PhpassHooks.php
+++ b/core/modules/phpass/src/Hook/PhpassHooks.php
@@ -18,7 +18,7 @@ class PhpassHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.phpass':
         $output = '';
@@ -31,6 +31,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '<p>' . $this->t('Passwords created before Drupal 10.1.0 <strong>will not work</strong> unless they are used at least once while this module is installed. Make sure that you can log in before uninstalling this module.') . '</p>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/responsive_image/src/Hook/ResponsiveImageHooks.php b/core/modules/responsive_image/src/Hook/ResponsiveImageHooks.php
index c75b4162e438..96d60bbe7f4b 100644
--- a/core/modules/responsive_image/src/Hook/ResponsiveImageHooks.php
+++ b/core/modules/responsive_image/src/Hook/ResponsiveImageHooks.php
@@ -18,7 +18,7 @@ class ResponsiveImageHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.responsive_image':
         $output = '';
@@ -68,6 +68,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
       case 'entity.responsive_image_style.collection':
         return '<p>' . $this->t('A responsive image style associates an image style with each breakpoint defined by your theme.') . '</p>';
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/rest/src/Hook/RestHooks.php b/core/modules/rest/src/Hook/RestHooks.php
index b5d5d4add5d2..315ef550de84 100644
--- a/core/modules/rest/src/Hook/RestHooks.php
+++ b/core/modules/rest/src/Hook/RestHooks.php
@@ -18,7 +18,7 @@ class RestHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.rest':
         $output = '';
@@ -58,6 +58,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
 }
diff --git a/core/modules/search/src/Hook/SearchHooks.php b/core/modules/search/src/Hook/SearchHooks.php
index 47b51209ddef..e3f78f11da2f 100644
--- a/core/modules/search/src/Hook/SearchHooks.php
+++ b/core/modules/search/src/Hook/SearchHooks.php
@@ -20,7 +20,7 @@ class SearchHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.search':
         $output = '';
@@ -71,6 +71,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/serialization/src/Hook/SerializationHooks.php b/core/modules/serialization/src/Hook/SerializationHooks.php
index 00ffa7913c5f..281303ae02f5 100644
--- a/core/modules/serialization/src/Hook/SerializationHooks.php
+++ b/core/modules/serialization/src/Hook/SerializationHooks.php
@@ -18,7 +18,7 @@ class SerializationHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.serialization':
         $output = '';
@@ -34,6 +34,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '<p>' . $this->t('For more information, see the <a href=":doc_url">online documentation for the Serialization module</a>.', [':doc_url' => 'https://www.drupal.org/documentation/modules/serialization']) . '</p>';
         return $output;
     }
+    return NULL;
   }
 
 }
diff --git a/core/modules/settings_tray/src/Hook/SettingsTrayHooks.php b/core/modules/settings_tray/src/Hook/SettingsTrayHooks.php
index c10a65d0f039..d54c413425b1 100644
--- a/core/modules/settings_tray/src/Hook/SettingsTrayHooks.php
+++ b/core/modules/settings_tray/src/Hook/SettingsTrayHooks.php
@@ -21,7 +21,7 @@ class SettingsTrayHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?array {
     switch ($route_name) {
       case 'help.page.settings_tray':
         $output = '<h2>' . $this->t('About') . '</h2>';
@@ -49,6 +49,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return ['#markup' => $output];
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/shortcut/src/Hook/ShortcutHooks.php b/core/modules/shortcut/src/Hook/ShortcutHooks.php
index d751d6dc3648..f6686fbfcd0f 100644
--- a/core/modules/shortcut/src/Hook/ShortcutHooks.php
+++ b/core/modules/shortcut/src/Hook/ShortcutHooks.php
@@ -19,7 +19,7 @@ class ShortcutHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.shortcut':
         $output = '<h2>' . $this->t('About') . '</h2>';
@@ -56,6 +56,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
           return $output;
         }
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/sqlite/src/Hook/SqliteHooks.php b/core/modules/sqlite/src/Hook/SqliteHooks.php
index f6fe55aa3d78..0dde128bcc94 100644
--- a/core/modules/sqlite/src/Hook/SqliteHooks.php
+++ b/core/modules/sqlite/src/Hook/SqliteHooks.php
@@ -17,7 +17,7 @@ class SqliteHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.sqlite':
         $output = '';
@@ -27,6 +27,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         ]) . '</p>';
         return $output;
     }
+    return NULL;
   }
 
 }
diff --git a/core/modules/syslog/src/Hook/SyslogHooks.php b/core/modules/syslog/src/Hook/SyslogHooks.php
index 4b45feec66b1..9ba5c3c8d529 100644
--- a/core/modules/syslog/src/Hook/SyslogHooks.php
+++ b/core/modules/syslog/src/Hook/SyslogHooks.php
@@ -20,7 +20,7 @@ class SyslogHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.syslog':
         $output = '';
@@ -35,6 +35,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/system/src/Hook/SystemHooks.php b/core/modules/system/src/Hook/SystemHooks.php
index 0c877d2b35b8..2df70cfa16c0 100644
--- a/core/modules/system/src/Hook/SystemHooks.php
+++ b/core/modules/system/src/Hook/SystemHooks.php
@@ -34,7 +34,7 @@ class SystemHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.system':
         $output = '';
@@ -154,6 +154,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
       case 'system.status':
         return '<p>' . $this->t("Here you can find a short overview of your site's parameters as well as any problems detected with your installation. It may be useful to copy and paste this information into support requests filed on Drupal.org's support forums and project issue queues. Before filing a support request, ensure that your web server meets the <a href=\":system-requirements\">system requirements.</a>", [':system-requirements' => 'https://www.drupal.org/docs/system-requirements']) . '</p>';
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/system/tests/modules/experimental_module_requirements_test/src/Hook/ExperimentalModuleRequirementsTestHooks.php b/core/modules/system/tests/modules/experimental_module_requirements_test/src/Hook/ExperimentalModuleRequirementsTestHooks.php
index 21fb30ec2a46..91246700ee78 100644
--- a/core/modules/system/tests/modules/experimental_module_requirements_test/src/Hook/ExperimentalModuleRequirementsTestHooks.php
+++ b/core/modules/system/tests/modules/experimental_module_requirements_test/src/Hook/ExperimentalModuleRequirementsTestHooks.php
@@ -18,12 +18,13 @@ class ExperimentalModuleRequirementsTestHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name) {
+  public function help($route_name): ?\Stringable {
     switch ($route_name) {
       case 'help.page.experimental_module_requirements_test':
         // Make the help text conform to core standards.
         return $this->t('The Experimental Requirements Test module is not done yet. It may eat your data, but you can read the <a href=":url">online documentation for the Experimental Requirements Test module</a>.', [':url' => 'http://www.example.com']);
     }
+    return NULL;
   }
 
 }
diff --git a/core/modules/system/tests/modules/experimental_module_test/src/Hook/ExperimentalModuleTestHooks.php b/core/modules/system/tests/modules/experimental_module_test/src/Hook/ExperimentalModuleTestHooks.php
index c76245d20312..07be32d09118 100644
--- a/core/modules/system/tests/modules/experimental_module_test/src/Hook/ExperimentalModuleTestHooks.php
+++ b/core/modules/system/tests/modules/experimental_module_test/src/Hook/ExperimentalModuleTestHooks.php
@@ -19,12 +19,13 @@ class ExperimentalModuleTestHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?\Stringable {
     switch ($route_name) {
       case 'help.page.experimental_module_test':
         // Make the help text conform to core standards.
         return $this->t('The Experimental Test module is not done yet. It may eat your data, but you can read the <a href=":url">online documentation for the Experimental Test module</a>.', [':url' => 'http://www.example.com']);
     }
+    return NULL;
   }
 
 }
diff --git a/core/modules/system/tests/modules/system_test/src/Hook/SystemTestHooks.php b/core/modules/system/tests/modules/system_test/src/Hook/SystemTestHooks.php
index 62b9b9633a11..1793efe207d3 100644
--- a/core/modules/system/tests/modules/system_test/src/Hook/SystemTestHooks.php
+++ b/core/modules/system/tests/modules/system_test/src/Hook/SystemTestHooks.php
@@ -20,7 +20,7 @@ class SystemTestHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.system_test':
         $output = '';
@@ -28,6 +28,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '<p>' . $this->t('This is a test help page for the system_test module for the purpose of testing if the "Help" link displays properly.') . '</p>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/taxonomy/src/Hook/TaxonomyHooks.php b/core/modules/taxonomy/src/Hook/TaxonomyHooks.php
index 51c122c91f45..4cc0a6f6eb61 100644
--- a/core/modules/taxonomy/src/Hook/TaxonomyHooks.php
+++ b/core/modules/taxonomy/src/Hook/TaxonomyHooks.php
@@ -20,7 +20,7 @@ class TaxonomyHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.taxonomy':
         $field_ui_url = \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#';
@@ -70,6 +70,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output = '<p>' . $this->t('Taxonomy is for categorizing content. Terms are grouped into vocabularies. For example, a vocabulary called "Fruit" would contain the terms "Apple" and "Banana".') . '</p>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/telephone/src/Hook/TelephoneHooks.php b/core/modules/telephone/src/Hook/TelephoneHooks.php
index 6813600e5a7f..e28384a10090 100644
--- a/core/modules/telephone/src/Hook/TelephoneHooks.php
+++ b/core/modules/telephone/src/Hook/TelephoneHooks.php
@@ -19,7 +19,7 @@ class TelephoneHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.telephone':
         $output = '';
@@ -46,6 +46,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/text/src/Hook/TextHooks.php b/core/modules/text/src/Hook/TextHooks.php
index 21835e4063a4..bced115286ff 100644
--- a/core/modules/text/src/Hook/TextHooks.php
+++ b/core/modules/text/src/Hook/TextHooks.php
@@ -18,7 +18,7 @@ class TextHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.text':
         $output = '';
@@ -53,6 +53,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
 }
diff --git a/core/modules/toolbar/src/Hook/ToolbarHooks.php b/core/modules/toolbar/src/Hook/ToolbarHooks.php
index aec157c03434..3b6ef42368a1 100644
--- a/core/modules/toolbar/src/Hook/ToolbarHooks.php
+++ b/core/modules/toolbar/src/Hook/ToolbarHooks.php
@@ -19,7 +19,7 @@ class ToolbarHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.toolbar':
         $output = '<h2>' . $this->t('About') . '</h2>';
@@ -33,6 +33,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/update/src/Hook/UpdateHooks.php b/core/modules/update/src/Hook/UpdateHooks.php
index 0e7a748e1c96..85c19a5708cc 100644
--- a/core/modules/update/src/Hook/UpdateHooks.php
+++ b/core/modules/update/src/Hook/UpdateHooks.php
@@ -19,7 +19,7 @@ class UpdateHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.update':
         $output = '';
@@ -60,6 +60,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
           ':updates' => Url::fromRoute('update.status')->toString(),
         ]) . '</p>';
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/user/src/Hook/UserHooks.php b/core/modules/user/src/Hook/UserHooks.php
index ec1ff9bc7e41..a5d8c173308a 100644
--- a/core/modules/user/src/Hook/UserHooks.php
+++ b/core/modules/user/src/Hook/UserHooks.php
@@ -32,7 +32,7 @@ class UserHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.user':
         $output = '';
@@ -87,6 +87,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
       case 'entity.entity_view_display.user.default':
         return '<p>' . $this->t('This form lets administrators configure how fields should be displayed when rendering a user profile page.') . '</p>';
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/views/src/Hook/ViewsHooks.php b/core/modules/views/src/Hook/ViewsHooks.php
index 24fd71646f06..6facc63de6de 100644
--- a/core/modules/views/src/Hook/ViewsHooks.php
+++ b/core/modules/views/src/Hook/ViewsHooks.php
@@ -27,7 +27,7 @@ class ViewsHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.views':
         $output = '';
@@ -54,6 +54,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/views_ui/src/Hook/ViewsUiHooks.php b/core/modules/views_ui/src/Hook/ViewsUiHooks.php
index da70548154f3..2d076aca4391 100644
--- a/core/modules/views_ui/src/Hook/ViewsUiHooks.php
+++ b/core/modules/views_ui/src/Hook/ViewsUiHooks.php
@@ -23,7 +23,7 @@ class ViewsUiHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.views_ui':
         $output = '';
@@ -57,6 +57,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '</dl>';
         return $output;
     }
+    return NULL;
   }
 
   /**
diff --git a/core/modules/workflows/src/Hook/WorkflowsHooks.php b/core/modules/workflows/src/Hook/WorkflowsHooks.php
index 833a493bf213..66ac4a7793cf 100644
--- a/core/modules/workflows/src/Hook/WorkflowsHooks.php
+++ b/core/modules/workflows/src/Hook/WorkflowsHooks.php
@@ -18,7 +18,7 @@ class WorkflowsHooks {
    * Implements hook_help().
    */
   #[Hook('help')]
-  public function help($route_name, RouteMatchInterface $route_match) {
+  public function help($route_name, RouteMatchInterface $route_match): ?string {
     switch ($route_name) {
       case 'help.page.workflows':
         $content_moderation_url = NULL;
@@ -60,6 +60,7 @@ public function help($route_name, RouteMatchInterface $route_match) {
         $output .= '<dl>';
         return $output;
     }
+    return NULL;
   }
 
 }
-- 
GitLab