Coding Standard phpcs

Created on 21 November 2022, almost 2 years ago
Updated 22 March 2023, over 1 year ago

Problem/Motivation


FILE: ...var/www/html/drupal8/web/modules/open_readspeaker/open_readspeaker.install
--------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
--------------------------------------------------------------------------------
 14 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 15 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 16 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 17 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 18 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 22 | ERROR | [ ] Doc comment short description must end with a full stop
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...al8/web/modules/open_readspeaker/src/Plugin/Block/OpenReadspeakerBlock.php
--------------------------------------------------------------------------------
FOUND 10 ERRORS AND 2 WARNINGS AFFECTING 12 LINES
--------------------------------------------------------------------------------
  64 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
  71 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
  78 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
  85 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
  92 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
  93 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 118 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
     |         |     injection instead
 139 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 140 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 141 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 142 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 143 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...pal8/web/modules/open_readspeaker/src/Form/OpenReadSpeakerSettingsForm.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------------
  13 | WARNING | The class short comment should describe what the class does
     |         | and not simply repeat the class name
 100 | WARNING | \Drupal calls should be avoided in classes, use dependency
     |         | injection instead
 107 | WARNING | \Drupal calls should be avoided in classes, use dependency
     |         | injection instead
--------------------------------------------------------------------------------


FILE: /var/www/html/drupal8/web/modules/open_readspeaker/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------
  5 | WARNING | Line exceeds 80 characters; contains 100 characters
 11 | WARNING | Line exceeds 80 characters; contains 96 characters
 19 | WARNING | Line exceeds 80 characters; contains 94 characters
 22 | WARNING | Line exceeds 80 characters; contains 114 characters
----------------------------------------------------------------------


📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
  • Needs manual testing

    The change/bugfix cannot be fully demonstrated by automated testing, and thus requires manual testing in a variety of environments.

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.71.5 2024