Drupal Coding Standard Issue

Created on 3 August 2022, over 2 years ago
Updated 13 October 2024, 3 months ago

$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml style_options/
Xdebug: [Step Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: localhost:9000 (through xdebug.client_host/xdebug.client_port) :-(

FILE: C:\Users\SI-001\Downloads\style_options\README.txt
------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
------------------------------------------------------------------------
3 | WARNING | [ ] Line exceeds 80 characters; contains 107 characters
4 | WARNING | [ ] Line exceeds 80 characters; contains 105 characters
5 | WARNING | [ ] Line exceeds 80 characters; contains 88 characters
12 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------

FILE: C:\Users\SI-001\Downloads\style_options\style_options.module
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Time: 5.28 secs; Memory: 10MB

📌 Task
Status

Needs work

Version

1.1

Component

Code

Created by

🇮🇳India Rakhi Soni

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇫🇷France ccrosaz

    $ phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml style_options/

    FILE: style_options/src/Contracts/StyleOptionPluginInterface.php
    ---------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------------------
    8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Plugin\ConfigurableInterface.
    ---------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------------------------------

    FILE: style_options/src/Plugin/Layout/StyleOptionLayoutPlugin.php
    -----------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------
    7 | 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: style_options/src/Plugin/paragraphs/Behavior/StyleOptionBehavior.php
    ------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------------------
    6 | 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: style_options/src/Plugin/StyleOption/BackgroundColor.php
    -------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------------------
    9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\style_options\Plugin\StyleOptionPluginBase.
    -------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------------------------

    FILE: style_options/src/Plugin/StyleOption/BackgroundImage.php
    ------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------
    8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Render\Renderer.
    ------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------------

    FILE: style_options/src/Plugin/StyleOptionPluginBase.php
    -----------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------
    8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Plugin\PluginBase.
    -----------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------------

    FILE: style_options/src/StyleOptionConfigurationDiscovery.php
    ------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------------
    8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Utility\NestedArray.
    ------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------------------

    FILE: style_options/src/StyleOptionPluginManager.php
    ---------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------------
    8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Cache\CacheBackendInterface.
    ---------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------------------------

    FILE: style_options/src/StyleOptionStyleTrait.php
    -----------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------
    6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Utility\Html.
    -----------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------------

    FILE: style_options/style_options.module
    --------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------
    1 | ERROR | [x] Missing file doc comment
    --------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------

  • Merge request !24Fix Drupal coding standard for 1.1.x → (Open) created by ccrosaz
  • 🇫🇷France ccrosaz

    FILE: style_options/css/horizontal-tabs.css
    -----------------------------------------------------------------------------------------------------
    FOUND 43 ERRORS AFFECTING 27 LINES
    -----------------------------------------------------------------------------------------------------
    2 | ERROR | [x] Selectors must be on a single line
    3 | ERROR | [x] Selectors must be on a single line
    4 | ERROR | [x] Selectors must be on a single line
    5 | ERROR | [x] Selectors must be on a single line
    6 | ERROR | [x] Selectors must be on a single line
    7 | ERROR | [x] Selectors must be on a single line
    8 | ERROR | [x] Selectors must be on a single line
    9 | ERROR | [ ] Style definitions must end with a semicolon
    18 | ERROR | [x] Selectors must be on a single line
    19 | ERROR | [x] Blank lines are not allowed between class names
    20 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
    20 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
    20 | ERROR | [ ] Style definitions must end with a semicolon
    21 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
    21 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
    22 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
    22 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
    23 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
    23 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
    24 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
    25 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
    25 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
    26 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
    26 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
    27 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
    27 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
    28 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
    28 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
    30 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
    30 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
    32 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
    32 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
    33 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
    33 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
    34 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 7
    34 | ERROR | [ ] No style definition found on line; check for missing colon
    35 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
    35 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
    36 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 5
    37 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
    37 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
    38 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
    38 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
    -----------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 40 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------

  • 🇫🇷France ccrosaz

    After applying the patch :

    FILE: style_options/css/horizontal-tabs.css
    -----------------------------------------------------------------------------------------------------
    FOUND 8 ERRORS AFFECTING 7 LINES
    -----------------------------------------------------------------------------------------------------
    8 | ERROR | [x] Selectors must be on a single line
    9 | ERROR | [x] Blank lines are not allowed between class names
    10 | ERROR | [ ] Style definitions must end with a semicolon
    19 | ERROR | [x] Selectors must be on a single line
    20 | ERROR | [x] Blank lines are not allowed between class names
    21 | ERROR | [ ] Style definitions must end with a semicolon
    33 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
    33 | ERROR | [ ] No style definition found on line; check for missing colon
    -----------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------

Production build 0.71.5 2024