diff --git a/core/modules/book/tests/src/Unit/BookManagerTest.php b/core/modules/book/tests/src/Unit/BookManagerTest.php index d7835539b553d4dcdda65483907ac12002db2e65..98dbd5a72e62b850915f1c0304a7509eb337bfce 100644 --- a/core/modules/book/tests/src/Unit/BookManagerTest.php +++ b/core/modules/book/tests/src/Unit/BookManagerTest.php @@ -102,7 +102,7 @@ public function providerTestGetBookParents() { // Provides a book with an existing parent. [ ['pid' => 11, 'nid' => 12], - ['nid' => 11, 'depth' => 1, 'p1' => 11,], + ['nid' => 11, 'depth' => 1, 'p1' => 11], ['depth' => 2, 'p1' => 11, 'p2' => 12] + $empty, ], // Provides a book with two existing parents. diff --git a/core/modules/book/tests/src/Unit/Menu/BookLocalTasksTest.php b/core/modules/book/tests/src/Unit/Menu/BookLocalTasksTest.php index 5b7662c50a97f7f6946915b44bae911964c4b4a0..7abbc5c0ea8a015ab7f673904342e53a44025946 100644 --- a/core/modules/book/tests/src/Unit/Menu/BookLocalTasksTest.php +++ b/core/modules/book/tests/src/Unit/Menu/BookLocalTasksTest.php @@ -48,7 +48,7 @@ public function getBookAdminRoutes() { */ public function testBookNodeLocalTasks($route) { $this->assertLocalTasks($route, [ - 0 => ['entity.node.book_outline_form', 'entity.node.canonical', 'entity.node.edit_form', 'entity.node.delete_form', 'entity.node.version_history',], + 0 => ['entity.node.book_outline_form', 'entity.node.canonical', 'entity.node.edit_form', 'entity.node.delete_form', 'entity.node.version_history'], ]); } diff --git a/core/modules/ckeditor/src/Plugin/Editor/CKEditor.php b/core/modules/ckeditor/src/Plugin/Editor/CKEditor.php index d3a7f6b73704647e1c5ca8b98dd0d69c7f4bf5f0..255691ff03b9e74c492bea9ee68619e7ca5ea7c0 100644 --- a/core/modules/ckeditor/src/Plugin/Editor/CKEditor.php +++ b/core/modules/ckeditor/src/Plugin/Editor/CKEditor.php @@ -109,23 +109,23 @@ public function getDefaultSettings() { [ [ 'name' => $this->t('Formatting'), - 'items' => ['Bold', 'Italic',], + 'items' => ['Bold', 'Italic'], ], [ 'name' => $this->t('Links'), - 'items' => ['DrupalLink', 'DrupalUnlink',], + 'items' => ['DrupalLink', 'DrupalUnlink'], ], [ 'name' => $this->t('Lists'), - 'items' => ['BulletedList', 'NumberedList',], + 'items' => ['BulletedList', 'NumberedList'], ], [ 'name' => $this->t('Media'), - 'items' => ['Blockquote', 'DrupalImage',], + 'items' => ['Blockquote', 'DrupalImage'], ], [ 'name' => $this->t('Tools'), - 'items' => ['Source',], + 'items' => ['Source'], ], ], ], diff --git a/core/modules/ckeditor/src/Tests/CKEditorAdminTest.php b/core/modules/ckeditor/src/Tests/CKEditorAdminTest.php index ed08c26d0c047df041c5a00223aa6529136df00e..3541f0ff486b2d45bab1970541f5e5eeb58f1920 100644 --- a/core/modules/ckeditor/src/Tests/CKEditorAdminTest.php +++ b/core/modules/ckeditor/src/Tests/CKEditorAdminTest.php @@ -84,23 +84,23 @@ function testExistingFormat() { [ [ 'name' => 'Formatting', - 'items' => ['Bold', 'Italic',], + 'items' => ['Bold', 'Italic'], ], [ 'name' => 'Links', - 'items' => ['DrupalLink', 'DrupalUnlink',], + 'items' => ['DrupalLink', 'DrupalUnlink'], ], [ 'name' => 'Lists', - 'items' => ['BulletedList', 'NumberedList',], + 'items' => ['BulletedList', 'NumberedList'], ], [ 'name' => 'Media', - 'items' => ['Blockquote', 'DrupalImage',], + 'items' => ['Blockquote', 'DrupalImage'], ], [ 'name' => 'Tools', - 'items' => ['Source',], + 'items' => ['Source'], ], ], ], diff --git a/core/modules/ckeditor/tests/modules/src/Kernel/CKEditorTest.php b/core/modules/ckeditor/tests/modules/src/Kernel/CKEditorTest.php index 9e159c3d519f0d3d6795e8f56e8a6d16c7a8bb39..4bfda7e46b5a57805bd78bae0cc06ef0baf85301 100644 --- a/core/modules/ckeditor/tests/modules/src/Kernel/CKEditorTest.php +++ b/core/modules/ckeditor/tests/modules/src/Kernel/CKEditorTest.php @@ -463,23 +463,23 @@ protected function getDefaultToolbarConfig() { return [ [ 'name' => 'Formatting', - 'items' => ['Bold', 'Italic',], + 'items' => ['Bold', 'Italic'], ], [ 'name' => 'Links', - 'items' => ['DrupalLink', 'DrupalUnlink',], + 'items' => ['DrupalLink', 'DrupalUnlink'], ], [ 'name' => 'Lists', - 'items' => ['BulletedList', 'NumberedList',], + 'items' => ['BulletedList', 'NumberedList'], ], [ 'name' => 'Media', - 'items' => ['Blockquote', 'DrupalImage',], + 'items' => ['Blockquote', 'DrupalImage'], ], [ 'name' => 'Tools', - 'items' => ['Source',], + 'items' => ['Source', ], ], '/', ]; diff --git a/core/modules/config/src/Tests/ConfigEntityListTest.php b/core/modules/config/src/Tests/ConfigEntityListTest.php index fbc7ad6a73c4011a2b4a34ac0cbe44e15af6a22a..161944b9812a9d19887bbd30344df2633d8f14bd 100644 --- a/core/modules/config/src/Tests/ConfigEntityListTest.php +++ b/core/modules/config/src/Tests/ConfigEntityListTest.php @@ -51,7 +51,7 @@ function testList() { // Test getOperations() method. $expected_operations = [ - 'edit' => [ + 'edit' => [ 'title' => t('Edit'), 'weight' => 10, 'url' => $entity->urlInfo(), @@ -61,7 +61,7 @@ function testList() { 'weight' => 40, 'url' => $entity->urlInfo('disable'), ], - 'delete' => [ + 'delete' => [ 'title' => t('Delete'), 'weight' => 100, 'url' => $entity->urlInfo('delete-form'), diff --git a/core/modules/field/tests/src/Kernel/FieldDataCountTest.php b/core/modules/field/tests/src/Kernel/FieldDataCountTest.php index 2bbe24d68caf2bc062a9303a8f72b2fbe0914c30..69b84a9c1d1bb97b4a1f59c76904b4a3e6c0c273 100644 --- a/core/modules/field/tests/src/Kernel/FieldDataCountTest.php +++ b/core/modules/field/tests/src/Kernel/FieldDataCountTest.php @@ -112,7 +112,7 @@ public function testEntityCountAndHasData() { $entity_init = $this->container->get('entity_type.manager') ->getStorage($entity_type) - ->create(['type' => $entity_type,]); + ->create(['type' => $entity_type]); $cardinality = $this->fieldTestData->field_storage_2->getCardinality(); $this->assertIdentical($this->fieldTestData->field_storage_2->hasData(), FALSE, 'There are no entities with field data.'); diff --git a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldFormatterSettingsTest.php b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldFormatterSettingsTest.php index edf6dc0b21218ef80aec20bae90175862c440f84..9775c5b4f249236c684813d66e2d1ec716ab9363 100644 --- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldFormatterSettingsTest.php +++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldFormatterSettingsTest.php @@ -138,7 +138,7 @@ public function testEntityDisplaySettings() { $this->assertIdentical($expected, $component); // Test date field. - $defaults = ['format_type' => 'fallback', 'timezone_override' => '',]; + $defaults = ['format_type' => 'fallback', 'timezone_override' => '']; $expected['weight'] = 10; $expected['type'] = 'datetime_default'; $expected['settings'] = ['format_type' => 'fallback'] + $defaults; diff --git a/core/modules/field_ui/src/Tests/ManageDisplayTest.php b/core/modules/field_ui/src/Tests/ManageDisplayTest.php index 9c8798fe282a7918cc77c1090df50d096c318ad6..3f6c480cc794d7885828aa9a6cd6967cf50672f0 100644 --- a/core/modules/field_ui/src/Tests/ManageDisplayTest.php +++ b/core/modules/field_ui/src/Tests/ManageDisplayTest.php @@ -87,7 +87,7 @@ function testFormatterUI() { $options = array_map(function($item) { return (string) $item->attributes()->value[0]; }, $result); - $expected_options = [ + $expected_options = [ 'field_no_settings', 'field_empty_test', 'field_empty_setting', @@ -249,7 +249,7 @@ public function testWidgetUI() { $options = array_map(function($item) { return (string) $item->attributes()->value[0]; }, $result); - $expected_options = [ + $expected_options = [ 'test_field_widget', 'test_field_widget_multiple', ]; diff --git a/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php b/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php index 9e46d82da9e2e45fc6aa880a0c0d0dc8133234ab..4a0e533be3a2ddff0b190e58a38b90ebeba39ac4 100644 --- a/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php +++ b/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php @@ -129,7 +129,7 @@ public function testEntityDisplayCRUDSort() { $display->save(); $components = array_keys($display->getComponents()); // The name field is not configurable so will be added automatically. - $expected = [ 0 => 'component_1', 1 => 'component_2', 2 => 'component_3', 'name']; + $expected = [ 0 => 'component_1', 1 => 'component_2', 2 => 'component_3', 'name']; $this->assertIdentical($components, $expected); } diff --git a/core/modules/history/history.module b/core/modules/history/history.module index 58f40de3e772f600ae31205481326209fe6a6729..f36121ef5115336aad0c266e15594ee97e8b927a 100644 --- a/core/modules/history/history.module +++ b/core/modules/history/history.module @@ -28,7 +28,7 @@ function history_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.history': $output = '<h3>' . t('About') . '</h3>'; - $output .= '<p>' . t('The History module keeps track of which content a user has read. It marks content as <em>new</em> or <em>updated</em> depending on the last time the user viewed it. History records that are older than one month are removed during cron, which means that content older than one month is always considered <em>read</em>. The History module does not have a user interface but it provides a filter to <a href=":views-help">Views</a> to show new or updated content. For more information, see the <a href=":url">online documentation for the History module</a>.', [':views-help' => (\Drupal::moduleHandler()->moduleExists('views')) ? \Drupal::url('help.page', ['name' => 'views']) : '#', ':url' => 'https://www.drupal.org/documentation/modules/history']) . '</p>'; + $output .= '<p>' . t('The History module keeps track of which content a user has read. It marks content as <em>new</em> or <em>updated</em> depending on the last time the user viewed it. History records that are older than one month are removed during cron, which means that content older than one month is always considered <em>read</em>. The History module does not have a user interface but it provides a filter to <a href=":views-help">Views</a> to show new or updated content. For more information, see the <a href=":url">online documentation for the History module</a>.', [':views-help' => (\Drupal::moduleHandler()->moduleExists('views')) ? \Drupal::url('help.page', ['name' => 'views']) : '#', ':url' => 'https://www.drupal.org/documentation/modules/history']) . '</p>'; return $output; } } diff --git a/core/modules/link/src/Plugin/Field/FieldFormatter/LinkFormatter.php b/core/modules/link/src/Plugin/Field/FieldFormatter/LinkFormatter.php index 30fcd8e260d5c0e31fc0315d892041f51d035bcb..b0928b0db000f33d5c502684a505272b0c180baa 100644 --- a/core/modules/link/src/Plugin/Field/FieldFormatter/LinkFormatter.php +++ b/core/modules/link/src/Plugin/Field/FieldFormatter/LinkFormatter.php @@ -216,7 +216,7 @@ public function viewElements(FieldItemListInterface $items, $langcode) { $element[$delta]['#url'] = $url; if (!empty($item->_attributes)) { - $element[$delta]['#options'] += ['attributes' => []]; + $element[$delta]['#options'] += ['attributes' => []]; $element[$delta]['#options']['attributes'] += $item->_attributes; // Unset field item attributes since they have been included in the // formatter output and should not be rendered in the field template. diff --git a/core/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php b/core/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php index ee9a6559e4e0fa23def3337681b3d3d6da518345..09b6468afe01538b2bd10ba6c3c18d7528a13295 100644 --- a/core/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php +++ b/core/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php @@ -26,7 +26,7 @@ protected function setUp() { */ public function testShortcutPageLocalTasks($route) { $tasks = [ - 0 => ['shortcut.set_switch', 'entity.user.canonical', 'entity.user.edit_form',], + 0 => ['shortcut.set_switch', 'entity.user.canonical', 'entity.user.edit_form'], ]; $this->assertLocalTasks($route, $tasks); } diff --git a/core/modules/system/system.install b/core/modules/system/system.install index fadf17fdc60eaab1ffe71848bf2b49edf692dade..f9c72f73d4375ae26ef6a3689ea76a752c79e419 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -127,7 +127,7 @@ function system_requirements($phase) { } if ($rewrite_warning) { - $requirements['apache_version'] = [ + $requirements['apache_version'] = [ 'title' => t('Apache version'), 'value' => $apache_version_string, 'severity' => REQUIREMENT_WARNING, @@ -136,7 +136,7 @@ function system_requirements($phase) { } if ($rewrite_error) { - $requirements['Apache version'] = [ + $requirements['Apache version'] = [ 'title' => t('Apache version'), 'value' => $apache_version_string, 'severity' => REQUIREMENT_ERROR, @@ -145,7 +145,7 @@ function system_requirements($phase) { } if (!$rewrite_error && !$rewrite_warning) { - $requirements['rewrite_module'] = [ + $requirements['rewrite_module'] = [ 'title' => t('Clean URLs'), 'value' => t('Disabled'), 'severity' => REQUIREMENT_WARNING, diff --git a/core/modules/toolbar/src/Tests/ToolbarAdminMenuTest.php b/core/modules/toolbar/src/Tests/ToolbarAdminMenuTest.php index e78f463d89252900ed0a1400098c841dd8154c52..b5435dc3c735a3b439d7d5c5fa3f4e3a0c35dfff 100644 --- a/core/modules/toolbar/src/Tests/ToolbarAdminMenuTest.php +++ b/core/modules/toolbar/src/Tests/ToolbarAdminMenuTest.php @@ -179,7 +179,7 @@ function testUserRoleUpdateSubtreesHashCacheClear() { $this->hash = $this->getSubtreesHash(); - $rid = $this->drupalCreateRole(['administer content types',]); + $rid = $this->drupalCreateRole(['administer content types']); // Assign the role to the user. $this->drupalPostForm('user/' . $this->adminUser->id() . '/edit', ["roles[$rid]" => $rid], t('Save')); @@ -214,7 +214,7 @@ function testNonCurrentUserAccountUpdates() { // adminUser2 will add a role to adminUser. $this->drupalLogin($this->adminUser2); - $rid = $this->drupalCreateRole(['administer content types',]); + $rid = $this->drupalCreateRole(['administer content types']); // Get the subtree hash for adminUser2 to check later that it has not // changed. Request a new page to refresh the drupalSettings object. diff --git a/core/modules/update/update.manager.inc b/core/modules/update/update.manager.inc index 541ab6f34a85b2c92fbef3cc151762b52f8ace73..e7960072c5955f29bc93a9d700d212dc929bba05 100644 --- a/core/modules/update/update.manager.inc +++ b/core/modules/update/update.manager.inc @@ -150,7 +150,7 @@ function _update_manager_check_backends(&$form, $operation) { function update_manager_archive_extract($file, $directory) { $archiver = archiver_get_archiver($file); if (!$archiver) { - throw new Exception(t('Cannot extract %file, not a valid archive.', ['%file' => $file])); + throw new Exception(t('Cannot extract %file, not a valid archive.', ['%file' => $file])); } // Remove the directory if it exists, otherwise it might contain a mixture of diff --git a/core/modules/user/src/Entity/User.php b/core/modules/user/src/Entity/User.php index 38f0f39845eead874a54f7762b7e8b5d536c9e92..66a49543dfb72174646598537844e7c4738e2474 100644 --- a/core/modules/user/src/Entity/User.php +++ b/core/modules/user/src/Entity/User.php @@ -455,7 +455,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { // @todo: A default value of NULL is ignored, so we have to specify // an empty field item structure instead. Fix this in // https://www.drupal.org/node/2318605. - ->setDefaultValue([0 => ['value' => NULL]]) + ->setDefaultValue([0 => ['value' => NULL]]) // @todo: Define this via an options provider once // https://www.drupal.org/node/2329937 is completed. ->addPropertyConstraints('value', [ diff --git a/core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php b/core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php index 106e09142c17eb3bc9bf9b99281e8510b1ed7b47..b9986c9b4c3f6826609113a1a349fa5cde96d7f8 100644 --- a/core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php +++ b/core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php @@ -44,7 +44,7 @@ public function getUserAdminRoutes() { */ public function testUserLoginLocalTasks($route) { $tasks = [ - 0 => ['user.register', 'user.pass', 'user.login',], + 0 => ['user.register', 'user.pass', 'user.login'], ]; $this->assertLocalTasks($route, $tasks); } @@ -67,7 +67,7 @@ public function getUserLoginRoutes() { */ public function testUserPageLocalTasks($route, $subtask = []) { $tasks = [ - 0 => ['entity.user.canonical', 'entity.user.edit_form',], + 0 => ['entity.user.canonical', 'entity.user.edit_form'], ]; if ($subtask) $tasks[] = $subtask; $this->assertLocalTasks($route, $tasks); diff --git a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php index 8291fed53fd5180e8b59dfe2fd5049bf26655d5b..d9485407716cf250b59d5267feb6b3492d5d1e93 100644 --- a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php +++ b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php @@ -781,7 +781,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { ':input[name="options[alter][make_link]"]' => ['checked' => TRUE], ], ], - '#options' => [ + '#options' => [ 'none' => $this->t('No transform'), 'upper' => $this->t('Upper case'), 'lower' => $this->t('Lower case'), diff --git a/core/modules/views/tests/src/Kernel/ViewsHooksTest.php b/core/modules/views/tests/src/Kernel/ViewsHooksTest.php index 612934e7322253ab72411afa6150b1049eafbdf7..aceda8f6e6877e72bfc9da22e2d58dc02c70d2b0 100644 --- a/core/modules/views/tests/src/Kernel/ViewsHooksTest.php +++ b/core/modules/views/tests/src/Kernel/ViewsHooksTest.php @@ -26,7 +26,7 @@ class ViewsHooksTest extends ViewsKernelTestBase { * * @var array */ - protected static $hooks = [ + protected static $hooks = [ 'views_data' => 'all', 'views_data_alter' => 'alter', 'views_query_substitutions' => 'view', diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php index 5554fb2870af909e992f2ba627b44e4af9f77bdb..84aa2713267290cd7dd637b285ffdcf206b8e7ce 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php @@ -342,7 +342,7 @@ public function testConfigSaveWithSchema() { ], 'float' => '3.14', 'null_float' => '', - 'sequence' => [1, 0, 1], + 'sequence' => [1, 0, 1], 'sequence_bc' => [1, 0, 1], // Not in schema and therefore should be left untouched. 'not_present_in_schema' => TRUE, @@ -365,7 +365,7 @@ public function testConfigSaveWithSchema() { ], 'float' => 3.14, 'null_float' => NULL, - 'sequence' => [TRUE, FALSE, TRUE], + 'sequence' => [TRUE, FALSE, TRUE], 'sequence_bc' => [TRUE, FALSE, TRUE], 'not_present_in_schema' => TRUE, 'config_schema_test_integer' => 1, diff --git a/core/tests/Drupal/Tests/Component/Gettext/PoHeaderTest.php b/core/tests/Drupal/Tests/Component/Gettext/PoHeaderTest.php index e106fec379062352e2fc7d6cf3ee16ab09b22e82..113f6cdea8262ebec6a685ce5b71ea07df4edfc6 100644 --- a/core/tests/Drupal/Tests/Component/Gettext/PoHeaderTest.php +++ b/core/tests/Drupal/Tests/Component/Gettext/PoHeaderTest.php @@ -279,7 +279,7 @@ public function providerTestPluralsFormula() { 193 => 1, 194 => 1, 'default' => 2, - ],], + ], ], [ 'nplurals=4; plural=(((n==1)||(n==11))?(0):(((n==2)||(n==12))?(1):(((n>2)&&(n<20))?(2):3)));', [