In core/modules/views_ui/src/ViewUI.php there are several lines like this:

 array('data' => array('#type' => 'inline_template', '#template' => "<strong>{% trans 'Query' %}</strong>")),

However, elsewhere in core, each of #something elements is on a separate line, like this one from core/modules/system/tests/modules/theme_test/src/ThemeTestController.php:

    $element['test'] = array(
      '#type' => 'inline_template',
      '#template' => 'test-with-context {{ llama }}',
      '#context' => array('llama' => 'muuh'),
    );

Your mission, should you choose to accept it, is to re-format these lines so they match our lovely Coding Standards!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Cogax’s picture

Assigned: Unassigned » Cogax
Cogax’s picture

Status: Active » Needs review
FileSize
4.08 KB

I've made some changes. Hope it fits.

Cogax’s picture

Assigned: Cogax » Unassigned
karengrey’s picture

Status: Needs review » Reviewed & tested by the community

Code is now re-formatted and meets coding standards.
Good job!

gvso’s picture

Status: Reviewed & tested by the community » Needs work
+              array(
+                'data' => array(
+                  '#type' => 'inline_template',
+                  '#template' => "<strong>{% trans 'Query' %}</strong>"
+                )
+              ),

We should include comma at the end of every array item

Something like this

+              array(
+                'data' => array(
+                  '#type' => 'inline_template',
+                  '#template' => "<strong>{% trans 'Query' %}</strong>",
+                ),
+              ),
gbisht’s picture

Status: Needs work » Needs review
Issue tags: +SprintWeekend2015
FileSize
4.1 KB

Formatting done!

mglaman’s picture

Status: Needs review » Reviewed & tested by the community

Patch applies clean, #6 addressed remaining lack of comma usage.

gvso’s picture

RTBC +1 for #6

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 6: fix-whitespaces-of-inline-template-2409391-6.patch, failed testing.

Status: Needs work » Needs review
gvso’s picture

Status: Needs review » Reviewed & tested by the community

Wondering why it failed. Marking it as RTBC again!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 6: fix-whitespaces-of-inline-template-2409391-6.patch, failed testing.

Status: Needs work » Needs review
gvso’s picture

Status: Needs review » Reviewed & tested by the community

Why it failed again? It's weird. Marking as RTBC one more time :)

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 610e90e and pushed to 8.0.x. Thanks!

  • alexpott committed 610e90e on 8.0.x
    Issue #2409391 by Cogax, gulab.bisht: Fix the whitespace of...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.