Fix the issues reported by PHP_CodeSniffer

Created on 21 September 2024, 2 months ago

Problem/Motivation

FILE: taxonomy_fast_import\README.md
-----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------
12 | WARNING | Line exceeds 80 characters; contains 82 characters
-----------------------------------------------------------------------

FILE: taxonomy_fast_import\src\Batch\TaxonomiesImportBatch.php
--------------------------------------------------------------------------------------------------------------------------
FOUND 13 ERRORS AND 2 WARNINGS AFFECTING 11 LINES
--------------------------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Missing class doc comment
10 | ERROR | [x] Missing function doc comment
17 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
29 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
36 | ERROR | [x] Missing function doc comment
77 | ERROR | [ ] Missing parameter comment
77 | ERROR | [ ] Missing parameter type
78 | ERROR | [ ] Missing parameter comment
78 | ERROR | [ ] Missing parameter type
80 | ERROR | [ ] Description for the @return value is missing
94 | ERROR | [ ] Missing parameter comment
94 | ERROR | [ ] Missing parameter type
95 | ERROR | [ ] Missing parameter comment
95 | ERROR | [ ] Missing parameter type
97 | ERROR | [ ] Description for the @return value is missing
--------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------

FILE: taxonomy_fast_import\src\Form\TaxonomiesImportForm.php
-----------------------------------------------------------------------------------------------
FOUND 11 ERRORS AND 2 WARNINGS AFFECTING 13 LINES
-----------------------------------------------------------------------------------------------
48 | ERROR | [x] Missing function doc comment
102 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
131 | ERROR | [x] Missing function doc comment
174 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
234 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
235 | ERROR | [x] Array indentation error, expected 10 spaces but found 8
236 | ERROR | [x] Array indentation error, expected 10 spaces but found 8
237 | ERROR | [x] Array indentation error, expected 10 spaces but found 8
238 | ERROR | [x] Array closing indentation error, expected 8 spaces but found 6
248 | ERROR | [ ] Missing parameter comment
249 | ERROR | [ ] Missing parameter comment
250 | ERROR | [ ] Missing parameter comment
252 | ERROR | [ ] Description for the @return value must be on the next line
-----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------

FILE: taxonomy_fast_import\taxonomy_fast_import.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
-------------------------------------------------------------------------------------------------------------

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 review

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