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/

Command icon 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

Harshita mehna created an issue. See original summary.

harshita mehna’s picture

Status: Active » Needs review
StatusFileSize
new844 bytes

I have provided a patch to fix this issue.
Kindly review.

ashutosh ahirwal’s picture

Status: Needs review » Needs work
Issue tags: +Coding standards
StatusFileSize
new28.53 KB

Hi 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

chaitanyadessai’s picture

Status: Needs work » Needs review
StatusFileSize
new5.74 KB

Added patch.

a.aaronjake’s picture

Status: Needs review » Needs work

Hi @chaitanyadessai,

Applied your patch successfully, but new issues were found, lots of them.

layout_builder_modal git:(8.x-1.2) curl https://www.drupal.org/files/issues/2024-02-19/3371277-4.patch | patch -p1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5874  100  5874    0     0  14616      0 --:--:-- --:--:-- --:--:-- 15023
patching file layout_builder_modal.module
patching file layout_builder_modal.services.yml
patching file src/EventSubscriber/AjaxResponseSubscriber.php
patching file src/Form/LayoutBuilderModalSettingsForm.php
patching file tests/src/FunctionalJavascript/LayoutBuilderModalTest.php
patching file theme/seven/css/js.css
➜  layout_builder_modal git:(8.x-1.2) ✗ cd ..
➜  contrib git:(main) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig layout_builder_modal

FILE: ...gissue/web/modules/contrib/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: ...web/modules/contrib/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: ...issue/web/modules/contrib/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: ...orgissue/web/modules/contrib/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: .../web/modules/contrib/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: ...ssue/web/modules/contrib/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: ...issue/web/modules/contrib/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: ...rgissue/web/modules/contrib/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: ...sue/web/modules/contrib/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: ...gissue/web/modules/contrib/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
--------------------------------------------------------------------------------

Time: 283ms; Memory: 10MB

Kindly check.

Thanks,
Jake

silvi.addweb made their first commit to this issue’s fork.

silvi.addweb’s picture

Status: Needs work » Needs review

Hi @a.aaronjake, it is okay for minified css file, I have tested patch and created MR. please review

a.aaronjake’s picture

Status: Needs review » Reviewed & tested by the community

Hi @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

avpaderno made their first commit to this issue’s fork.

avpaderno’s picture

Title: Fix the issues reported by phpcs. » Fix the issues reported by phpcs