Problem/Motivation

The JS Example doesn't meet Drupal coding standards according to phpcs.

Proposed resolution

Make the suggestions by phpcs.

CommentFileSizeAuthor
#2 update_js_example_to-2662908-2.patch9.12 KBjlbellido

Comments

jlbellido created an issue. See original summary.

jlbellido’s picture

Status: Active » Needs review
StatusFileSize
new9.12 KB

Add a new patch for solving all errors found by CS at the JS example.

Thanks!

  • Mile23 committed 97c66b1 on authored by jlbellido
    Issue #2662908 by jlbellido: Update JS Example to meet coding standards
    
mile23’s picture

Status: Needs review » Fixed
+++ b/js_example/src/Controller/JsExampleController.php
@@ -23,16 +23,27 @@ class JsExampleController extends ControllerBase {
+    $build['content'] = [
+      'first_line' => [
+        '#prefix' => '<p>',
+        '#markup' => 'Drupal includes jQuery and jQuery UI.',
+        '#suffix' => '</p>',
+      ],

So I totally get why you did this, and the reasons are all good. It's a little bit of overkill, however, especially given that we have the {% trans %} tag in twig. So we'll commit this and then move over to templates later.

Committed and fixed. Thanks!

Status: Fixed » Closed (fixed)

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