Fix the issues reported by phpcs

Created on 6 July 2023, over 1 year ago
Updated 28 September 2023, over 1 year ago

Problem/Motivation

FILE: /var/www/html/vb/d_cont/scrolling_news_ticker/scrolling_news_ticker.module
--------------------------------------------------------------------------------
FOUND 11 ERRORS AND 1 WARNING AFFECTING 12 LINES
--------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found
| | "\r\n"
5 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
13 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
14 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 3
16 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 5
17 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 7
18 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 7
19 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 7
21 | ERROR | [x] Whitespace found at end of line
22 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 5
23 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 3
24 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...l/vb/d_cont/scrolling_news_ticker/src/Plugin/Block/ScrollingNewsTicker.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------
85 | WARNING | t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait and
| | $this->t() instead
87 | WARNING | t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait and
| | $this->t() instead
88 | WARNING | t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait and
| | $this->t() instead
89 | 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
--------------------------------------------------------------------------------

Time: 97ms; Memory: 10MB

Steps to reproduce

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig scrolling_news_ticker/

Remaining tasks

Patch review

📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇮🇳India urvashi_vora Madhya Pradesh, India

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.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024