Fix the issues reported by phpcs

Created on 3 July 2024, 6 months ago
Updated 17 July 2024, 5 months ago

Problem/Motivation

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

FILE: /var/www/html/d10/web/modules/contrib/replace_polyfill/README.md
-----------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------
3 | WARNING | [ ] Line exceeds 80 characters; contains 118 characters
3 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------

FILE: /var/www/html/d10/web/modules/contrib/replace_polyfill/replace_polyfill.module
---------------------------------------------------------------------------------------------
FOUND 25 ERRORS AFFECTING 24 LINES
---------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
7 | ERROR | [x] Opening brace should be on the same line as the declaration
8 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
9 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
10 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
11 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
12 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
13 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
14 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
14 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
15 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
16 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
17 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
18 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
20 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
21 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
22 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
24 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
25 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
26 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
27 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
28 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
29 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
30 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
31 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
---------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 25 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------

FILE: /var/www/html/drupal-contribution-d10/web/modules/contrib/replace_polyfill-3458681/replace_polyfill.info.yml
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
5 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Run PHPCS on Config Pages module.

Proposed resolution

Fixed the coding standards.

Remaining tasks

Submit the patch either MR.

📌 Task
Status

Fixed

Version

1.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