Issue #2857822 by alexpott, klausi: Fix coding standards issues introduced mostly by array syntax conversion

8.4.x
xjm 2017-03-04 08:02:01 -06:00
parent 52e3eec616
commit 72d65cc85c
22 changed files with 41 additions and 41 deletions

View File

@ -102,7 +102,7 @@ class BookManagerTest extends UnitTestCase {
// Provides a book with an existing parent. // Provides a book with an existing parent.
[ [
['pid' => 11, 'nid' => 12], ['pid' => 11, 'nid' => 12],
['nid' => 11, 'depth' => 1, 'p1' => 11,], ['nid' => 11, 'depth' => 1, 'p1' => 11],
['depth' => 2, 'p1' => 11, 'p2' => 12] + $empty, ['depth' => 2, 'p1' => 11, 'p2' => 12] + $empty,
], ],
// Provides a book with two existing parents. // Provides a book with two existing parents.

View File

@ -48,7 +48,7 @@ class BookLocalTasksTest extends LocalTaskIntegrationTestBase {
*/ */
public function testBookNodeLocalTasks($route) { public function testBookNodeLocalTasks($route) {
$this->assertLocalTasks($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'],
]); ]);
} }

View File

@ -109,23 +109,23 @@ class CKEditor extends EditorBase implements ContainerFactoryPluginInterface {
[ [
[ [
'name' => $this->t('Formatting'), 'name' => $this->t('Formatting'),
'items' => ['Bold', 'Italic',], 'items' => ['Bold', 'Italic'],
], ],
[ [
'name' => $this->t('Links'), 'name' => $this->t('Links'),
'items' => ['DrupalLink', 'DrupalUnlink',], 'items' => ['DrupalLink', 'DrupalUnlink'],
], ],
[ [
'name' => $this->t('Lists'), 'name' => $this->t('Lists'),
'items' => ['BulletedList', 'NumberedList',], 'items' => ['BulletedList', 'NumberedList'],
], ],
[ [
'name' => $this->t('Media'), 'name' => $this->t('Media'),
'items' => ['Blockquote', 'DrupalImage',], 'items' => ['Blockquote', 'DrupalImage'],
], ],
[ [
'name' => $this->t('Tools'), 'name' => $this->t('Tools'),
'items' => ['Source',], 'items' => ['Source'],
], ],
], ],
], ],

View File

@ -84,23 +84,23 @@ class CKEditorAdminTest extends WebTestBase {
[ [
[ [
'name' => 'Formatting', 'name' => 'Formatting',
'items' => ['Bold', 'Italic',], 'items' => ['Bold', 'Italic'],
], ],
[ [
'name' => 'Links', 'name' => 'Links',
'items' => ['DrupalLink', 'DrupalUnlink',], 'items' => ['DrupalLink', 'DrupalUnlink'],
], ],
[ [
'name' => 'Lists', 'name' => 'Lists',
'items' => ['BulletedList', 'NumberedList',], 'items' => ['BulletedList', 'NumberedList'],
], ],
[ [
'name' => 'Media', 'name' => 'Media',
'items' => ['Blockquote', 'DrupalImage',], 'items' => ['Blockquote', 'DrupalImage'],
], ],
[ [
'name' => 'Tools', 'name' => 'Tools',
'items' => ['Source',], 'items' => ['Source'],
], ],
], ],
], ],

View File

