- Issue created by @Shanu Chouhan
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 3:04pm 11 May 2023 - Status changed to Closed: outdated
about 1 year ago 12:33pm 29 November 2023
Module's code contains several Drupal Coding Standards issues. This task is created to fix them.
Run the command:
phpcs --standard=Drupal
/web/modules/contrib/alert_message/
Fix the following coding standards issues and upload the patch or create an MR with fixes.
FILE: \modules\contrib\alert_message\js\alert_message_read.js
-----------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
10 | ERROR | [x] Whitespace found at end of line
14 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
25 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
-----------------------------------------------------------------------------------------------------
FILE: \modules\contrib\alert_message\src\AlertMessageInterface.php
-----------------------------------------------------------------------------------------------------
FOUND 43 ERRORS AFFECTING 43 LINES
-----------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
18 | ERROR | [x] Whitespace found at end of line
19 | ERROR | [ ] Description for the @return value is missing
25 | ERROR | [x] Whitespace found at end of line
27 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2 spaces
28 | ERROR | [x] Whitespace found at end of line
35 | ERROR | [x] Whitespace found at end of line
37 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2 spaces
38 | ERROR | [x] Whitespace found at end of line
45 | ERROR | [x] Whitespace found at end of line
47 | ERROR | [x] Return comment indentation must be 3 spaces, found 2 spaces
53 | ERROR | [x] Whitespace found at end of line
55 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2 spaces
56 | ERROR | [x] Whitespace found at end of line
63 | ERROR | [x] Whitespace found at end of line
65 | ERROR | [x] Return comment indentation must be 3 spaces, found 2 spaces
71 | ERROR | [x] Whitespace found at end of line
72 | ERROR | [ ] Missing parameter name
73 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2 spaces
74 | ERROR | [x] Whitespace found at end of line
81 | ERROR | [x] Whitespace found at end of line
83 | ERROR | [x] Return comment indentation must be 3 spaces, found 2 spaces
89 | ERROR | [x] Whitespace found at end of line
91 | ERROR | [x] Return comment indentation must be 3 spaces, found 2 spaces
97 | ERROR | [x] Whitespace found at end of line
99 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2 spaces
100 | ERROR | [x] Whitespace found at end of line
107 | ERROR | [x] Whitespace found at end of line
109 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2 spaces
110 | ERROR | [x] Whitespace found at end of line
112 | ERROR | [x] Return comment indentation must be 3 spaces, found 2 spaces
118 | ERROR | [x] Whitespace found at end of line
120 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2 spaces
121 | ERROR | [x] Whitespace found at end of line
128 | ERROR | [x] Whitespace found at end of line
130 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2 spaces
131 | ERROR | [x] Whitespace found at end of line
133 | ERROR | [x] Return comment indentation must be 3 spaces, found 2 spaces
139 | ERROR | [x] Whitespace found at end of line
141 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2 spaces
142 | ERROR | [x] Whitespace found at end of line
155 | ERROR | [ ] Parameter $to_publish is not described in comment
158 | ERROR | [ ] Doc comment for parameter $status does not match actual variable name $to_publish
-------------------------------------------------------------------------------------------------
FILE: \modules\contrib\alert_message\src\AlertMessageListBuilder.php
-------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
-------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
33 | ERROR | [ ] Parameter $renderer is not described in comment
74 | ERROR | [x] Whitespace found at end of line
90 | ERROR | [x] Whitespace found at end of line
107 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
116 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
122 | ERROR | [x] Whitespace found at end of line
--------------------------------------------------------------------------------------------------
FILE: \modules\contrib\alert_message\src\Entity\AlertMessage.php
--------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
322 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
323 | ERROR | [x] Object operator not indented correctly; expected 8 spaces but found 6
367 | ERROR | [x] Whitespace found at end of line
371 | ERROR | [x] Whitespace found at end of line
--------------------------------------------------------------------------------------------------
FILE: \modules\contrib\alert_message\src\Form\AlertMessageForm.php
--------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
--------------------------------------------------------------------------------------------------
FILE: \modules\contrib\alert_message\src\Form\AlertMessageSettingsForm.php
--------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
--------------------------------------------------------------------------------------------------
FILE: \modules\contrib\alert_message\src\Plugin\Block\AlertMessage.php
--------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
100 | ERROR | [x] Missing function doc comment
--------------------------------------------------------------------------------------------------
FILE: \modules\contrib\alert_message\src\StackMiddleware\AlertMessage.php
--------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 6 LINES
--------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
29 | ERROR | [x] Whitespace found at end of line
37 | ERROR | [ ] Parameter $http_kernel is not described in comment
37 | ERROR | [ ] Parameter $entity_type_manager is not described in comment
40 | ERROR | [ ] Doc comment for parameter $kernel does not match actual variable name $entity_type_manager
56 | ERROR | [x] Whitespace found at end of line
71 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------
Closed: outdated
1.0
Code
It involves compliance with, or the content of coding standards. Requires broad community agreement.