Fix the PHP_CodeSniffer issues

Created on 7 September 2024, 4 months ago

Problem/Motivation

FILE: ai_image_alt_text\ai_image_alt_text.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: ai_image_alt_text\modules\ai_image_bulk_alt_text\ai_image_bulk_alt_text.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: ai_image_alt_text\modules\ai_image_bulk_alt_text\css\loader.css
---------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------
10 | ERROR | [x] Blank lines are not allowed in class definitions
30 | ERROR | [ ] Style definitions must end with a semicolon
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------

FILE: ai_image_alt_text\modules\ai_image_bulk_alt_text\src\Form\AltTextFixer.php
--------------------------------------------------------------------------------------------------------------
FOUND 16 ERRORS AFFECTING 16 LINES
--------------------------------------------------------------------------------------------------------------
9 | ERROR | [x] Missing class doc comment
135 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
150 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
151 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
152 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
153 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
156 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
159 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
160 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
161 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
164 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
167 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
168 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
169 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
308 | ERROR | [x] Expected 1 blank line after function; 0 found
309 | ERROR | [x] The closing brace for the class must have an empty line before it
--------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 16 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------

FILE: ai_image_alt_text\src\Controller\GenerateAltText.php
----------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------
72 | ERROR | [ ] Parameter $lang_code is not described in comment
119 | ERROR | [x] Expected newline after closing brace
----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------

FILE: ai_image_alt_text\src\Form\AiImageAltTextSettingsForm.php
---------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------
9 | WARNING | [x] Unused use statement
---------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------

FILE: ai_image_alt_text\src\ProviderHelper.php
----------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------
8 | ERROR | [x] Missing class doc comment
51 | ERROR | [x] Expected newline after closing brace
----------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 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