diff -u b/core/lib/Drupal/Component/Utility/Random.php b/core/lib/Drupal/Component/Utility/Random.php
--- b/core/lib/Drupal/Component/Utility/Random.php
+++ b/core/lib/Drupal/Component/Utility/Random.php
@@ -143,7 +143,8 @@
$vowels = ["a", "e", "i", "o", "u"];
$cons = ["b", "c", "d", "g", "h", "j", "k", "l", "m", "n", "p", "r", "s", "t", "u", "v", "w", "tr",
- "cr", "br", "fr", "th", "dr", "ch", "ph", "wr", "st", "sp", "sw", "pr", "sl", "cl", "sh"
+ "cr", "br", "fr", "th", "dr", "ch", "ph", "wr", "st", "sp", "sw", "pr",
+ "sl", "cl", "sh",
];
$num_vowels = count($vowels);
@@ -220,7 +221,7 @@
"utrum", "uxor", "valde", "valetudo", "validus", "vel", "velit",
"veniam", "venio", "vereor", "vero", "verto", "vicis", "vindico",
"virtus", "voco", "volutpat", "vulpes", "vulputate", "wisi", "ymo",
- "zelus"
+ "zelus",
];
$dictionary_flipped = array_flip($dictionary);
$greeking = '';
diff -u b/core/lib/Drupal/Core/Config/DatabaseStorage.php b/core/lib/Drupal/Core/Config/DatabaseStorage.php
--- b/core/lib/Drupal/Core/Config/DatabaseStorage.php
+++ b/core/lib/Drupal/Core/Config/DatabaseStorage.php
@@ -319,7 +319,7 @@
try {
return $this->connection->query(
'SELECT DISTINCT collection FROM {' . $this->connection->escapeTable($this->table) . '} WHERE collection <> :collection ORDER by collection', [
- ':collection' => StorageInterface::DEFAULT_COLLECTION
+ ':collection' => StorageInterface::DEFAULT_COLLECTION,
]
)->fetchCol();
}
diff -u b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
--- b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
+++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
@@ -67,7 +67,7 @@
'primary', 'references', 'returning', 'right', 'select', 'session_user',
'similar', 'some', 'symmetric', 'table', 'then', 'to', 'trailing', 'true',
'union', 'unique', 'user', 'using', 'variadic', 'verbose', 'when', 'where',
- 'window', 'with'
+ 'window', 'with',
];
/**
diff -u b/core/lib/Drupal/Core/Mail/MailFormatHelper.php b/core/lib/Drupal/Core/Mail/MailFormatHelper.php
--- b/core/lib/Drupal/Core/Mail/MailFormatHelper.php
+++ b/core/lib/Drupal/Core/Mail/MailFormatHelper.php
@@ -106,7 +106,7 @@
if (empty(static::$supportedTags)) {
static::$supportedTags = ['a', 'em', 'i', 'strong', 'b', 'br', 'p',
'blockquote', 'ul', 'ol', 'li', 'dl', 'dt', 'dd', 'h1', 'h2', 'h3',
- 'h4', 'h5', 'h6', 'hr'
+ 'h4', 'h5', 'h6', 'hr',
];
}
diff -u b/core/modules/comment/src/Plugin/migrate/source/d6/Comment.php b/core/modules/comment/src/Plugin/migrate/source/d6/Comment.php
--- b/core/modules/comment/src/Plugin/migrate/source/d6/Comment.php
+++ b/core/modules/comment/src/Plugin/migrate/source/d6/Comment.php
@@ -22,7 +22,7 @@
$query = $this->select('comments', 'c')
->fields('c', ['cid', 'pid', 'nid', 'uid', 'subject',
'comment', 'hostname', 'timestamp', 'status', 'thread', 'name',
- 'mail', 'homepage', 'format'
+ 'mail', 'homepage', 'format',
]);
$query->innerJoin('node', 'n', 'c.nid = n.nid');
$query->fields('n', ['type']);
diff -u b/core/modules/field_layout/tests/src/Functional/FieldLayoutTest.php b/core/modules/field_layout/tests/src/Functional/FieldLayoutTest.php
--- b/core/modules/field_layout/tests/src/Functional/FieldLayoutTest.php
+++ b/core/modules/field_layout/tests/src/Functional/FieldLayoutTest.php
@@ -29,9 +29,7 @@
'type' => 'article',
'title' => 'The node title',
'body' => [
- [
- 'value' => 'The node body',
- ],
+ ['value' => 'The node body'],
],
]);
$this->drupalLogin($this->drupalCreateUser([
diff -u b/core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php b/core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php
--- b/core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php
+++ b/core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php
@@ -26,9 +26,7 @@
$entity = EntityTest::create([
'name' => 'The name for this entity',
'field_test_text' => [
- [
- 'value' => 'The field test text value',
- ],
+ ['value' => 'The field test text value'],
],
]);
$entity->save();
diff -u b/core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php b/core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php
--- b/core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php
+++ b/core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php
@@ -26,9 +26,7 @@
$entity = EntityTest::create([
'name' => 'The name for this entity',
'field_test_text' => [
- [
- 'value' => 'The field test text value',
- ],
+ ['value' => 'The field test text value'],
],
]);
$entity->save();
diff -u b/core/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php b/core/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php
--- b/core/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php
+++ b/core/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php
@@ -59,11 +59,10 @@
public function renderArray() {
return [
- '#pre_render' => [
- function () {
- $elements = $this->earlyRenderContent();
- return $elements;
- },
+ '#pre_render' => [function () {
+ $elements = $this->earlyRenderContent();
+ return $elements;
+ }
],
];
}
diff -u b/core/modules/text/tests/src/Unit/Migrate/TextCckTest.php b/core/modules/text/tests/src/Unit/Migrate/TextCckTest.php
--- b/core/modules/text/tests/src/Unit/Migrate/TextCckTest.php
+++ b/core/modules/text/tests/src/Unit/Migrate/TextCckTest.php
@@ -123,25 +123,18 @@
*/
public function getFieldTypeProvider() {
return [
- ['string_long', 'text_textfield', [
- 'text_processing' => FALSE,
- ],
- ],
+ ['string_long', 'text_textfield', ['text_processing' => FALSE]],
['string', 'text_textfield', [
'text_processing' => FALSE,
'max_length' => 128,
],
],
- ['string_long', 'text_textfield',
- [
+ ['string_long', 'text_textfield', [
'text_processing' => FALSE,
'max_length' => 4096,
],
],
- ['text_long', 'text_textfield', [
- 'text_processing' => TRUE,
- ],
- ],
+ ['text_long', 'text_textfield', ['text_processing' => TRUE]],
['text', 'text_textfield', [
'text_processing' => TRUE,
'max_length' => 128,
@@ -155,14 +148,8 @@
['list_string', 'optionwidgets_buttons'],
['list_string', 'optionwidgets_select'],
['boolean', 'optionwidgets_onoff'],
- ['text_long', 'text_textarea', [
- 'text_processing' => TRUE,
- ],
- ],
- ['string_long', 'text_textarea', [
- 'text_processing' => FALSE,
- ],
- ],
+ ['text_long', 'text_textarea', ['text_processing' => TRUE]],
+ ['string_long', 'text_textarea', ['text_processing' => FALSE]],
[NULL, 'undefined'],
];
}
diff -u b/core/modules/text/tests/src/Unit/Migrate/d6/TextFieldTest.php b/core/modules/text/tests/src/Unit/Migrate/d6/TextFieldTest.php
--- b/core/modules/text/tests/src/Unit/Migrate/d6/TextFieldTest.php
+++ b/core/modules/text/tests/src/Unit/Migrate/d6/TextFieldTest.php
@@ -123,10 +123,7 @@
*/
public function getFieldTypeProvider() {
return [
- ['string_long', 'text_textfield', [
- 'text_processing' => FALSE,
- ],
- ],
+ ['string_long', 'text_textfield', ['text_processing' => FALSE]],
['string', 'text_textfield', [
'text_processing' => FALSE,
'max_length' => 128,
@@ -137,10 +134,7 @@
'max_length' => 4096,
],
],
- ['text_long', 'text_textfield', [
- 'text_processing' => TRUE,
- ],
- ],
+ ['text_long', 'text_textfield', ['text_processing' => TRUE]],
['text', 'text_textfield', [
'text_processing' => TRUE,
'max_length' => 128,
@@ -154,14 +148,8 @@
['list_string', 'optionwidgets_buttons'],
['list_string', 'optionwidgets_select'],
['boolean', 'optionwidgets_onoff'],
- ['text_long', 'text_textarea', [
- 'text_processing' => TRUE,
- ],
- ],
- ['string_long', 'text_textarea', [
- 'text_processing' => FALSE,
- ],
- ],
+ ['text_long', 'text_textarea', ['text_processing' => TRUE]],
+ ['string_long', 'text_textarea', ['text_processing' => FALSE]],
[NULL, 'undefined'],
];
}
diff -u b/core/modules/text/tests/src/Unit/Plugin/migrate/cckfield/TextCckTest.php b/core/modules/text/tests/src/Unit/Plugin/migrate/cckfield/TextCckTest.php
--- b/core/modules/text/tests/src/Unit/Plugin/migrate/cckfield/TextCckTest.php
+++ b/core/modules/text/tests/src/Unit/Plugin/migrate/cckfield/TextCckTest.php
@@ -123,10 +123,7 @@
*/
public function getFieldTypeProvider() {
return [
- ['string_long', 'text_textfield', [
- 'text_processing' => FALSE,
- ],
- ],
+ ['string_long', 'text_textfield', ['text_processing' => FALSE]],
['string', 'text_textfield', [
'text_processing' => FALSE,
'max_length' => 128,
@@ -137,10 +134,7 @@
'max_length' => 4096,
],
],
- ['text_long', 'text_textfield', [
- 'text_processing' => TRUE,
- ],
- ],
+ ['text_long', 'text_textfield', ['text_processing' => TRUE]],
['text', 'text_textfield', [
'text_processing' => TRUE,
'max_length' => 128,
@@ -154,15 +148,8 @@
['list_string', 'optionwidgets_buttons'],
['list_string', 'optionwidgets_select'],
['boolean', 'optionwidgets_onoff'],
- ['text_long', 'text_textarea', [
- 'text_processing' => TRUE,
- ],
- ],
- ['string_long', 'text_textarea',
- [
- 'text_processing' => FALSE,
- ],
- ],
+ ['text_long', 'text_textarea', ['text_processing' => TRUE]],
+ ['string_long', 'text_textarea', ['text_processing' => FALSE]],
[NULL, 'undefined'],
];
}
diff -u b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php
--- b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php
+++ b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php
@@ -122,10 +122,7 @@
*/
public function getFieldTypeProvider() {
return [
- ['string_long', 'text_textfield', [
- 'text_processing' => FALSE,
- ],
- ],
+ ['string_long', 'text_textfield', ['text_processing' => FALSE]],
['string', 'text_textfield', [
'text_processing' => FALSE,
'max_length' => 128,
@@ -136,10 +133,7 @@
'max_length' => 4096,
],
],
- ['text_long', 'text_textfield', [
- 'text_processing' => TRUE,
- ],
- ],
+ ['text_long', 'text_textfield', ['text_processing' => TRUE]],
['text', 'text_textfield', [
'text_processing' => TRUE,
'max_length' => 128,
@@ -153,14 +147,8 @@
['list_string', 'optionwidgets_buttons'],
['list_string', 'optionwidgets_select'],
['boolean', 'optionwidgets_onoff'],
- ['text_long', 'text_textarea', [
- 'text_processing' => TRUE,
- ],
- ],
- ['string_long', 'text_textarea', [
- 'text_processing' => FALSE,
- ],
- ],
+ ['text_long', 'text_textarea', ['text_processing' => TRUE]],
+ ['string_long', 'text_textarea', ['text_processing' => FALSE]],
[NULL, 'undefined'],
];
}
diff -u b/core/modules/views/tests/src/Unit/EntityViewsDataTest.php b/core/modules/views/tests/src/Unit/EntityViewsDataTest.php
--- b/core/modules/views/tests/src/Unit/EntityViewsDataTest.php
+++ b/core/modules/views/tests/src/Unit/EntityViewsDataTest.php
@@ -539,8 +539,7 @@
$this->assertEquals([
'left_field' => 'id',
'field' => 'entity_id',
- 'extra' => [
- [
+ 'extra' => [[
'field' => 'deleted',
'value' => 0,
'numeric' => TRUE,
@@ -696,8 +695,7 @@
$this->assertEquals([
'left_field' => 'id',
'field' => 'entity_id',
- 'extra' => [
- [
+ 'extra' => [[
'field' => 'deleted',
'value' => 0,
'numeric' => TRUE,
@@ -883,8 +881,7 @@
$this->assertEquals([
'left_field' => 'id',
'field' => 'entity_id',
- 'extra' => [
- [
+ 'extra' => [[
'field' => 'deleted',
'value' => 0,
'numeric' => TRUE,
@@ -897,8 +894,7 @@
$this->assertEquals([
'left_field' => 'revision_id',
'field' => 'entity_id',
- 'extra' => [
- [
+ 'extra' => [[
'field' => 'deleted',
'value' => 0,
'numeric' => TRUE,
diff -u b/core/modules/views/tests/src/Unit/PluginBaseTest.php b/core/modules/views/tests/src/Unit/PluginBaseTest.php
--- b/core/modules/views/tests/src/Unit/PluginBaseTest.php
+++ b/core/modules/views/tests/src/Unit/PluginBaseTest.php
@@ -171,11 +171,7 @@
],
'definition' => [
'key0' => ['default' => 'value0'],
- 'key1' => [
- 'contains' => [
- 'key1:1' => ['default' => 'value1:1'],
- ],
- ],
+ 'key1' => ['contains' => ['key1:1' => ['default' => 'value1:1']]],
],
'expected' => [
'key0' => 'value',
@@ -189,9 +185,7 @@
'key2' => [
'key2:1' => [
'key2:1:1' => 'value0',
- 'key2:1:2' => [
- 'key2:1:2:1' => 'value1',
- ],
+ 'key2:1:2' => ['key2:1:2:1' => 'value1'],
],
],
],
@@ -202,9 +196,7 @@
'contains' => [
'key2:1:1' => ['default' => 'value2:1:2:1'],
'key2:1:2' => [
- 'contains' => [
- 'key2:1:2:1' => ['default' => 'value2:1:2:1'],
- ],
+ 'contains' => ['key2:1:2:1' => ['default' => 'value2:1:2:1']],
],
],
],
diff -u b/core/modules/views/tests/src/Unit/ViewExecutableTest.php b/core/modules/views/tests/src/Unit/ViewExecutableTest.php
--- b/core/modules/views/tests/src/Unit/ViewExecutableTest.php
+++ b/core/modules/views/tests/src/Unit/ViewExecutableTest.php
@@ -366,12 +366,12 @@
return $argument;
}), [
'test_field' => [
- 'id' => 'test_field',
- 'table' => 'test_entity',
- 'field' => 'test_field',
- 'plugin_id' => 'standard',
- ],
- ]);
+ 'id' => 'test_field',
+ 'table' => 'test_entity',
+ 'field' => 'test_field',
+ 'plugin_id' => 'standard',
+ ],
+ ]);
}
foreach (['field', 'filter', 'argument', 'sort'] as $handler_type) {
@@ -407,8 +407,7 @@
->method('setOption')
->with($this->callback(function($argument) {
return $argument;
- }),
- [
+ }), [
'test_field' => [
'id' => 'test_field',
'table' => 'test_entity',
@@ -416,7 +415,7 @@
'entity_type' => 'test_entity_type',
'entity_field' => 'test_field',
'plugin_id' => 'standard',
- ]
+ ],
]);
}
diff -u b/core/tests/Drupal/Tests/Component/Gettext/PoHeaderTest.php b/core/tests/Drupal/Tests/Component/Gettext/PoHeaderTest.php
--- b/core/tests/Drupal/Tests/Component/Gettext/PoHeaderTest.php
+++ b/core/tests/Drupal/Tests/Component/Gettext/PoHeaderTest.php
@@ -279,7 +279,7 @@
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)));',
diff -u b/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryTest.php b/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryTest.php
--- b/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryTest.php
@@ -88,7 +88,7 @@
],
'test_2' => [
'test_2.test.yml' => $file_2,
- ]
+ ],
]);
$discovery = new YamlDiscovery('test', ['test_1' => vfsStream::url('root/test_1'), 'test_2' => vfsStream::url('root/test_2')]);
diff -u b/core/tests/Drupal/Tests/Core/Render/RendererTest.php b/core/tests/Drupal/Tests/Core/Render/RendererTest.php
--- b/core/tests/Drupal/Tests/Core/Render/RendererTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererTest.php
@@ -126,7 +126,7 @@
],
"This is test",
];
- // XSS filtering test.
+ // XSS filtering test.
$data[] = [
[
'child' => [
@@ -180,10 +180,10 @@
[
'#markup' => 'foo',
'#pre_render' => [function($elements) {
- $elements['#markup'] .= '';
- return $elements;
- }
- ],
+ $elements['#markup'] .= '';
+ return $elements;
+ }
+],
],
'fooalert("bar");',
];
@@ -193,9 +193,9 @@
'#markup' => 'foo',
'#allowed_tags' => ['script'],
'#pre_render' => [function($elements) {
- $elements['#markup'] .= '';
- return $elements;
- }
+ $elements['#markup'] .= '';
+ return $elements;
+ }
],
],
'foo',
@@ -206,9 +206,9 @@
[
'#plain_text' => 'foo',
'#pre_render' => [function($elements) {
- $elements['#plain_text'] .= '';
- return $elements;
- }
+ $elements['#plain_text'] .= '';
+ return $elements;
+ }
],
],
'foo<script>alert("bar");</script>',