Problem/Motivation
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/omnisend/omnisend.links.menu.yml
---------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------
20 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/omnisend/omnisend.module
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 34 ERRORS AND 1 WARNING AFFECTING 23 LINES
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
12 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
13 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
14 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
15 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
16 | ERROR | [x] Case breaking statements must be followed by a single blank line
16 | ERROR | [x] Case breaking statement indented incorrectly; expected 6 spaces, found 4
17 | WARNING | [ ] Code after the RETURN statement on line 16 cannot be executed
24 | ERROR | [x] Expected 1 space(s) before asterisk; 0 found
24 | ERROR | [x] Doc comment short description must end with a full stop
25 | ERROR | [x] Expected 1 space(s) before asterisk; 0 found
25 | ERROR | [x] There must be exactly one blank line before the tags in a doc comment
25 | ERROR | [ ] Missing parameter type
25 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
25 | ERROR | [x] Parameter comment must be on the next line
26 | ERROR | [x] Expected 1 space(s) before asterisk; 0 found
26 | ERROR | [ ] Missing parameter type
26 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
26 | ERROR | [x] Parameter comment must be on the next line
27 | ERROR | [x] Expected 1 space(s) before asterisk; 0 found
27 | ERROR | [x] Separate the @param and @return sections by a blank line.
27 | ERROR | [ ] Return type missing for @return tag in function comment
27 | ERROR | [ ] Description for the @return value is missing
28 | ERROR | [x] Expected 1 space(s) before asterisk; 0 found
29 | ERROR | [ ] All functions defined in a module file must be prefixed with the module's name, found "log_omnisend_messages" but expected "omnisend_log_omnisend_messages"
30 | ERROR | [x] Opening brace should be on the same line as the declaration
33 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
34 | ERROR | [x] Case breaking statement indented incorrectly; expected 6 spaces, found 4
37 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
38 | ERROR | [x] Case breaking statement indented incorrectly; expected 6 spaces, found 4
41 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
42 | ERROR | [x] Case breaking statement indented incorrectly; expected 6 spaces, found 4
45 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
46 | ERROR | [x] Case breaking statement indented incorrectly; expected 6 spaces, found 4
48 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 29 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/omnisend/omnisend.routing.yml
------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------
23 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/omnisend/README.md
-------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 8 WARNINGS AFFECTING 8 LINES
-------------------------------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 249 characters
13 | WARNING | Line exceeds 80 characters; contains 156 characters
24 | WARNING | Line exceeds 80 characters; contains 147 characters
26 | WARNING | Line exceeds 80 characters; contains 159 characters
28 | WARNING | Line exceeds 80 characters; contains 218 characters
30 | WARNING | Line exceeds 80 characters; contains 155 characters
32 | WARNING | Line exceeds 80 characters; contains 156 characters
34 | WARNING | Line exceeds 80 characters; contains 234 characters
-------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/omnisend/omnisend.info.yml
---------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------
8 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/omnisend/omnisend.links.task.yml
---------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------
11 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/omnisend/src/Form/SettingsForm.php
-----------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------
28 | WARNING | [x] A comma should follow the last multiline array item. Found: TRUE
53 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
53 | ERROR | [x] Object operator not indented correctly; expected 6 spaces but found 4
54 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/omnisend/src/Form/OmnisendCampaigns.php
----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
55 | WARNING | [ ] Unused private method convertToRate()
----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/omnisend/src/Form/OmnisendDashboard.php
-------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormBase.
-------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/omnisend/src/Plugin/WebformHandler/OmnisendFormHandler.php
-----------------------------------------------------------------------------------------------------------------------------------
FOUND 9 ERRORS AND 3 WARNINGS AFFECTING 6 LINES
-----------------------------------------------------------------------------------------------------------------------------------
78 | WARNING | [ ] Unused variable $response.
78 | ERROR | [x] Expected 1 space before "="; 0 found
78 | ERROR | [x] Expected 1 space after "="; 0 found
78 | ERROR | [x] Expected 1 space before "="; 0 found
78 | ERROR | [x] Expected 1 space after "="; 0 found
160 | WARNING | [ ] Avoid backslash escaping in translatable strings when possible, use "" quotes instead
256 | ERROR | [x] Expected 1 space before "??"; 0 found
256 | ERROR | [x] Expected 1 space after "??"; 0 found
256 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
323 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 3 empty lines
325 | ERROR | [ ] More than 2 empty lines are not allowed
326 | WARNING | [ ] Unused variable $response.
-----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/omnisend/src/OmnisendApi.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 153 ERRORS AND 17 WARNINGS AFFECTING 128 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
7 | WARNING | [x] Unused use statement
10 | WARNING | [x] Unused use statement
16 | ERROR | [x] Opening brace should be on the same line as the declaration
17 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
22 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
24 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
29 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
30 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
30 | ERROR | [ ] Class property $api_key should use lowerCamel naming without underscores
30 | ERROR | [ ] Missing member variable doc comment
33 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
39 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
39 | ERROR | [x] Expected 1 blank line before function; 2 found
40 | ERROR | [x] Opening brace should be on the same line as the declaration
41 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
42 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
44 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
44 | ERROR | [x] Expected 1 space before "??"; 0 found
44 | ERROR | [x] Expected 1 space after "??"; 0 found
45 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
47 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
57 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
58 | ERROR | [x] Opening brace should be on the same line as the declaration
59 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
60 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
61 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
61 | ERROR | [x] Concat operator must be surrounded by a single space
62 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
63 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
66 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
66 | ERROR | [x] Short array syntax must be used to define arrays
68 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
70 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
71 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
72 | ERROR | [x] Array indentation error, expected 14 spaces but found 16
75 | WARNING | [ ] Unused variable $statusCode.
75 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 12
76 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 12
78 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 12
78 | ERROR | [x] Expected 1 space after "="; 2 found
79 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
81 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 12
81 | ERROR | [x] Expected 1 space after IF keyword; 0 found
82 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 16
83 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 12
85 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
85 | ERROR | [x] Expected newline after closing brace
86 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
87 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
89 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
90 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
92 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
102 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
103 | ERROR | [x] Opening brace should be on the same line as the declaration
105 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
106 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
107 | ERROR | [x] Array indentation error, expected 10 spaces but found 9
108 | ERROR | [x] Array indentation error, expected 10 spaces but found 9
109 | ERROR | [x] Array closing indentation error, expected 8 spaces but found 5
111 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 5
111 | ERROR | [x] Short array syntax must be used to define arrays
113 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 5
115 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
116 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
117 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
120 | WARNING | [ ] Unused variable $statusCode.
120 | ERROR | [x] Line indented incorrectly; expected 5 spaces, found 8
121 | ERROR | [x] Line indented incorrectly; expected 5 spaces, found 8
123 | ERROR | [x] Line indented incorrectly; expected 5 spaces, found 8
123 | ERROR | [x] Expected 1 space after "="; 2 found
125 | ERROR | [x] Line indented incorrectly; expected 5 spaces, found 8
125 | ERROR | [x] Expected 1 space after IF keyword; 0 found
126 | ERROR | [x] Line indented incorrectly; expected 7 spaces, found 12
127 | ERROR | [x] Line indented incorrectly; expected 5 spaces, found 8
129 | ERROR | [x] Closing brace indented incorrectly; expected 5 spaces, found 4
129 | ERROR | [x] Expected newline after closing brace
135 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
135 | ERROR | [x] Closing brace indented incorrectly; expected 4 spaces, found 0
137 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 7
138 | ERROR | [x] Expected 8 space(s) before asterisk; 9 found
138 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
139 | ERROR | [x] Expected 8 space(s) before asterisk; 9 found
140 | ERROR | [x] Expected 8 space(s) before asterisk; 9 found
141 | ERROR | [x] Expected 8 space(s) before asterisk; 9 found
142 | ERROR | [x] Expected 8 space(s) before asterisk; 9 found
143 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 7
144 | ERROR | [x] Opening brace should be on the same line as the declaration
145 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 9
145 | ERROR | [x] Expected 1 space before "??"; 0 found
145 | ERROR | [x] Expected 1 space after "??"; 0 found
146 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 9
146 | ERROR | [x] Expected 1 space after IF keyword; 0 found
147 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
148 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
151 | WARNING | [x] A comma should follow the last multiline array item. Found: 'application/json'
154 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
155 | ERROR | [x] Array indentation error, expected 15 spaces but found 17
160 | WARNING | [x] A comma should follow the last multiline array item. Found: 'subscribed'
161 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
163 | WARNING | [x] A comma should follow the last multiline array item. Found: $email
164 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
168 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
168 | ERROR | [x] Expected 1 space after IF keyword; 0 found
169 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 17
171 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
172 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
172 | ERROR | [x] Expected 1 space after IF keyword; 0 found
173 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 17
175 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
176 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
176 | ERROR | [x] Expected 1 space after IF keyword; 0 found
177 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 17
179 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
180 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
180 | ERROR | [x] Expected 1 space after IF keyword; 0 found
181 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 17
183 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
184 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
184 | ERROR | [x] Expected 1 space after IF keyword; 0 found
185 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 17
187 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
188 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
188 | ERROR | [x] Expected 1 space after IF keyword; 0 found
189 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 17
191 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
192 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
192 | ERROR | [x] Expected 1 space after IF keyword; 0 found
193 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 17
195 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
196 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
196 | ERROR | [x] Expected 1 space after IF keyword; 0 found
197 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 17
199 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
200 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
200 | ERROR | [x] Expected 1 space after IF keyword; 0 found
201 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 17
203 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
204 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
204 | ERROR | [x] Expected 1 space after IF keyword; 0 found
205 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 17
207 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
208 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
208 | ERROR | [x] Expected 1 space after IF keyword; 0 found
209 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 17
211 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
213 | WARNING | [ ] Unused variable $request_body.
213 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
214 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
216 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 17
217 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 17
219 | WARNING | [x] A comma should follow the last multiline array item. Found: $data
222 | WARNING | [ ] Unused variable $statusCode.
222 | ERROR | [x] Line indented incorrectly; expected 1 spaces, found 17
223 | WARNING | [ ] Unused variable $responseBody.
223 | ERROR | [x] Line indented incorrectly; expected 1 spaces, found 17
225 | ERROR | [x] Line indented incorrectly; expected 1 spaces, found 17
225 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
225 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
225 | ERROR | [ ] Concatenating translatable strings is not allowed, use placeholders instead and only one string literal
225 | ERROR | [x] Concat operator must be surrounded by a single space
227 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
227 | ERROR | [x] Expected newline after closing brace
229 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 17
230 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 13
231 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 9
232 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 5
232 | ERROR | [x] Closing brace indented incorrectly; expected 7 spaces, found 5
234 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
234 | ERROR | [x] Closing brace indented incorrectly; expected 0 spaces, found 1
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 159 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------
Steps to reproduce
Use the below command with arguments.
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml web/modules/custom/omnisend
Proposed resolution
Fix the phpcs related issue.