Drupal Coding Standard is not matched

Created on 3 September 2024, 4 months ago

Problem/Motivation

FILE: readremaining\readremaining.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: readremaining\readremaining.module
-------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 2 LINES
-------------------------------------------------------------------------------------
18 | ERROR | [x] Case breaking statements must be followed by a single blank line
19 | WARNING | [ ] Code after the RETURN statement on line 18 cannot be executed
19 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
-------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------

FILE: readremaining\readremaining.services.yml
----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------
4 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------

FILE: readremaining\src\Form\ReadRemainingConfigurationForm.php
---------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\EntityTypeManagerInterface.
---------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------

FILE: readremaining\src\Manager\ReadRemainingManager.php
---------------------------------------------------------------------------------------------------------------------
FOUND 12 ERRORS AND 1 WARNING AFFECTING 10 LINES
---------------------------------------------------------------------------------------------------------------------
9 | ERROR | [x] Doc comment short description must end with a full stop
10 | ERROR | [x] There must be exactly one blank line before the tags in a doc comment
11 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
14 | ERROR | [ ] Missing member variable doc comment
15 | ERROR | [ ] Missing member variable doc comment
24 | ERROR | [x] There must be exactly one blank line before the tags in a doc comment
24 | ERROR | [ ] Description for the @return value is missing
32 | ERROR | [x] There must be exactly one blank line before the tags in a doc comment
32 | ERROR | [ ] Description for the @return value is missing
49 | ERROR | [x] Expected 1 blank line after function; 2 found
54 | ERROR | [x] There must be exactly one blank line before the tags in a doc comment
54 | ERROR | [ ] Description for the @return value is missing
79 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 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.

🐛 Bug report
Status

Needs work

Version

2.2

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