@ -463,23 +463,23 @@ class CKEditorTest extends KernelTestBase {
return [ return [
[ [
'name' => 'Formatting', 'name' => 'Formatting',
'items' => ['Bold', 'Italic',], 'items' => ['Bold', 'Italic'],
], ],
[ [
'name' => 'Links', 'name' => 'Links',
'items' => ['DrupalLink', 'DrupalUnlink',], 'items' => ['DrupalLink', 'DrupalUnlink'],
], ],
[ [
'name' => 'Lists', 'name' => 'Lists',
'items' => ['BulletedList', 'NumberedList',], 'items' => ['BulletedList', 'NumberedList'],
], ],
[ [
'name' => 'Media', 'name' => 'Media',
'items' => ['Blockquote', 'DrupalImage',], 'items' => ['Blockquote', 'DrupalImage'],
], ],
[ [
'name' => 'Tools', 'name' => 'Tools',
'items' => ['Source',], 'items' => ['Source', ],
], ],
'/', '/',
]; ];

View File

@ -112,7 +112,7 @@ class FieldDataCountTest extends FieldKernelTestBase {
$entity_init = $this->container->get('entity_type.manager') $entity_init = $this->container->get('entity_type.manager')
->getStorage($entity_type) ->getStorage($entity_type)
->create(['type' => $entity_type,]); ->create(['type' => $entity_type]);
$cardinality = $this->fieldTestData->field_storage_2->getCardinality(); $cardinality = $this->fieldTestData->field_storage_2->getCardinality();
$this->assertIdentical($this->fieldTestData->field_storage_2->hasData(), FALSE, 'There are no entities with field data.'); $this->assertIdentical($this->fieldTestData->field_storage_2->hasData(), FALSE, 'There are no entities with field data.');

View File

@ -138,7 +138,7 @@ class MigrateFieldFormatterSettingsTest extends MigrateDrupal6TestBase {
$this->assertIdentical($expected, $component); $this->assertIdentical($expected, $component);
// Test date field. // Test date field.
$defaults = ['format_type' => 'fallback', 'timezone_override' => '',]; $defaults = ['format_type' => 'fallback', 'timezone_override' => ''];
$expected['weight'] = 10; $expected['weight'] = 10;
$expected['type'] = 'datetime_default'; $expected['type'] = 'datetime_default';
$expected['settings'] = ['format_type' => 'fallback'] + $defaults; $expected['settings'] = ['format_type' => 'fallback'] + $defaults;

View File

@ -26,7 +26,7 @@ class ShortcutLocalTasksTest extends LocalTaskIntegrationTestBase {
*/ */
public function testShortcutPageLocalTasks($route) { public function testShortcutPageLocalTasks($route) {
$tasks = [ $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); $this->assertLocalTasks($route, $tasks);
} }

View File

@ -179,7 +179,7 @@ class ToolbarAdminMenuTest extends WebTestBase {
$this->hash = $this->getSubtreesHash(); $this->hash = $this->getSubtreesHash();
$rid = $this->drupalCreateRole(['administer content types',]); $rid = $this->drupalCreateRole(['administer content types']);
// Assign the role to the user. // Assign the role to the user.
$this->drupalPostForm('user/' . $this->adminUser->id() . '/edit', ["roles[$rid]" => $rid], t('Save')); $this->drupalPostForm('user/' . $this->adminUser->id() . '/edit', ["roles[$rid]" => $rid], t('Save'));
@ -214,7 +214,7 @@ class ToolbarAdminMenuTest extends WebTestBase {
// adminUser2 will add a role to adminUser. // adminUser2 will add a role to adminUser.
$this->drupalLogin($this->adminUser2); $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 // Get the subtree hash for adminUser2 to check later that it has not
// changed. Request a new page to refresh the drupalSettings object. // changed. Request a new page to refresh the drupalSettings object.

View File

@ -44,7 +44,7 @@ class UserLocalTasksTest extends LocalTaskIntegrationTestBase {
*/ */
public function testUserLoginLocalTasks($route) { public function testUserLoginLocalTasks($route) {
$tasks = [ $tasks = [
0 => ['user.register', 'user.pass', 'user.login',], 0 => ['user.register', 'user.pass', 'user.login'],
]; ];
$this->assertLocalTasks($route, $tasks); $this->assertLocalTasks($route, $tasks);
} }
@ -67,7 +67,7 @@ class UserLocalTasksTest extends LocalTaskIntegrationTestBase {
*/ */
public function testUserPageLocalTasks($route, $subtask = []) { public function testUserPageLocalTasks($route, $subtask = []) {
$tasks = [ $tasks = [
0 => ['entity.user.canonical', 'entity.user.edit_form',], 0 => ['entity.user.canonical', 'entity.user.edit_form'],
]; ];
if ($subtask) $tasks[] = $subtask; if ($subtask) $tasks[] = $subtask;
$this->assertLocalTasks($route, $tasks); $this->assertLocalTasks($route, $tasks);

View File

@ -279,7 +279,7 @@ class PoHeaderTest extends UnitTestCase {
193 => 1, 193 => 1,
194 => 1, 194 => 1,
'default' => 2, 'default' => 2,
],], ], ],
[ [
'nplurals=4; plural=(((n==1)||(n==11))?(0):(((n==2)||(n==12))?(1):(((n>2)&&(n<20))?(2):3)));', 'nplurals=4; plural=(((n==1)||(n==11))?(0):(((n==2)||(n==12))?(1):(((n>2)&&(n<20))?(2):3)));',
[ [