Fix the issues reported by phpcs

Created on 16 July 2024, 4 months ago

Problem/Motivation

Command : phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig web/modules/contrib/acb/

FILE: /var/www/html/d10/web/modules/contrib/acb/acb.module
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 31 WARNINGS AFFECTING 33 LINES
--------------------------------------------------------------------------------------------------------------------------------------------
   7 | WARNING | [x] '@TODO: code cleanup.' should match the format '@todo Fix problem X here.'
   8 | WARNING | [x] '@TODO: define services where appropriate.' should match the format '@todo Fix problem X here.'
  11 | WARNING | [x] Unused use statement
  63 | ERROR   | [x] Data types in @var tags need to be fully namespaced
 107 | WARNING | [ ] Line exceeds 80 characters; contains 98 characters
 135 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters
 141 | WARNING | [x] '@TODO: check if still needed in D8.' should match the format '@todo Fix problem X here.'
 142 | ERROR   | [ ] The array declaration extends to column 93 (the limit is 80). The array content should be split up over multiple lines
 156 | WARNING | [x] '@TODO: Find out if there is a reason to keep existing grants.' should match the format '@todo Fix problem X here.'
 166 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
 169 | WARNING | [ ] Line exceeds 80 characters; contains 113 characters
 172 | WARNING | [ ] Line exceeds 80 characters; contains 100 characters
 180 | WARNING | [ ] Line exceeds 80 characters; contains 123 characters
 181 | WARNING | [ ] Line exceeds 80 characters; contains 94 characters
 182 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
 183 | WARNING | [ ] Line exceeds 80 characters; contains 96 characters
 213 | WARNING | [ ] Line exceeds 80 characters; contains 103 characters
 218 | WARNING | [ ] Line exceeds 80 characters; contains 105 characters
 231 | WARNING | [ ] Line exceeds 80 characters; contains 109 characters
 258 | WARNING | [ ] Code after the RETURN statement on line 256 cannot be executed
 261 | WARNING | [ ] Code after the RETURN statement on line 260 cannot be executed
 268 | WARNING | [ ] Line exceeds 80 characters; contains 95 characters
 270 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters
 275 | WARNING | [ ] Line exceeds 80 characters; contains 104 characters
 291 | WARNING | [ ] Line exceeds 80 characters; contains 93 characters
 301 | WARNING | [ ] Line exceeds 80 characters; contains 94 characters
 303 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
 304 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
 305 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters
 309 | WARNING | [ ] Line exceeds 80 characters; contains 143 characters
 320 | WARNING | [ ] Line exceeds 80 characters; contains 110 characters
 323 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
 332 | WARNING | [x] A comma should follow the last multiline array item. Found: 100
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/d10/web/modules/contrib/acb/acb.info.yml
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
 1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
 1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
 1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/d10/web/modules/contrib/acb/acb.install
---------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
---------------------------------------------------------------------------------------
  1 | ERROR   | [x] The PHP open tag must be followed by exactly one blank line
  3 | ERROR   | [x] Doc comment short description must be on the first line
 27 | WARNING | [x] '@TODO: test.' should match the format '@todo Fix problem X here.'
---------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------

Time: 207ms; Memory: 12MB


Steps to reproduce

Run PHPCS on Config Pages module.

Proposed resolution

Fixed the coding standards.

Remaining tasks

Submit the patch either MR.

📌 Task
Status

RTBC

Version

2.0

Component

Code

Created by

🇮🇳India hetal.solanki

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024