Problem/Motivation
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig /var/www/html/VB/drupal-10.1.0/modules/contrib/blockify/
FILE: /var/www/html/VB/drupal-10.1.0/modules/contrib/blockify/src/plugin/Block/SiteNameBlock.php
------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------
21 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
------------------------------------------------------------------------------------------------
FILE: /var/www/html/VB/drupal-10.1.0/modules/contrib/blockify/src/plugin/Block/SiteSloganBlock.php
--------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------
21 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
--------------------------------------------------------------------------------------------------
FILE: /var/www/html/VB/drupal-10.1.0/modules/contrib/blockify/src/plugin/Block/ThemeLogoBlock.php
-------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------
22 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-------------------------------------------------------------------------------------------------
FILE: /var/www/html/VB/drupal-10.1.0/modules/contrib/blockify/blockify.module
-------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------
118 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------
Time: 287ms; Memory: 10MB
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | drupal.org_files_issues_2023-09-20_fix-the-issues-3373535.patch | 846 bytes | chetan 11 |
| #3 | Screenshot from 2023-09-20 10-52-52.png | 26.4 KB | shiv_yadav |
| #3 | fix-the-issues-3373535.patch | 846 bytes | shiv_yadav |
Issue fork blockify-3373535
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
indrapatil commentedComment #3
shiv_yadavHi Indrapatil,
- Fixed issue
- created patch & screenshot.
Comment #4
chetan 11 commentedHi @Indrapatil
I have fixed all the phpcs issues & created the patch.
Comment #5
shiv_yadavComment #6
elberHi I revised the patch.
it is good to me phpcs errors has been fixed
Patch applied cleanly, module keeps working normally moving to RTBC.