Fix the issues reported by phpcs.

Created on 29 June 2023, 12 months ago
Updated 30 May 2024, 24 days ago

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/

๐Ÿ“Œ Task
Status

Needs review

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia Harshita mehra

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Harshita mehra
  • Status changed to Needs review 12 months ago
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7
    last update 12 months ago
    5 pass
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Harshita mehra

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

  • Status changed to Needs work 5 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Ashutosh Ahirwal India

    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

  • Status changed to Needs review 4 months ago
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7
    last update 4 months ago
    5 pass
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia chaitanyadessai

    Added patch.

  • Status changed to Needs work 25 days ago
  • 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

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

    silvi.addweb โ†’ made their first commit to this issueโ€™s fork.

  • Merge request !11#3371277- Fixed phpcs issues. โ†’ (Open) created by Unnamed author
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7
    last update 24 days ago
    5 pass
  • Status changed to Needs review 24 days ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

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

Production build 0.69.0 2024