summaryrefslogtreecommitdiffstats
path: root/core/modules/views_ui
diff options
context:
space:
mode:
authorAlex Pott2018-05-11 09:40:33 (GMT)
committerAlex Pott2018-05-11 09:40:33 (GMT)
commitbe6d515cad09889002e5d55020b6bdce61c2c804 (patch)
treecc305043680f974001112c09244ea3cc12030c9d /core/modules/views_ui
parentb8f93d5b610cc5c6ba36d69bd8c1ec3b30ff7b25 (diff)
Issue #2572613 by Malevi4, idebr, pfrenssen, Mile23, RajeevK: Fix 'Drupal.Array.Array.CommaLastItem' coding standard
Diffstat (limited to 'core/modules/views_ui')
-rw-r--r--core/modules/views_ui/admin.inc2
-rw-r--r--core/modules/views_ui/src/Form/AdvancedSettingsForm.php2
-rw-r--r--core/modules/views_ui/src/Form/Ajax/Rearrange.php2
-rw-r--r--core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php4
-rw-r--r--core/modules/views_ui/src/Tests/RowUITest.php4
-rw-r--r--core/modules/views_ui/src/ViewPreviewForm.php2
-rw-r--r--core/modules/views_ui/src/ViewUI.php2
-rw-r--r--core/modules/views_ui/tests/src/Functional/DisplayPathTest.php2
-rw-r--r--core/modules/views_ui/tests/src/Functional/DisplayTest.php4
-rw-r--r--core/modules/views_ui/tests/src/Functional/HandlerTest.php10
-rw-r--r--core/modules/views_ui/tests/src/Functional/StyleUITest.php4
-rw-r--r--core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php2
-rw-r--r--core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php6
-rw-r--r--core/modules/views_ui/views_ui.module2
-rw-r--r--core/modules/views_ui/views_ui.theme.inc4
15 files changed, 26 insertions, 26 deletions
diff --git a/core/modules/views_ui/admin.inc b/core/modules/views_ui/admin.inc
index 1b8b88f..63c6190 100644
--- a/core/modules/views_ui/admin.inc
+++ b/core/modules/views_ui/admin.inc
@@ -286,7 +286,7 @@ function views_ui_build_form_url(FormStateInterface $form_state) {
$route_parameters = [
'js' => $ajax,
'view' => $name,
- 'display_id' => $display_id
+ 'display_id' => $display_id,
];
$url = Url::fromRoute($route_name, $route_parameters);
if ($type = $form_state->get('type')) {
diff --git a/core/modules/views_ui/src/Form/AdvancedSettingsForm.php b/core/modules/views_ui/src/Form/AdvancedSettingsForm.php
index 534006c..f6efde4 100644
--- a/core/modules/views_ui/src/Form/AdvancedSettingsForm.php
+++ b/core/modules/views_ui/src/Form/AdvancedSettingsForm.php
@@ -78,7 +78,7 @@ class AdvancedSettingsForm extends ConfigFormBase {
'#default_value' => array_filter($config->get('display_extenders')),
'#options' => $options,
'#type' => 'checkboxes',
- '#description' => $this->t('Select extensions of the views interface.')
+ '#description' => $this->t('Select extensions of the views interface.'),
];
}
diff --git a/core/modules/views_ui/src/Form/Ajax/Rearrange.php b/core/modules/views_ui/src/Form/Ajax/Rearrange.php
index b2b1e8e..c904ff3 100644
--- a/core/modules/views_ui/src/Form/Ajax/Rearrange.php
+++ b/core/modules/views_ui/src/Form/Ajax/Rearrange.php
@@ -85,7 +85,7 @@ class Rearrange extends ViewsFormBase {
'action' => 'order',
'relationship' => 'sibling',
'group' => 'weight',
- ]
+ ],
],
'#tree' => TRUE,
'#prefix' => '<div class="scroll" data-drupal-views-scroll>',
diff --git a/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php b/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php
index 81eb6f2..7e5f83f 100644
--- a/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php
+++ b/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php
@@ -44,7 +44,7 @@ class ReorderDisplays extends ViewsFormBase {
]);
$form['view'] = [
'#type' => 'value',
- '#value' => $view
+ '#value' => $view,
];
$displays = $view->get('display');
@@ -68,7 +68,7 @@ class ReorderDisplays extends ViewsFormBase {
'action' => 'order',
'relationship' => 'sibling',
'group' => 'weight',
- ]
+ ],
],
'#tree' => TRUE,
'#prefix' => '<div class="scroll" data-drupal-views-scroll>',
diff --git a/core/modules/views_ui/src/Tests/RowUITest.php b/core/modules/views_ui/src/Tests/RowUITest.php
index 5689009..e8aa2c3 100644
--- a/core/modules/views_ui/src/Tests/RowUITest.php
+++ b/core/modules/views_ui/src/Tests/RowUITest.php
@@ -34,13 +34,13 @@ class RowUITest extends UITestBase {
$this->assertFieldByName('row[type]', 'fields', 'The default row plugin selected in the UI should be fields.');
$edit = [
- 'row[type]' => 'test_row'
+ 'row[type]' => 'test_row',
];
$this->drupalPostForm(NULL, $edit, t('Apply'));
$this->assertFieldByName('row_options[test_option]', NULL, 'Make sure the custom settings form from the test plugin appears.');
$random_name = $this->randomMachineName();
$edit = [
- 'row_options[test_option]' => $random_name
+ 'row_options[test_option]' => $random_name,
];
$this->drupalPostForm(NULL, $edit, t('Apply'));
$this->drupalGet($row_options_url);
diff --git a/core/modules/views_ui/src/ViewPreviewForm.php b/core/modules/views_ui/src/ViewPreviewForm.php
index 4bc8eaa..787527b 100644
--- a/core/modules/views_ui/src/ViewPreviewForm.php
+++ b/core/modules/views_ui/src/ViewPreviewForm.php
@@ -77,7 +77,7 @@ class ViewPreviewForm extends ViewFormBase {
return [
'#attributes' => [
'id' => 'preview-submit-wrapper',
- 'class' => ['preview-submit-wrapper']
+ 'class' => ['preview-submit-wrapper'],
],
'button' => [
'#type' => 'submit',
diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php
index beb5fff..6b49fdc 100644
--- a/core/modules/views_ui/src/ViewUI.php
+++ b/core/modules/views_ui/src/ViewUI.php
@@ -713,7 +713,7 @@ class ViewUI implements ViewEntityInterface {
'data' => [
'#markup' => $path,
],
- ]
+ ],
];
}
if ($show_stats) {
diff --git a/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php b/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php
index 7291dc2..2f007f1 100644
--- a/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php
@@ -208,7 +208,7 @@ class DisplayPathTest extends UITestBase {
$edit = [
'title[0][value]' => 'Menu title',
'link[0][uri]' => '/admin/foo',
- 'menu_parent' => 'admin:system.admin'
+ 'menu_parent' => 'admin:system.admin',
];
$this->drupalPostForm('admin/structure/menu/manage/admin/add', $edit, t('Save'));
diff --git a/core/modules/views_ui/tests/src/Functional/DisplayTest.php b/core/modules/views_ui/tests/src/Functional/DisplayTest.php
index 519d522..8fa5a80 100644
--- a/core/modules/views_ui/tests/src/Functional/DisplayTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DisplayTest.php
@@ -45,7 +45,7 @@ class DisplayTest extends UITestBase {
*/
public function testReorderDisplay() {
$view = [
- 'block[create]' => TRUE
+ 'block[create]' => TRUE,
];
$view = $this->randomView($view);
@@ -60,7 +60,7 @@ class DisplayTest extends UITestBase {
// Put the block display in front of the page display.
$edit = [
'displays[page_1][weight]' => 2,
- 'displays[block_1][weight]' => 1
+ 'displays[block_1][weight]' => 1,
];
$this->drupalPostForm(NULL, $edit, t('Apply'));
$this->drupalPostForm(NULL, [], t('Save'));
diff --git a/core/modules/views_ui/tests/src/Functional/HandlerTest.php b/core/modules/views_ui/tests/src/Functional/HandlerTest.php
index b4be178..7d96d0c 100644
--- a/core/modules/views_ui/tests/src/Functional/HandlerTest.php
+++ b/core/modules/views_ui/tests/src/Functional/HandlerTest.php
@@ -53,7 +53,7 @@ class HandlerTest extends UITestBase {
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
- 'default' => 0
+ 'default' => 0,
];
return $schema;
@@ -74,8 +74,8 @@ class HandlerTest extends UITestBase {
'relationship' => [
'id' => 'standard',
'base' => 'users_field_data',
- 'base field' => 'uid'
- ]
+ 'base field' => 'uid',
+ ],
];
// Create a dummy field with no help text.
@@ -180,14 +180,14 @@ class HandlerTest extends UITestBase {
'field_name' => 'field_test',
'entity_type' => 'node',
'bundle' => 'page',
- 'label' => 'The giraffe" label'
+ 'label' => 'The giraffe" label',
])->save();
FieldConfig::create([
'field_name' => 'field_test',
'entity_type' => 'node',
'bundle' => 'article',
- 'label' => 'The <em>giraffe"</em> label <script>alert("the return of the xss")</script>'
+ 'label' => 'The <em>giraffe"</em> label <script>alert("the return of the xss")</script>',
])->save();
$this->drupalGet('admin/structure/views/nojs/add-handler/content/default/field');
diff --git a/core/modules/views_ui/tests/src/Functional/StyleUITest.php b/core/modules/views_ui/tests/src/Functional/StyleUITest.php
index 1eb9c78..62f682a 100644
--- a/core/modules/views_ui/tests/src/Functional/StyleUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/StyleUITest.php
@@ -33,13 +33,13 @@ class StyleUITest extends UITestBase {
$this->assertFieldByName('style[type]', 'default', 'The default style plugin selected in the UI should be unformatted list.');
$edit = [
- 'style[type]' => 'test_style'
+ 'style[type]' => 'test_style',
];
$this->drupalPostForm(NULL, $edit, t('Apply'));
$this->assertFieldByName('style_options[test_option]', NULL, 'Make sure the custom settings form from the test plugin appears.');
$random_name = $this->randomMachineName();
$edit = [
- 'style_options[test_option]' => $random_name
+ 'style_options[test_option]' => $random_name,
];
$this->drupalPostForm(NULL, $edit, t('Apply'));
$this->drupalGet($style_options_url);
diff --git a/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php b/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php
index 839fe3a..8a2dd29 100644
--- a/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php
+++ b/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php
@@ -76,7 +76,7 @@ class ViewsUITourTest extends TourTestBase {
foreach ($handler_titles as $handler_title) {
// Create source string.
$source = $this->localeStorage->createString([
- 'source' => $handler_title
+ 'source' => $handler_title,
]);
$source->save();
$this->createTranslation($source, $langcode);
diff --git a/core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php b/core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php
index b4a3df0..d448252 100644
--- a/core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php
+++ b/core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php
@@ -48,7 +48,7 @@ class ViewListBuilderTest extends UnitTestCase {
'theme' => 'views_view',
'no_ui' => TRUE,
'admin' => '',
- ]
+ ],
],
[
'page',
@@ -61,7 +61,7 @@ class ViewListBuilderTest extends UnitTestCase {
'contextual_links_locations' => ['page'],
'theme' => 'views_view',
'admin' => 'Page admin label',
- ]
+ ],
],
[
'embed',
@@ -71,7 +71,7 @@ class ViewListBuilderTest extends UnitTestCase {
'title' => 'embed',
'theme' => 'views_view',
'admin' => 'Embed admin label',
- ]
+ ],
],
]));
diff --git a/core/modules/views_ui/views_ui.module b/core/modules/views_ui/views_ui.module
index 0475bce..318d85b 100644
--- a/core/modules/views_ui/views_ui.module
+++ b/core/modules/views_ui/views_ui.module
@@ -134,7 +134,7 @@ function views_ui_preprocess_views_view(&$variables) {
// Render title for the admin preview.
if (!empty($view->live_preview)) {
$variables['title'] = [
- '#markup' => $view->getTitle()
+ '#markup' => $view->getTitle(),
];
}
diff --git a/core/modules/views_ui/views_ui.theme.inc b/core/modules/views_ui/views_ui.theme.inc
index f57132f..69eff48 100644
--- a/core/modules/views_ui/views_ui.theme.inc
+++ b/core/modules/views_ui/views_ui.theme.inc
@@ -184,7 +184,7 @@ function template_preprocess_views_ui_build_group_filter_form(&$variables) {
'action' => 'order',
'relationship' => 'sibling',
'group' => 'weight',
- ]
+ ],
],
];
@@ -353,7 +353,7 @@ function template_preprocess_views_ui_rearrange_filter_form(&$variables) {
'action' => 'order',
'relationship' => 'sibling',
'group' => 'weight',
- ]
+ ],
],
];
}