diff --git a/core/lib/Drupal/Core/Render/theme.api.php b/core/lib/Drupal/Core/Render/theme.api.php index 642555c..6e46da4 100644 --- a/core/lib/Drupal/Core/Render/theme.api.php +++ b/core/lib/Drupal/Core/Render/theme.api.php @@ -632,7 +632,7 @@ function hook_preprocess_HOOK(&$variables) { * shown on every page but the front page: * @code * function block_theme_suggestions_block(array $variables) { - * $suggestions = array(); + * $suggestions = []; * if (!drupal_is_front_page()) { * $suggestions[] = 'block__not_front'; * } diff --git a/core/modules/system/tests/modules/theme_test/src/ThemeTestController.php b/core/modules/system/tests/modules/theme_test/src/ThemeTestController.php index 1533676..1eae45f 100644 --- a/core/modules/system/tests/modules/theme_test/src/ThemeTestController.php +++ b/core/modules/system/tests/modules/theme_test/src/ThemeTestController.php @@ -165,11 +165,13 @@ public function preprocessSuggestions() { * In this example the base hook is specified as the first suggestion. */ public function arraySuggestionsAlter() { - return array('#theme' => array( - 'theme_test_array_suggestions', - 'theme_test_array_suggestions__first_suggestion', - 'theme_test_array_suggestions__second_suggestion', - )); + return [ + '#theme' => [ + 'theme_test_array_suggestions', + 'theme_test_array_suggestions__first_suggestion', + 'theme_test_array_suggestions__second_suggestion', + ], + ]; } /** @@ -181,10 +183,12 @@ public function arraySuggestionsAlter() { * 'theme_test_array_suggestions_without_base'. */ public function arraySuggestionsWithoutBaseAlter() { - return array('#theme' => array( - 'theme_test_array_suggestions_without_base__first_suggestion', - 'theme_test_array_suggestions_without_base__second_suggestion', - )); + return [ + '#theme' => [ + 'theme_test_array_suggestions_without_base__first_suggestion', + 'theme_test_array_suggestions_without_base__second_suggestion', + ], + ]; } }