Problem/Motivation
Getting the following errors.
FILE: /Applications/MAMP/htdocs/development/web/modules/contrib/layout_builder_modal/src/Form/LayoutBuilderModalSettingsForm.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
89 | ERROR | [x] Expected one space after the comma, 0 found
89 | ERROR | [x] Expected one space after the comma, 0 found
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------
Steps to reproduce
Run the following command:
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml modules/contrib/entity_log/
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3371277-4.patch | 5.74 KB | chaitanyadessai |
| #3 | Screenshot 2024-02-01 at 3.26.33 PM.png | 28.53 KB | ashutosh ahirwal |
| #2 | 3371277-2.patch | 844 bytes | harshita mehna |
Issue fork layout_builder_modal-3371277
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
harshita mehna commentedI have provided a patch to fix this issue.
Kindly review.
Comment #3
ashutosh ahirwal commentedHi provided patch in #2 get applied cleanly but its still showing error found by Phpcs.
Used command with arguments
./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/layout_builder_modal
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/layout_builder_modal/tests/src/FunctionalJavascript/LayoutBuilderModalTest.php
-------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------------------
265 | WARNING | Unused variable $page.
-------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/layout_builder_modal/layout_builder_modal.module
------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------
10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface.
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/layout_builder_modal/theme/seven/css/classy.css
------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/layout_builder_modal/theme/seven/css/media_library.css
-------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
-------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/layout_builder_modal/theme/seven/css/js.css
--------------------------------------------------------------------------------------------------------------------
FOUND 11 ERRORS AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Expected 1 space before opening brace of class definition; 0 found
1 | ERROR | [x] Opening brace should be the last content on the line
1 | ERROR | [x] Expected 1 space after colon in style definition; 0 found
1 | ERROR | [ ] Style definitions must end with a semicolon
1 | ERROR | [x] Closing brace of class definition must be on new line
1 | ERROR | [x] Expected 1 space before opening brace of class definition; 0 found
1 | ERROR | [x] Opening brace should be the last content on the line
1 | ERROR | [x] Each style definition must be on a line by itself
1 | ERROR | [x] Expected 1 space after colon in style definition; 0 found
1 | ERROR | [ ] Style definitions must end with a semicolon
1 | ERROR | [x] Closing brace of class definition must be on new line
--------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/layout_builder_modal/theme/seven/css/details.css
-------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
-------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/layout_builder_modal/theme/seven/css/form.css
----------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
----------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/layout_builder_modal/theme/seven/css/autocomplete.css
------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/layout_builder_modal/theme/seven/css/elements.css
--------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
--------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/layout_builder_modal/theme/seven/css/buttons.css
-------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
-------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/layout_builder_modal/theme/seven/css/icons.css
-----------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
-----------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/layout_builder_modal/theme/seven/css/normalize.css
---------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
---------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/layout_builder_modal/theme/seven/css/tables.css
------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/layout_builder_modal/src/Form/LayoutBuilderModalSettingsForm.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
66 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
67 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-----------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/layout_builder_modal/src/EventSubscriber/AjaxResponseSubscriber.php
----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Symfony\Component\EventDispatcher\EventSubscriberInterface.
----------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------
Time: 330ms; Memory: 12MB
Comment #4
chaitanyadessai commentedAdded patch.
Comment #5
a.aaronjake commentedHi @chaitanyadessai,
Applied your patch successfully, but new issues were found, lots of them.
Kindly check.
Thanks,
Jake
Comment #8
silvi.addweb commentedHi @a.aaronjake, it is okay for minified css file, I have tested patch and created MR. please review
Comment #9
a.aaronjake commentedHi @silvi.addweb,
Confirmed changes from patch was added to the created MR and only remaining issues are a minified css file and as noted that this is fine, will now move this to RTBC.
Thanks,
Jake
Comment #11
avpaderno