Problem/Motivation
FILE: C:\wamp64\www\my_learning_site\web\modules\contrib\block_class\js\block-class.js
-------------------------------------------------------------------------------------------------
FOUND 25 ERRORS AFFECTING 25 LINES
-------------------------------------------------------------------------------------------------
49 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
66 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
87 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
92 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
100 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
104 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
120 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
145 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
152 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
172 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
201 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
209 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
233 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
250 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
262 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
283 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
291 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
302 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
307 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
318 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
323 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
343 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
348 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
354 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
359 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 25 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------
FILE: C:\wamp64\www\my_learning_site\web\modules\contrib\block_class\src\Controller\BlockClassController.php
-----------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------
9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Config\ConfigFactoryInterface.
-----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------
FILE: C:\wamp64\www\my_learning_site\web\modules\contrib\block_class\src\Form\BlockClassBulkOperationsForm.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------
11 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Extension\ExtensionList.
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------
FILE: C:\wamp64\www\my_learning_site\web\modules\contrib\block_class\src\Form\BlockClassConfirmBulkOperationForm.php
--------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\block\Entity\Block.
--------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------
FILE: C:\wamp64\www\my_learning_site\web\modules\contrib\block_class\src\Form\BlockClassConfirmDeletionAttributeForm.php
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\block\Entity\Block.
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------
FILE: C:\wamp64\www\my_learning_site\web\modules\contrib\block_class\src\Form\BlockClassConfirmDeletionForm.php
-------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\block\Entity\Block.
-------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------
FILE: C:\wamp64\www\my_learning_site\web\modules\contrib\block_class\src\Form\BlockClassSettingsForm.php
-----------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Extension\ExtensionList.
-----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------
FILE: C:\wamp64\www\my_learning_site\web\modules\contrib\block_class\src\Service\BlockClassHelperService.php
-----------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------
11 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Database\Connection.
606 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
-----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------
FILE: C:\wamp64\www\my_learning_site\web\modules\contrib\block_class\tests\src\Functional\BlockClassTest.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\StringTranslation\StringTranslationTrait.
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------
Steps to reproduce
Install Block Class module and perform PHPCS for Drupal Standards
Execute the command: phpcs --standard=drupal,drupalpractice block_class/
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | issue-fixed.PNG | 25.67 KB | gautam_105@ |
Issue fork block_class-3392942
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
shalini_jha commentedi have fixed the all reported issue and added patch for this.
Comment #3
clarkssquared commentedHi,
I applied and tested tthe patch #2 and I saw that there are still PHPCS issues being flagged, for convenience please refer below.
Comment #4
shalini_jha commentedI am checking
Comment #5
shalini_jha commentedAdded a patch for the remaining phpcs issues.
Comment #6
viren18febs commentedComment #7
shalini_jha commentedComment #8
renatog commentedActually I think it wasn’t fixed since the patch wasn’t committed, right?
Moving back the previous status
Comment #9
gautam_105@ commented@renatog,
i have fixed this issue and created MR for the same. Please review and see ascreenshot as well.
Comment #11
renatog commentedThanks @gautam_105
But I think the MR wasn't created correctly, right?
Please take a look if possible
Comment #12
gautam_105@ commented@renatog ,
i have updated my MR Please review MR.
Comment #13
gautam_105@ commentedComment #16
dydave commentedThe changes have been merged!
Build pipeline passed: https://git.drupalcode.org/project/block_class/-/pipelines/186710
PHPCS job passed: https://git.drupalcode.org/project/block_class/-/jobs/1734340
Thanks everyone for the great help and work!
Comment #17
dydave commented