Fix the issues reported by phpcs

Created on 7 July 2023, over 1 year ago
Updated 11 July 2023, over 1 year ago

Problem/Motivation

FILE: /var/www/html/vb/d_cont/drupal_js_path/drupal_js_path.libraries.yml
-------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------
8 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/drupal_js_path/drupal_js_path.module
------------------------------------------------------------------------
FOUND 10 ERRORS AFFECTING 10 LINES
------------------------------------------------------------------------
8 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
10 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
13 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
14 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 3
15 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 5
16 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 7
17 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 7
18 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 7
20 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 3
21 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/drupal_js_path/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------
14 | WARNING | Line exceeds 80 characters; contains 87 characters
15 | WARNING | Line exceeds 80 characters; contains 85 characters
18 | WARNING | Line exceeds 80 characters; contains 98 characters
19 | WARNING | Line exceeds 80 characters; contains 88 characters
----------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/drupal_js_path/src/Controller/DrupalJsPath.php
--------------------------------------------------------------------------------
FOUND 10 ERRORS AFFECTING 9 LINES
--------------------------------------------------------------------------------
13 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be
| | referenced with use statements
15 | ERROR | [x] Missing class doc comment
39 | ERROR | [ ] Parameter $request_stack is not described in comment
44 | ERROR | [x] Whitespace found at end of line
45 | ERROR | [ ] Parameter tags must be grouped together in a doc comment
77 | ERROR | [x] Expected newline after closing brace
83 | ERROR | [x] Missing function doc comment
92 | ERROR | [x] Expected newline after closing brace
97 | ERROR | [x] Expected 1 newline at end of file; 0 found
97 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/drupal_js_path/drupal_js_path.routing.yml
-----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------
14 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------

Time: 65ms; Memory: 10MB

Steps to reproduce

Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig drupal_js_path/

Remaining tasks

Patch review

📌 Task
Status

Fixed

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