Fix the issues reported by phpcs

Created on 13 April 2023, over 1 year ago
Updated 15 December 2023, 11 months ago

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

FILE: /var/www/html/contribution/web/modules/contrib/ws_event/ws_event.install
----------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
----------------------------------------------------------------------------------------------------------------
5 | ERROR | [x] Function comment short description must start with exactly one space
6 | ERROR | [x] There must be exactly one blank line after the file comment
12 | ERROR | [x] Expected 1 blank line before function; 2 found
73 | WARNING | [x] A comma should follow the last multiline array item. Found: 'inline_block:testimonial_item'
----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/ws_event/assets/css/featured_events.css
--------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
--------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/ws_event/assets/css/events.css
-----------------------------------------------------------------------------------
FOUND 60 ERRORS AFFECTING 48 LINES
-----------------------------------------------------------------------------------
2 | ERROR | [x] Closing brace of class definition must be on new line
3 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
4 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
5 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
5 | ERROR | [x] Closing brace of class definition must be on new line
9 | ERROR | [x] Closing brace of class definition must be on new line
16 | ERROR | [x] Closing brace of class definition must be on new line
17 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
18 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
19 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
19 | ERROR | [x] Closing brace of class definition must be on new line
24 | ERROR | [x] Closing brace of class definition must be on new line
25 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
26 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
27 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
28 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
29 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
29 | ERROR | [x] Closing brace of class definition must be on new line
30 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
31 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
31 | ERROR | [x] Closing brace of class definition must be on new line
32 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
33 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
33 | ERROR | [x] Closing brace of class definition must be on new line
34 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4
35 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
35 | ERROR | [x] Closing brace of class definition must be on new line
36 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
37 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
38 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
38 | ERROR | [x] Closing brace of class definition must be on new line
39 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4
40 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
40 | ERROR | [x] Closing brace of class definition must be on new line
41 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4
42 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
42 | ERROR | [x] Closing brace of class definition must be on new line
43 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
44 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
44 | ERROR | [x] Closing brace of class definition must be on new line
45 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4
46 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
47 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
48 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
49 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
50 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
51 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
52 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
53 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
54 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
55 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
56 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
56 | ERROR | [x] Closing brace of class definition must be on new line
57 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 6
58 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 8
59 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 8
60 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 8
60 | ERROR | [x] Closing brace of class definition must be on new line
63 | ERROR | [x] Closing brace of class definition must be on new line
65 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 60 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/ws_event/assets/css/listing.css
------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/ws_event/assets/css/filters.css
------------------------------------------------------------------------------------
FOUND 11 ERRORS AFFECTING 11 LINES
------------------------------------------------------------------------------------
2 | ERROR | [x] Closing brace of class definition must be on new line
4 | ERROR | [x] Closing brace of class definition must be on new line
9 | ERROR | [x] Closing brace of class definition must be on new line
12 | ERROR | [x] Closing brace of class definition must be on new line
21 | ERROR | [x] Closing brace of class definition must be on new line
32 | ERROR | [x] Closing brace of class definition must be on new line
35 | ERROR | [x] Closing brace of class definition must be on new line
37 | ERROR | [x] Closing brace of class definition must be on new line
44 | ERROR | [x] Closing brace of class definition must be on new line
46 | ERROR | [x] Closing brace of class definition must be on new line
48 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/ws_event/src/Plugin/Block/EventContactsBlock.php
---------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------
37 | ERROR | Parameter $currentRouteMatch is not described in comment
49 | ERROR | Doc comment for parameter $route_provider does not match actual variable name $currentRouteMatch
---------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/ws_event/src/Plugin/Block/EventInfoBlock.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 23 ERRORS AND 2 WARNINGS AFFECTING 23 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
67 | ERROR | [ ] Parameter $eventDataHelper is not described in comment
67 | ERROR | [ ] Parameter $loggerFactory is not described in comment
67 | ERROR | [ ] Parameter $entityTypeManager is not described in comment
81 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 1 spaces
125 | ERROR | [x] Expected newline after closing brace
146 | ERROR | [x] Expected 1 blank line after function; 2 found
150 | ERROR | [x] Doc comment short description must end with a full stop
152 | ERROR | [ ] Description for the @return value is missing
192 | ERROR | [ ] Parameter $address is not described in comment
195 | ERROR | [ ] Missing parameter comment
197 | ERROR | [ ] Description for the @return value is missing
199 | ERROR | [ ] Type hint "\Drupal\node\NodeInterface" missing for $location
200 | ERROR | [x] Expected 1 space after IF keyword; 0 found
214 | ERROR | [ ] Missing parameter comment
216 | ERROR | [ ] Description for the @return value is missing
218 | ERROR | [ ] Type hint "\Drupal\node\NodeInterface" missing for $node
220 | ERROR | [ ] The array declaration extends to column 87 (the limit is 80). The array content should be split up over multiple lines
223 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
258 | ERROR | [ ] Missing parameter comment
260 | ERROR | [ ] Description for the @return value is missing
262 | ERROR | [ ] Type hint "\Drupal\node\NodeInterface" missing for $location
270 | ERROR | [ ] Description for the @return value is missing
272 | ERROR | [x] Expected 1 space before opening brace; found 0
275 | WARNING | [x] A comma should follow the last multiline array item. Found: ''
289 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/ws_event/src/Plugin/Block/EventImage.php
---------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------------
35 | ERROR | [ ] Parameter $currentRouteMatch is not described in comment
47 | ERROR | [ ] Doc comment for parameter $route_provider does not match actual variable name $currentRouteMatch
81 | WARNING | [x] A comma should follow the last multiline array item. Found: false
81 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
82 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/ws_event/ws_event.info.yml
--------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------------------------------------
10 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
11 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
12 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
13 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
--------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/ws_event/ws_event.module
-------------------------------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AND 2 WARNINGS AFFECTING 8 LINES
-------------------------------------------------------------------------------------------------------------------------
49 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
56 | ERROR | [x] Expected 0 spaces after opening parenthesis; 1 found
56 | ERROR | [x] There should be no white space after an opening "("
56 | ERROR | [x] There should be no white space before a closing ")"
56 | ERROR | [x] Expected 0 spaces before closing parenthesis; 1 found
73 | ERROR | [x] Case breaking statements must be followed by a single blank line
90 | ERROR | [x] Expected 1 space before opening brace; found 0
104 | ERROR | [x] Expected 1 space after IF keyword; 0 found
104 | ERROR | [x] There should be no white space before a closing "]"
108 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
197 | ERROR | [ ] Type hint "array" missing for $element
222 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------

