Fix the issue reported by phpcs

Created on 14 July 2023, over 1 year ago
Updated 18 July 2023, over 1 year ago

Problem/Motivation

Getting following error/warnings of phpcs:

FILE: D:\xampp\htdocs\project_10\web\modules\contrib\config_ignore_uuid\src\EventSubscriber\ConfigSubscriber.php
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 19 ERRORS AND 1 WARNING AFFECTING 17 LINES
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
11 | ERROR | [x] Missing class doc comment
13 | ERROR | [x] Whitespace found at end of line
14 | ERROR | [x] Whitespace found at end of line
15 | ERROR | [x] Whitespace found at end of line
16 | ERROR | [x] Whitespace found at end of line
16 | ERROR | [x] Expected "\Drupal\Core\Config\StorageInterface" but found "\Drupal\Core\Config\StorageInterface " for @var tag in member variable comment
17 | ERROR | [x] Whitespace found at end of line
18 | ERROR | [x] Whitespace found at end of line
19 | ERROR | [x] Whitespace found at end of line
20 | ERROR | [x] Whitespace found at end of line
21 | WARNING | [ ] Line exceeds 80 characters; contains 106 characters
21 | ERROR | [x] Whitespace found at end of line
34 | ERROR | [ ] Parameter $config_factory is not described in comment
52 | ERROR | [ ] The array declaration extends to column 83 (the limit is 80). The array content should be split up over multiple lines
55 | ERROR | [x] Whitespace found at end of line
77 | ERROR | [x] Whitespace found at end of line
77 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
134 | ERROR | [x] Expected 1 blank line after function; 0 found
135 | ERROR | [x] The closing brace for the class must have an empty line before it
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 17 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: D:\xampp\htdocs\project_10\web\modules\contrib\config_ignore_uuid\src\Form\Settings.php
---------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
---------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------

Steps to reproduce

run following command:

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

Proposed resolution

Above error/warnings need to be fixed

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

RTBC

Component

Code

Created by

🇮🇳India arti_parmar

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @arti_parmar
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India arti_parmar

    Kindly review patch.

  • Status changed to RTBC over 1 year ago
  • 🇵🇭Philippines clarkssquared

    Hi arti_parmar

    I applied your patch to my local and I confirmed that your patch #2 fixed all the PHPCS errors/issues.

    Please look at the screenshot I attached for your reference

    Thank you.

Production build 0.71.5 2024