Fix the issues reported by phpcs

Created on 14 April 2020, about 4 years ago
Updated 5 July 2023, 12 months ago

Running reports the following warnings/errors.


FILE: ./tour_ui_8.x-1.x/tests/src/Functional/TourUITest.php
  69 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
  74 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
  75 | WARNING | [ ] Line exceeds 80 characters; contains 181 characters
  77 | WARNING | [x] There must be no blank line following an inline comment
  77 | WARNING | [ ] There must be no blank line following an inline comment
  77 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
  96 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
  97 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 102 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 103 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 104 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 112 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 128 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 143 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 144 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 148 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 149 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 150 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 151 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 152 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 155 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 170 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 171 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 178 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 185 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 197 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 206 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead

FILE: ./tour_ui_8.x-1.x/src/TourListBuilder.php
 18 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
    |         |     $this->t() instead
 19 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
    |         |     $this->t() instead
 20 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
    |         |     $this->t() instead
 21 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
    |         |     $this->t() instead
 22 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
    |         |     $this->t() instead
 49 | ERROR   | [x] There should be no white space after an opening "("
 49 | ERROR   | [x] There should be no white space before a closing ")"
 85 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
    |         |     $this->t() instead
 90 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
    |         |     $this->t() instead

FILE: ./tour_ui_8.x-1.x/src/Form/TourForm.php
 200 | ERROR   | [ ] The array declaration extends to column 97 (the limit is 80). The array content should be split up over
     |         |     multiple lines
 205 | ERROR   | [ ] The array declaration extends to column 97 (the limit is 80). The array content should be split up over
     |         |     multiple lines
 226 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 290 | ERROR   | [ ] The array declaration extends to column 113 (the limit is 80). The array content should be split up over
     |         |     multiple lines
 299 | WARNING | [x] 'TODO: validate the routes' should match the format '@todo Fix problem X here.'
 299 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 300 | WARNING | [ ] Unused variable $routes.
 318 | ERROR   | [x] Doc comment long description must end with a full stop
 320 | ERROR   | [ ] Missing parameter comment
 322 | ERROR   | [ ] Description for the @return value is missing
 325 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 328 | ERROR   | [x] Inline comments must start with a capital letter
 328 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 332 | ERROR   | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
 333 | ERROR   | [x] Expected 1 space after FOREACH keyword; 0 found
 337 | ERROR   | [x] Expected 1 space before "!=="; 0 found
 339 | ERROR   | [x] Expected 1 space before "-"; 0 found
 339 | ERROR   | [x] Expected 1 space after "-"; 0 found
 341 | ERROR   | [x] Expected newline after closing brace
 343 | ERROR   | [x] Inline comments must start with a capital letter
 343 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 346 | ERROR   | [x] list(...) is forbidden, use [...] instead.

FILE: ./tour_ui_8.x-1.x/src/Form/TourTipDeleteForm.php
  86 | ERROR | The array declaration extends to column 151 (the limit is 80). The array content should be split up over multiple
     |       | lines
 124 | ERROR | The array declaration extends to column 149 (the limit is 80). The array content should be split up over multiple
     |       | lines

FILE: ./tour_ui_8.x-1.x/src/Controller/TourUIController.php
  83 | ERROR   | [ ] Missing parameter comment
  85 | ERROR   | [ ] Description for the @return value is missing
  92 | ERROR   | [x] Expected 1 space before "="; 0 found
  92 | ERROR   | [x] Expected 1 space after "="; 0 found
 101 | WARNING | [ ] Unused variable $route.

FILE: ./tour_ui_8.x-1.x/src/Plugin/tour_ui/tip/TipPluginTextExtended.php
 28 | WARNING | [x] 'TODO: Remove this method when' should match the format '@todo Fix problem X here.'

FILE: ./tour_ui_8.x-1.x/README.md
 12 | WARNING | Line exceeds 80 characters; contains 93 characters
 20 | WARNING | Line exceeds 80 characters; contains 212 characters
 25 | WARNING | Line exceeds 80 characters; contains 88 characters
 26 | WARNING | Line exceeds 80 characters; contains 89 characters
 28 | WARNING | Line exceeds 80 characters; contains 363 characters
 29 | WARNING | Line exceeds 80 characters; contains 193 characters
 30 | WARNING | Line exceeds 80 characters; contains 107 characters
 32 | WARNING | Line exceeds 80 characters; contains 216 characters
 33 | WARNING | Line exceeds 80 characters; contains 153 characters
 35 | WARNING | Line exceeds 80 characters; contains 95 characters
 37 | WARNING | Line exceeds 80 characters; contains 171 characters
 47 | WARNING | Line exceeds 80 characters; contains 133 characters
 51 | WARNING | Line exceeds 80 characters; contains 144 characters
 66 | WARNING | Line exceeds 80 characters; contains 154 characters

These warnings/errors must be fixed.

📌 Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇮🇳India Suresh Prabhu Parkala Bangalore

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024