📌 Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇮🇳India himanshu_jhaloya Indore

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

Comments & Activities

  • Issue created by @himanshu_jhaloya
  • @himanshu_jhaloya opened merge request.
  • Status changed to Needs review over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Issue was unassigned.
  • Status changed to Needs work over 1 year ago
  • 🇵🇭Philippines paraderojether

    Hi himanshu_jhaloya

    I reviewed MR!21, and there are still remaining phpcs warnings and error shown below.

    FILE: /Users/studenttrainees/Drupal2/drupalsite/docroot/modules/contrib/ws_event/assets/css/featured_events.css
    ---------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------
    1 | WARNING | File appears to be minified and cannot be processed
    ---------------------------------------------------------------------------------------------------------------

    FILE: /Users/studenttrainees/Drupal2/drupalsite/docroot/modules/contrib/ws_event/assets/css/listing.css
    -------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------
    1 | WARNING | File appears to be minified and cannot be processed
    -------------------------------------------------------------------------------------------------------

    FILE: /Users/studenttrainees/Drupal2/drupalsite/docroot/modules/contrib/ws_event/src/Plugin/Block/EventInfoBlock.php
    --------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------
    85 | ERROR | Doc comment for parameter $loggerFactory does not match actual variable name
    --------------------------------------------------------------------------------------------------------------------

    Time: 766ms; Memory: 12MB

    Please check.
    Thank You.

  • Assigned to akshaydalvi212
  • 🇮🇳India akshaydalvi212

    I will remove the remaining errors as per #6.

  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India akshaydalvi212

    Updated the MR and solved the error with doc comment.
    kindly review the MR.

  • Status changed to Closed: outdated 11 months ago
  • 🇺🇸United States froboy Chicago, IL
Production build 0.71.5 2024