diff -u b/core/modules/locale/locale.module b/core/modules/locale/locale.module --- b/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -418,7 +418,7 @@ // Get translation status of the projects, download and update // translations. $options = _locale_translation_default_update_options(); - $batch = locale_translation_batch_update_build($list, array(), $options); + $batch = locale_translation_batch_update_build($list, [], $options); batch_set($batch); } } @@ -428,7 +428,7 @@ // components. Do this even if import is not enabled because parsing new // configuration may expose new source strings. \Drupal::moduleHandler()->loadInclude('locale', 'bulk.inc'); - if ($batch = locale_config_batch_update_components(array())) { + if ($batch = locale_config_batch_update_components([])) { batch_set($batch); } } diff -u b/core/modules/locale/src/Tests/LocaleConfigTranslationTest.php b/core/modules/locale/src/Tests/LocaleConfigTranslationTest.php --- b/core/modules/locale/src/Tests/LocaleConfigTranslationTest.php +++ b/core/modules/locale/src/Tests/LocaleConfigTranslationTest.php @@ -59,7 +59,7 @@ ); $this->drupalPostForm('admin/config/regional/language/add', $edit, t('Add custom language')); // Set path prefix. - $edit = array("prefix[$this->langcode]" => $this->langcode); + $edit = ["prefix[$this->langcode]" => $this->langcode]; $this->drupalPostForm('admin/config/regional/language/detection/url', $edit, t('Save configuration')); } @@ -134,7 +134,7 @@ $this->assertTrue(isset($locations['configuration']) && isset($locations['configuration']['image.style.medium']), 'Configuration string has been created with the right location'); // Check the string is unique and has no translation yet. - $translations = $this->storage->getTranslations(array('language' => $this->langcode, 'type' => 'configuration', 'name' => 'image.style.medium')); + $translations = $this->storage->getTranslations(['language' => $this->langcode, 'type' => 'configuration', 'name' => 'image.style.medium']); $this->assertEqual(count($translations), 1); $translation = reset($translations); $this->assertEqual($translation->source, $string->source); @@ -156,7 +156,7 @@ $this->drupalPostForm('admin/config/regional/translate', $edit, t('Save translations')); // Check the right single translation has been created. - $translations = $this->storage->getTranslations(array('language' => $this->langcode, 'type' => 'configuration', 'name' => 'image.style.medium')); + $translations = $this->storage->getTranslations(['language' => $this->langcode, 'type' => 'configuration', 'name' => 'image.style.medium']); $translation = reset($translations); $this->assertTrue(count($translations) == 1 && $translation->source == $string->source && $translation->translation == $image_style_label, 'Got only one translation for image configuration.'); @@ -204,12 +204,12 @@ public function testOptionalConfiguration() { $this->assertNodeConfig(FALSE, FALSE); // Enable the node module. - $this->drupalPostForm('admin/modules', array('modules[Core][node][enable]' => "1"), t('Save configuration')); - $this->drupalPostForm(NULL, array(), t('Continue')); + $this->drupalPostForm('admin/modules', ['modules[Core][node][enable]' => "1"], t('Save configuration')); + $this->drupalPostForm(NULL, [], t('Continue')); $this->rebuildContainer(); $this->assertNodeConfig(TRUE, FALSE); // Enable the views module (which node provides some optional config for). - $this->drupalPostForm('admin/modules', array('modules[Core][views][enable]' => "1"), t('Save configuration')); + $this->drupalPostForm('admin/modules', ['modules[Core][views][enable]' => "1"], t('Save configuration')); $this->rebuildContainer(); $this->assertNodeConfig(TRUE, TRUE); } @@ -226,7 +226,7 @@ */ protected function assertNodeConfig($required, $optional) { // Check the required default configuration in node module. - $string = $this->storage->findString(array('source' => 'Make content sticky', 'context' => '', 'type' => 'configuration')); + $string = $this->storage->findString(['source' => 'Make content sticky', 'context' => '', 'type' => 'configuration']); if ($required) { $this->assertFalse($this->config('system.action.node_make_sticky_action')->isNew()); $this->assertTrue($string, 'Node action text can be found with node module.'); @@ -237,7 +237,7 @@ } // Check the optional default configuration in node module. - $string = $this->storage->findString(array('source' => 'No front page content has been created yet.', 'context' => '', 'type' => 'configuration')); + $string = $this->storage->findString(['source' => 'No front page content has been created yet.', 'context' => '', 'type' => 'configuration']); if ($optional) { $this->assertFalse($this->config('views.view.frontpage')->isNew()); $this->assertTrue($string, 'Node view text can be found with node and views modules.');