Fix the issues reported by PHP_CodeSniffer

Created on 26 September 2024, about 2 months ago

Problem/Motivation

FILE: cache_purge\cache_purge.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: cache_purge\cache_purge.module
------------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 2 WARNINGS AFFECTING 7 LINES
------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
3 | WARNING | [x] Unused use statement
10 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
10 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
10 | ERROR | [x] Comments may not appear after statements
13 | ERROR | [x] Whitespace found at end of line
15 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
17 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
45 | ERROR | [x] There must be no blank lines after the function comment
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------

FILE: cache_purge\src\Form\CachePurgeSettingsForm.php
------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
------------------------------------------------------------------------------------
8 | ERROR | [x] Missing class doc comment
10 | ERROR | [x] Missing function doc comment
14 | ERROR | [x] Missing function doc comment
18 | ERROR | [x] Missing function doc comment
32 | ERROR | [x] Missing function doc comment
38 | ERROR | [x] Expected 1 blank line after function; 0 found
39 | ERROR | [x] The closing brace for the class must have an empty line before it
------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------

FILE: cache_purge\tests\src\Functional\CachePurgeTest.php
---------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
---------------------------------------------------------------------------------------
47 | ERROR | [x] Whitespace found at end of line
65 | ERROR | [x] Expected 1 blank line after function; 0 found
66 | ERROR | [x] The closing brace for the class must have an empty line before it
---------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------

Steps to reproduce

Run phpcs command to get the drupal coding standard issues.

Proposed resolution

Many of the issues can be fixed by running the phpcbf command. For the remaining ones, we will need to manually address and then commit these changes before pushing them.

šŸ“Œ Task
Status

Needs work

Version

1.0

Component

Code

Created by

šŸ‡ŗšŸ‡øUnited States sunil jolapara 3265 Summitrun Drive, Independence, KY, 41051

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024