Module have PHPCS issues

Created on 11 March 2024, 9 months ago
Updated 19 March 2024, 8 months ago

Referred source
when I run the command
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml
for you module

I found this

FILE: /var/www/html/web/modules/contrib/configuration_batch_export/src/Form/DownloadConfirmForm.php
---------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------
29 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------

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

FILE: /var/www/html/web/modules/contrib/configuration_batch_export/configuration_batch_export.routing.yml
---------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------
13 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------

FILE: /var/www/html/web/modules/contrib/configuration_batch_export/configuration_batch_export.install
-----------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
-----------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
3 | ERROR | [x] Missing function doc comment
4 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
5 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
6 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------

FILE: /var/www/html/web/modules/contrib/configuration_batch_export/README.md
----------------------------------------------------------------------------
FOUND 1 ERROR AND 6 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------------
3 | WARNING | [ ] Line exceeds 80 characters; contains 132 characters
13 | WARNING | [ ] Line exceeds 80 characters; contains 87 characters
26 | WARNING | [ ] Line exceeds 80 characters; contains 193 characters
27 | WARNING | [ ] Line exceeds 80 characters; contains 98 characters
28 | WARNING | [ ] Line exceeds 80 characters; contains 108 characters
34 | WARNING | [ ] Line exceeds 80 characters; contains 88 characters
34 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------

FILE: /var/www/html/web/modules/contrib/configuration_batch_export/configuration_batch_export.links.task.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
------------------------------------------------------------------------------------------------------------

I created patch for the above

๐Ÿ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia Harpreet_singh_saluja

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