Issue #3483039 by mstrelan, bbrala: Add array return type to all hook_theme implementations

merge-requests/9926/merge
quietone 2024-10-31 14:35:38 +13:00
parent 42c8620245
commit d6e51d5d7c
No known key found for this signature in database
GPG Key ID: 43BFBBB26EA09FE1
44 changed files with 43 additions and 295 deletions

View File

@ -12166,12 +12166,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/announcements_feed/announcements_feed.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function announcements_feed_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/announcements_feed/announcements_feed.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function announcements_feed_toolbar\\(\\) has no return type specified\\.$#',
@ -12346,12 +12340,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/big_pipe/big_pipe.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function big_pipe_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/big_pipe/big_pipe.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function big_pipe_theme_suggestions_big_pipe_interface_preview\\(\\) has no return type specified\\.$#',
@ -12442,12 +12430,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/big_pipe/tests/modules/big_pipe_bypass_js/big_pipe_bypass_js.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function big_pipe_regression_test_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/big_pipe/tests/modules/big_pipe_regression_test/big_pipe_regression_test.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Method Drupal\\\\big_pipe_regression_test\\\\BigPipeRegressionTestController\\:\\:largeContent\\(\\) has no return type specified\\.$#',
@ -12580,12 +12562,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/block/block.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function block_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/block/block.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function block_theme_initialize\\(\\) has no return type specified\\.$#',
@ -13066,12 +13042,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/block_content/block_content.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function block_content_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/block_content/block_content.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function block_content_theme_suggestions_block_alter\\(\\) has no return type specified\\.$#',
@ -13666,12 +13636,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/ckeditor5/ckeditor5.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function ckeditor5_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/ckeditor5/ckeditor5.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function ckeditor5_removed_post_updates\\(\\) has no return type specified\\.$#',
@ -14542,12 +14506,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/comment/comment.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function comment_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/comment/comment.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function comment_uri\\(\\) has no return type specified\\.$#',
@ -16210,12 +16168,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/config_translation/config_translation.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function config_translation_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/config_translation/config_translation.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function config_translation_themes_installed\\(\\) has no return type specified\\.$#',
@ -17212,12 +17164,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/content_moderation/content_moderation.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function content_moderation_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/content_moderation/content_moderation.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function content_moderation_views_post_execute\\(\\) has no return type specified\\.$#',
@ -21226,12 +21172,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/field_ui/field_ui.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function field_ui_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/field_ui/field_ui.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function template_preprocess_field_ui_table\\(\\) has no return type specified\\.$#',
@ -21874,12 +21814,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/file/file.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function file_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/file/file.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function file_token_info\\(\\) has no return type specified\\.$#',
@ -23122,12 +23056,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/filter/filter.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function filter_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/filter/filter.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function template_preprocess_filter_guidelines\\(\\) has no return type specified\\.$#',
@ -23524,12 +23452,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/help/help.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function help_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/help/help.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function help_themes_installed\\(\\) has no return type specified\\.$#',
@ -23950,12 +23872,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/image/image.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function image_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/image/image.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function template_preprocess_image_style\\(\\) has no return type specified\\.$#',
@ -25774,12 +25690,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/language/language.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function language_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/language/language.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function language_tour_tips_alter\\(\\) has no return type specified\\.$#',
@ -27628,12 +27538,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/layout_builder_test.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function layout_builder_test_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_test/layout_builder_test.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Method Drupal\\\\layout_builder_test\\\\Plugin\\\\Block\\\\TestAjaxBlock\\:\\:ajaxCallback\\(\\) has no return type specified\\.$#',
@ -27712,12 +27616,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_theme_suggestions_test/layout_builder_theme_suggestions_test.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function layout_builder_theme_suggestions_test_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/layout_builder/tests/modules/layout_builder_theme_suggestions_test/layout_builder_theme_suggestions_test.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Functional\\\\LayoutBuilderAccessTest\\:\\:providerTestAccessWithBundles\\(\\) has no return type specified\\.$#',
@ -28270,12 +28168,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/layout_discovery/layout_discovery.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function layout_discovery_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/layout_discovery/layout_discovery.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function template_preprocess_layout\\(\\) has no return type specified\\.$#',
@ -28312,12 +28204,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/link/link.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function link_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/link/link.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function template_preprocess_link_formatter_link_separate\\(\\) has no return type specified\\.$#',
@ -28738,12 +28624,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/locale/locale.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function locale_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/locale/locale.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function locale_themes_installed\\(\\) has no return type specified\\.$#',
@ -29284,12 +29164,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/locale/tests/modules/locale_test/locale_test.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function locale_test_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/locale/tests/modules/locale_test/locale_test.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function locale_test_token_info\\(\\) has no return type specified\\.$#',
@ -29650,12 +29524,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/media/media.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function media_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/media/media.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function media_theme_suggestions_media\\(\\) has no return type specified\\.$#',
@ -30712,12 +30580,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/media_library/media_library.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function media_library_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/media_library/media_library.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function media_library_views_post_render\\(\\) has no return type specified\\.$#',
@ -34122,12 +33984,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/navigation/navigation.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function navigation_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/navigation/navigation.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function navigation_post_update_set_logo_dimensions_default\\(\\) has no return type specified\\.$#',
@ -34458,12 +34314,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/node/node.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function node_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/node/node.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function node_theme_suggestions_node\\(\\) has no return type specified\\.$#',
@ -37302,12 +37152,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/responsive_image/responsive_image.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function responsive_image_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/responsive_image/responsive_image.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function template_preprocess_responsive_image\\(\\) has no return type specified\\.$#',
@ -38190,12 +38034,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/search/search.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function search_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/search/search.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function search_theme_suggestions_search_result\\(\\) has no return type specified\\.$#',
@ -40794,12 +40632,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/system/system.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function system_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/system/system.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function system_theme_registry_alter\\(\\) has no return type specified\\.$#',
@ -41544,12 +41376,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/system/tests/modules/common_test/common_test.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function common_test_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/system/tests/modules/common_test/common_test.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function olivero_drupal_alter_alter\\(\\) has no return type specified\\.$#',
@ -41724,12 +41550,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/system/tests/modules/deprecated_module_test/deprecated_module_test.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function deprecated_twig_template_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/system/tests/modules/deprecated_twig_template/deprecated_twig_template.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function deprecation_test_deprecated_alter_alter\\(\\) has no return type specified\\.$#',
@ -45657,12 +45477,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/system/tests/modules/theme_test/theme_test.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function theme_test_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/system/tests/modules/theme_test/theme_test.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function theme_test_theme_registry_alter\\(\\) has no return type specified\\.$#',
@ -45735,12 +45549,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/system/tests/modules/twig_extension_test/src/TwigExtensionTestController.php',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function twig_extension_test_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/system/tests/modules/twig_extension_test/twig_extension_test.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Method Drupal\\\\twig_theme_test\\\\TwigThemeTestController\\:\\:attachLibraryRender\\(\\) has no return type specified\\.$#',
@ -45825,12 +45633,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/system/tests/modules/twig_theme_test/twig_theme_test.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function twig_theme_test_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/system/tests/modules/twig_theme_test/twig_theme_test.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function unique_field_constraint_test_entity_base_field_info_alter\\(\\) has no return type specified\\.$#',
@ -45975,12 +45777,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/system/tests/modules/update_test_3/update_test_3.install',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function update_test_broken_theme_hook_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/system/tests/modules/update_test_broken_theme_hook/update_test_broken_theme_hook.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function update_test_description_update_8001\\(\\) has no return type specified\\.$#',
@ -48099,12 +47895,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/system/tests/themes/engines/nyan_cat/nyan_cat.engine',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function nyan_cat_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/system/tests/themes/engines/nyan_cat/nyan_cat.engine',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function test_subsubtheme_preprocess_theme_test_template_test\\(\\) has no return type specified\\.$#',
@ -48783,12 +48573,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/taxonomy/taxonomy.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function taxonomy_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/taxonomy/taxonomy.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function taxonomy_theme_suggestions_taxonomy_term\\(\\) has no return type specified\\.$#',
@ -49641,12 +49425,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/toolbar/toolbar.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function toolbar_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/toolbar/toolbar.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function toolbar_toolbar\\(\\) has no return type specified\\.$#',
@ -50157,12 +49935,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/update/update.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function update_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/update/update.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function update_themes_installed\\(\\) has no return type specified\\.$#',
@ -51981,12 +51753,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/user/user.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function user_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/user/user.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function user_toolbar\\(\\) has no return type specified\\.$#',
@ -60513,12 +60279,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/views/views.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function views_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/views/views.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function views_theme_suggestions_comment_alter\\(\\) has no return type specified\\.$#',
@ -61455,12 +61215,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/modules/views_ui/views_ui.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function views_ui_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/modules/views_ui/views_ui.module',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function views_ui_theme_suggestions_views_ui_view_preview_section\\(\\) has no return type specified\\.$#',
@ -71552,12 +71306,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/themes/engines/twig/twig.engine',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function twig_theme\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/themes/engines/twig/twig.engine',
];
$ignoreErrors[] = [
// identifier: missingType.return
'message' => '#^Function olivero_removed_post_updates\\(\\) has no return type specified\\.$#',

View File

@ -1248,7 +1248,7 @@ function hook_page_bottom(array &$page_bottom) {
* @see themeable
* @see hook_theme_registry_alter()
*/
function hook_theme($existing, $type, $theme, $path) {
function hook_theme($existing, $type, $theme, $path): array {
return [
'my_module_display' => [
'variables' => [

View File

@ -87,7 +87,7 @@ function announcements_feed_toolbar_alter(&$items) {
/**
* Implements hook_theme().
*/
function announcements_feed_theme($existing, $type, $theme, $path) {
function announcements_feed_theme($existing, $type, $theme, $path): array {
return [
'announcements_feed' => [
'variables' => [

View File

@ -80,7 +80,7 @@ function big_pipe_page_attachments(array &$page) {
/**
* Implements hook_theme().
*/
function big_pipe_theme() {
function big_pipe_theme(): array {
return [
'big_pipe_interface_preview' => [
'variables' => [

View File

@ -12,7 +12,7 @@ declare(strict_types=1);
*
* @see \Drupal\Tests\big_pipe\FunctionalJavascript\BigPipeRegressionTest::testBigPipeLargeContent
*/
function big_pipe_regression_test_theme() {
function big_pipe_regression_test_theme(): array {
return [
'big_pipe_test_large_content' => [
'variables' => [],

View File

@ -54,7 +54,7 @@ function block_help($route_name, RouteMatchInterface $route_match) {
/**
* Implements hook_theme().
*/
function block_theme() {
function block_theme(): array {
return [
'block' => [
'render element' => 'elements',

View File

@ -40,7 +40,7 @@ function block_content_help($route_name, RouteMatchInterface $route_match) {
/**
* Implements hook_theme().
*/
function block_content_theme($existing, $type, $theme, $path) {
function block_content_theme($existing, $type, $theme, $path): array {
return [
'block_content_add_list' => [
'variables' => ['content' => NULL],

View File

@ -78,7 +78,7 @@ function ckeditor5_help($route_name, RouteMatchInterface $route_match) {
/**
* Implements hook_theme().
*/
function ckeditor5_theme() {
function ckeditor5_theme(): array {
return [
// The theme hook is used for rendering the CKEditor 5 toolbar settings in
// the Drupal admin UI. The toolbar settings UI is internal, and utilizing

View File

@ -110,7 +110,7 @@ function comment_entity_extra_field_info() {
/**
* Implements hook_theme().
*/
function comment_theme() {
function comment_theme(): array {
return [
'comment' => [
'render element' => 'elements',

View File

@ -40,7 +40,7 @@ function config_translation_help($route_name, RouteMatchInterface $route_match)
/**
* Implements hook_theme().
*/
function config_translation_theme() {
function config_translation_theme(): array {
return [
'config_translation_manage_form_element' => [
'render element' => 'element',

View File

@ -275,7 +275,7 @@ function content_moderation_entity_field_access($operation, FieldDefinitionInter
/**
* Implements hook_theme().
*/
function content_moderation_theme() {
function content_moderation_theme(): array {
return ['entity_moderation_form' => ['render element' => 'form']];
}

View File

@ -50,7 +50,7 @@ function field_ui_help($route_name, RouteMatchInterface $route_match) {
/**
* Implements hook_theme().
*/
function field_ui_theme() {
function field_ui_theme(): array {
return [
'field_ui_table' => [
'variables' => [

View File

@ -90,7 +90,7 @@ function file_get_content_headers(FileInterface $file) {
/**
* Implements hook_theme().
*/
function file_theme() {
function file_theme(): array {
return [
// From file.module.
'file_link' => [

View File

@ -55,7 +55,7 @@ function filter_help($route_name, RouteMatchInterface $route_match) {
/**
* Implements hook_theme().
*/
function filter_theme() {
function filter_theme(): array {
return [
'filter_tips' => [
'variables' => ['tips' => NULL, 'long' => FALSE],

View File

@ -65,7 +65,7 @@ function help_help($route_name, RouteMatchInterface $route_match) {
/**
* Implements hook_theme().
*/
function help_theme($existing, $type, $theme, $path) {
function help_theme($existing, $type, $theme, $path): array {
return [
'help_section' => [
'variables' => [

View File

@ -66,7 +66,7 @@ function image_help($route_name, RouteMatchInterface $route_match) {
/**
* Implements hook_theme().
*/
function image_theme() {
function image_theme(): array {
return [
// Theme functions in image.module.
'image_style' => [

View File

@ -102,7 +102,7 @@ function language_help($route_name, RouteMatchInterface $route_match) {
/**
* Implements hook_theme().
*/
function language_theme() {
function language_theme(): array {
return [
'language_negotiation_configure_form' => [
'render element' => 'form',

View File

@ -182,7 +182,7 @@ function layout_builder_test_module_implements_alter(&$implementations, $hook) {
/**
* Implements hook_theme().
*/
function layout_builder_test_theme() {
function layout_builder_test_theme(): array {
return [
'block__preview_aware_block' => [
'base hook' => 'block',

View File

@ -10,7 +10,7 @@ declare(strict_types=1);
/**
* Implements hook_theme().
*/
function layout_builder_theme_suggestions_test_theme() {
function layout_builder_theme_suggestions_test_theme(): array {
// It is necessary to explicitly register the template via hook_theme()
// because it is added via a module, not a theme.
return [

View File

@ -24,7 +24,7 @@ function layout_discovery_help($route_name) {
/**
* Implements hook_theme().
*/
function layout_discovery_theme() {
function layout_discovery_theme(): array {
return \Drupal::service('plugin.manager.core.layout')->getThemeImplementations();
}

View File

@ -41,7 +41,7 @@ function link_help($route_name, RouteMatchInterface $route_match) {
/**
* Implements hook_theme().
*/
function link_theme() {
function link_theme(): array {
return [
'link_formatter_link_separate' => [
'variables' => ['title' => NULL, 'url_title' => NULL, 'url' => NULL],

View File

@ -188,7 +188,7 @@ function locale_help($route_name, RouteMatchInterface $route_match) {
/**
* Implements hook_theme().
*/
function locale_theme() {
function locale_theme(): array {
return [
'locale_translation_last_check' => [
'variables' => ['last' => NULL],

View File

@ -162,7 +162,7 @@ function locale_test_language_fallback_candidates_locale_lookup_alter(array &$ca
/**
* Implements hook_theme().
*/
function locale_test_theme() {
function locale_test_theme(): array {
$return = [];
$return['locale_test_tokenized'] = [

View File

@ -67,7 +67,7 @@ function media_help($route_name, RouteMatchInterface $route_match) {
/**
* Implements hook_theme().
*/
function media_theme() {
function media_theme(): array {
return [
'media' => [
'render element' => 'elements',

View File

@ -100,7 +100,7 @@ function media_library_media_source_info_alter(array &$sources) {
/**
* Implements hook_theme().
*/
function media_library_theme() {
function media_library_theme(): array {
return [
'media__media_library' => [
'base hook' => 'media',

View File

@ -87,7 +87,7 @@ function navigation_module_implements_alter(&$implementations, $hook) {
/**
* Implements hook_theme().
*/
function navigation_theme($existing, $type, $theme, $path) {
function navigation_theme($existing, $type, $theme, $path): array {
$items['top_bar'] = [
'variables' => [
'local_tasks' => [],

View File

@ -104,7 +104,7 @@ function node_help($route_name, RouteMatchInterface $route_match) {
/**
* Implements hook_theme().
*/
function node_theme() {
function node_theme(): array {
return [
'node' => [
'render element' => 'elements',

View File

@ -52,7 +52,7 @@ function responsive_image_help($route_name, RouteMatchInterface $route_match) {
/**
* Implements hook_theme().
*/
function responsive_image_theme() {
function responsive_image_theme(): array {
return [
'responsive_image' => [
'variables' => [

View File

@ -43,7 +43,7 @@ function search_help($route_name, RouteMatchInterface $route_match) {
/**
* Implements hook_theme().
*/
function search_theme() {
function search_theme(): array {
return [
'search_result' => [
'variables' => ['result' => NULL, 'plugin_id' => NULL],

View File

@ -151,7 +151,7 @@ function system_help($route_name, RouteMatchInterface $route_match) {
/**
* Implements hook_theme().
*/
function system_theme() {
function system_theme(): array {
return array_merge(drupal_common_theme(), [
// Normally theme suggestion templates are only picked up when they are in
// themes. We explicitly define theme suggestions here so that the block

View File

@ -108,7 +108,7 @@ function common_test_module_implements_alter(&$implementations, $hook) {
/**
* Implements hook_theme().
*/
function common_test_theme() {
function common_test_theme(): array {
return [
'common_test_foo' => [
'variables' => ['foo' => 'foo', 'bar' => 'bar'],

View File

@ -10,7 +10,7 @@ declare(strict_types=1);
/**
* Implements hook_theme().
*/
function deprecated_twig_template_theme() {
function deprecated_twig_template_theme(): array {
return [
'deprecated_template' => [
'variables' => [

View File

@ -13,7 +13,7 @@ use Drupal\Core\Extension\Extension;
/**
* Implements hook_theme().
*/
function theme_test_theme($existing, $type, $theme, $path) {
function theme_test_theme($existing, $type, $theme, $path): array {
$items['theme_test'] = [
'file' => 'theme_test.inc',
'variables' => ['foo' => ''],

View File

@ -10,7 +10,7 @@ declare(strict_types=1);
/**
* Implements hook_theme().
*/
function twig_extension_test_theme($existing, $type, $theme, $path) {
function twig_extension_test_theme($existing, $type, $theme, $path): array {
return [
'twig_extension_test_filter' => [
'variables' => ['message' => NULL, 'safe_join_items' => NULL],

View File

@ -10,7 +10,7 @@ declare(strict_types=1);
/**
* Implements hook_theme().
*/
function twig_theme_test_theme($existing, $type, $theme, $path) {
function twig_theme_test_theme($existing, $type, $theme, $path): array {
$items['twig_theme_test_filter'] = [
'variables' => ['quote' => [], 'attributes' => []],
'template' => 'twig_theme_test.filter',

View File

@ -10,6 +10,6 @@ declare(strict_types=1);
/**
* Implements hook_theme().
*/
function update_test_broken_theme_hook_theme($existing, $type, $theme, $path) {
function update_test_broken_theme_hook_theme($existing, $type, $theme, $path): array {
throw new \Exception('This mimics an exception caused by unstable dependencies.');
}

View File

@ -14,7 +14,7 @@ use Drupal\Component\Utility\Html;
/**
* Implements hook_theme().
*/
function nyan_cat_theme($existing, $type, $theme, $path) {
function nyan_cat_theme($existing, $type, $theme, $path): array {
return drupal_find_theme_templates($existing, '.nyan-cat.html', $path);
}

View File

@ -49,7 +49,7 @@ function taxonomy_help($route_name, RouteMatchInterface $route_match) {
/**
* Implements hook_theme().
*/
function taxonomy_theme() {
function taxonomy_theme(): array {
return [
'taxonomy_term' => [
'render element' => 'elements',

View File

@ -36,7 +36,7 @@ function toolbar_help($route_name, RouteMatchInterface $route_match) {
/**
* Implements hook_theme().
*/
function toolbar_theme($existing, $type, $theme, $path) {
function toolbar_theme($existing, $type, $theme, $path): array {
$items['toolbar'] = [
'render element' => 'element',
];

View File

@ -132,7 +132,7 @@ function _update_manager_access() {
/**
* Implements hook_theme().
*/
function update_theme() {
function update_theme(): array {
return [
'update_last_check' => [
'variables' => ['last' => 0],

View File

@ -78,7 +78,7 @@ function user_help($route_name, RouteMatchInterface $route_match) {
/**
* Implements hook_theme().
*/
function user_theme() {
function user_theme(): array {
return [
'user' => [
'render element' => 'elements',

View File

@ -80,7 +80,7 @@ function views_views_pre_render($view) {
* Register views theming functions and those that are defined via views plugin
* definitions.
*/
function views_theme($existing, $type, $theme, $path) {
function views_theme($existing, $type, $theme, $path): array {
\Drupal::moduleHandler()->loadInclude('views', 'inc', 'views.theme');
// Some quasi clever array merging here.

View File

@ -63,7 +63,7 @@ function views_ui_entity_type_build(array &$entity_types) {
/**
* Implements hook_theme().
*/
function views_ui_theme() {
function views_ui_theme(): array {
return [
// Edit a view
'views_ui_display_tab_setting' => [

View File

@ -12,7 +12,7 @@ use Twig\Error\RuntimeError;
/**
* Implements hook_theme().
*/
function twig_theme($existing, $type, $theme, $path) {
function twig_theme($existing, $type, $theme, $path): array {
return drupal_find_theme_templates($existing, '.html.twig', $path);
}