Fix the issues reported by phpcs

Created on 24 April 2023, about 1 year ago
Updated 29 January 2024, 5 months ago

endor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig web/modules/contrib/colorbox_media_video/

FILE: /var/www/html/vbd7/web/modules/contrib/colorbox_media_video/colorbox_media_video.info.yml
-----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------
9 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
-----------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd7/web/modules/contrib/colorbox_media_video/src/Plugin/Field/FieldFormatter/ColorboxMediaRemoteVideoFormatter.php
---------------------------------------------------------------------------------------------------------------------------------------
FOUND 15 ERRORS AFFECTING 14 LINES
---------------------------------------------------------------------------------------------------------------------------------------
22 | ERROR | [x] Doc comment short description must end with a full stop
80 | ERROR | [ ] Parameter $image_style_storage is not described in comment
108 | ERROR | [x] Expected 1 space between comma and type hint "ModuleHandlerInterface"; 2 found
108 | ERROR | [x] Expected one space after the comma, 2 found
145 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
146 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
147 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
148 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
149 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
150 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
151 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
194 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
195 | ERROR | [x] Array closing indentation error, expected 6 spaces but found 8
423 | ERROR | [x] Expected 1 blank line after function; 0 found
424 | ERROR | [x] The closing brace for the class must have an empty line before it
---------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 14 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd7/web/modules/contrib/colorbox_media_video/css/colorbox-media-video.css
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
1 | ERROR | [x] Expected 1 space before opening brace of class definition; 0 found
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd7/web/modules/contrib/colorbox_media_video/README.txt
----------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------------
14 | WARNING | [ ] Line exceeds 80 characters; contains 89 characters
53 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------

FILE: /var/www/html/vbd7/web/modules/contrib/colorbox_media_video/colorbox_media_video.theme.inc
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 1 WARNING AFFECTING 6 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
12 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters
71 | ERROR | [ ] The array declaration extends to column 121 (the limit is 80). The array content should be split up over multiple lines
111 | ERROR | [ ] The array declaration extends to column 124 (the limit is 80). The array content should be split up over multiple lines
166 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
185 | ERROR | [x] Expected 1 space after IF keyword; 0 found
185 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
190 | ERROR | [x] Expected 1 space after IF keyword; 0 found
190 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------

Time: 672ms; Memory: 14MB

Proposed resolution

Run :
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig

๐Ÿ“Œ Task
Status

Needs review

Version

2.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia dineshkumarbollu

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 @dineshkumarbollu
  • Status changed to Needs review about 1 year ago
  • Issue was unassigned.
  • Status changed to Needs work about 1 year ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines paraderojether

    Hi dineshkumarbollu

    I reviewed patch #2 and there are still remaining warnings and errors shown below:

    FILE: /Users/studenttrainees/Drupal2/drupalsite/docroot/modules/contrib/colorbox_media_video/colorbox_media_video.info.yml
    --------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------------
    9 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
    --------------------------------------------------------------------------------------------------------------------------

    FILE: /Users/studenttrainees/Drupal2/drupalsite/docroot/modules/contrib/colorbox_media_video/README.md
    ------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    ------------------------------------------------------------------------------------------------------
    11 | WARNING | Line exceeds 80 characters; contains 109 characters
    32 | WARNING | Line exceeds 80 characters; contains 143 characters
    ------------------------------------------------------------------------------------------------------

    FILE: /Users/studenttrainees/Drupal2/drupalsite/docroot/modules/contrib/colorbox_media_video/colorbox_media_video.theme.inc
    ---------------------------------------------------------------------------------------------------------------------------
    FOUND 6 ERRORS AFFECTING 3 LINES
    ---------------------------------------------------------------------------------------------------------------------------
    146 | ERROR | [x] Expected 1 space after ELSEIF keyword; 0 found
    146 | ERROR | [x] Expected 1 space before "=="; 0 found
    199 | ERROR | [x] Expected 1 space after IF keyword; 0 found
    199 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
    204 | ERROR | [x] Expected 1 space after IF keyword; 0 found
    204 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
    ---------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------------------

    Time: 448ms; Memory: 12MB

    Please check.
    Thank You.

  • Status changed to Needs review about 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Ashutosh Ahirwal India

    Providing patch with phpcs issue fixes.

  • Status changed to Needs work 5 months ago
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru

    Thanks for your patch.

    +++ b/colorbox_media_video.info.yml
    @@ -6,4 +6,4 @@ core_version_requirement: ^8.8 || ^9
    +  - colorbox:colorbox
    

    This shoule be drupal/colorbox.

    +++ b/colorbox_media_video.theme.inc
    @@ -9,7 +9,9 @@ use Drupal\Component\Utility\Crypt;
    - * Prepares variables for colorbox_media_remote_video_formatter formatter templates.
    + * Prepares variables for colorbox_media_remote_video_formatter.
    + *
    + * Formatter templates.
    

    Second sentence doesn't make any sense. You can use.

    Prepares variables for colorbox_media_remote_video_formatter templates.

  • Status changed to Needs review 5 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia viren18febS

    H,
    i have changed the the points mentioned in comment.

  • Status changed to Needs work 5 months ago
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru

    Please provide interdiff โ†’ .

    +++ b/colorbox_media_video.info.yml
    @@ -6,4 +6,4 @@ core_version_requirement: ^8.8 || ^9
    +  - drupal/colorbox
    

    My bad, I was wrong. This should be

     - colorbox/colorbox
    

    because colorbox is not part of drupal core.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia kbk1992 Hyderabad

    bharath-kondeti โ†’ made their first commit to this issueโ€™s fork.

  • Merge request !4Fixing phpcs issues. โ†’ (Open) created by Unnamed author
  • Status changed to Needs review 5 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia kbk1992 Hyderabad
Production build 0.69.0 2024