Running phpcs --standard=โDrupal,DrupalPracticeโ --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css,js
returns the following warnings/errors, which should be fixed.
FILE: ...drupal_modules/download_count/includes/download_count.export.inc
----------------------------------------------------------------------
FOUND 32 ERRORS AND 3 WARNINGS AFFECTING 34 LINES
----------------------------------------------------------------------
17 | ERROR | [ ] If the line declaring an array spans longer than
| | 80 characters, each element should be broken
| | into its own line
24 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
25 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
26 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
27 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
27 | ERROR | [ ] String concat is not required here; use a single
| | string instead
28 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
29 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
30 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
31 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
32 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
33 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
34 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
35 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
36 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
37 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
38 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
52 | WARNING | [ ] Avoid backslash escaping in translatable strings
| | when possible, use "" quotes instead
57 | WARNING | [ ] Avoid backslash escaping in translatable strings
| | when possible, use "" quotes instead
82 | ERROR | [x] Expected 1 space after "="; 2 found
88 | WARNING | [ ] Empty return statement not required here
91 | ERROR | [x] Missing function doc comment
98 | ERROR | [ ] If the line declaring an array spans longer than
| | 80 characters, each element should be broken
| | into its own line
122 | ERROR | [ ] String concat is not required here; use a single
| | string instead
123 | ERROR | [ ] String concat is not required here; use a single
| | string instead
124 | ERROR | [ ] String concat is not required here; use a single
| | string instead
125 | ERROR | [ ] String concat is not required here; use a single
| | string instead
126 | ERROR | [ ] String concat is not required here; use a single
| | string instead
127 | ERROR | [ ] String concat is not required here; use a single
| | string instead
128 | ERROR | [ ] String concat is not required here; use a single
| | string instead
129 | ERROR | [ ] String concat is not required here; use a single
| | string instead
130 | ERROR | [ ] String concat is not required here; use a single
| | string instead
131 | ERROR | [ ] String concat is not required here; use a single
| | string instead
132 | ERROR | [ ] String concat is not required here; use a single
| | string instead
138 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 18 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...modules/download_count/includes/download_count.views_default.inc
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
14 | ERROR | [x] Calling class constructors must always include
| | parentheses
470 | ERROR | [x] Calling class constructors must always include
| | parentheses
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...upal_modules/download_count/includes/download_count.settings.inc
----------------------------------------------------------------------
FOUND 7 ERRORS AND 1 WARNING AFFECTING 8 LINES
----------------------------------------------------------------------
11 | ERROR | [ ] Return type missing for @return tag in function
| | comment
12 | ERROR | [x] Return comment indentation must be 3 spaces,
| | found 1 spaces
26 | WARNING | [ ] Avoid backslash escaping in translatable strings
| | when possible, use "" quotes instead
71 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
72 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
73 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
74 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
75 | ERROR | [x] Array closing indentation error, expected 2
| | spaces but found 4
----------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: .../drupal_modules/download_count/includes/download_count.drush.inc
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
49 | ERROR | [x] Expected 1 space before "=="; 2 found
53 | ERROR | [x] Expected 1 space before "=="; 2 found
88 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: .../drupal_modules/download_count/includes/download_count.views.inc
----------------------------------------------------------------------
FOUND 27 ERRORS AND 1 WARNING AFFECTING 18 LINES
----------------------------------------------------------------------
13 | ERROR | [x] Inline comments must start with a capital letter
13 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, question marks, or
| | closing parentheses
21 | ERROR | [x] Inline comments must start with a capital letter
21 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, question marks, or
| | closing parentheses
23 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
24 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
27 | WARNING | [x] There must be no blank line following an inline
| | comment
27 | ERROR | [x] Inline comments must start with a capital letter
27 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, question marks, or
| | closing parentheses
29 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, question marks, or
| | closing parentheses
48 | ERROR | [x] Inline comments must start with a capital letter
48 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, question marks, or
| | closing parentheses
60 | ERROR | [x] Inline comments must start with a capital letter
60 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, question marks, or
| | closing parentheses
72 | ERROR | [x] Inline comments must start with a capital letter
91 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 4
91 | ERROR | [x] Inline comments must start with a capital letter
110 | ERROR | [x] Inline comments must start with a capital letter
110 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, question marks, or
| | closing parentheses
126 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, question marks, or
| | closing parentheses
145 | ERROR | [x] Inline comments must start with a capital letter
145 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, question marks, or
| | closing parentheses
162 | ERROR | [x] Expected 1 blank line after function; 2 found
165 | ERROR | [x] Missing function doc comment
166 | ERROR | [x] Inline comments must start with a capital letter
166 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, question marks, or
| | closing parentheses
168 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
169 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
----------------------------------------------------------------------
PHPCBF CAN FIX THE 28 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: .../drupal_modules/download_count/includes/download_count.pages.inc
----------------------------------------------------------------------
FOUND 34 ERRORS AND 2 WARNINGS AFFECTING 28 LINES
----------------------------------------------------------------------
109 | ERROR | [x] Array indentation error, expected 6 spaces but
| | found 8
110 | ERROR | [x] Array indentation error, expected 6 spaces but
| | found 8
111 | ERROR | [x] Array closing indentation error, expected 4
| | spaces but found 6
111 | ERROR | [x] Closing parenthesis of array declaration must be
| | on a new line
117 | ERROR | [x] Array indentation error, expected 6 spaces but
| | found 8
117 | WARNING | [ ] Do not concatenate strings to translatable
| | strings, they should be part of the t() argument
| | and you should use placeholders
118 | ERROR | [x] Array indentation error, expected 6 spaces but
| | found 8
119 | ERROR | [x] Array indentation error, expected 6 spaces but
| | found 8
120 | ERROR | [x] Array indentation error, expected 6 spaces but
| | found 8
121 | ERROR | [x] Array indentation error, expected 6 spaces but
| | found 8
131 | ERROR | [ ] If the line declaring an array spans longer than
| | 80 characters, each element should be broken
| | into its own line
172 | ERROR | [ ] If the line declaring an array spans longer than
| | 80 characters, each element should be broken
| | into its own line
225 | ERROR | [ ] If the line declaring an array spans longer than
| | 80 characters, each element should be broken
| | into its own line
226 | ERROR | [ ] If the line declaring an array spans longer than
| | 80 characters, each element should be broken
| | into its own line
229 | ERROR | [ ] If the line declaring an array spans longer than
| | 80 characters, each element should be broken
| | into its own line
230 | ERROR | [ ] If the line declaring an array spans longer than
| | 80 characters, each element should be broken
| | into its own line
246 | ERROR | [x] Expected 1 space after "="; 2 found
249 | ERROR | [ ] If the line declaring an array spans longer than
| | 80 characters, each element should be broken
| | into its own line
250 | ERROR | [ ] If the line declaring an array spans longer than
| | 80 characters, each element should be broken
| | into its own line
252 | ERROR | [x] Functions must not contain multiple empty lines
| | in a row; found 2 empty lines
263 | ERROR | [x] Inline comments must start with a capital letter
273 | ERROR | [x] No space found before comment text; expected "//
| | base query for all files for all intervals" but
| | found "//base query for all files for all
| | intervals"
273 | ERROR | [x] Inline comments must start with a capital letter
273 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, question marks, or
| | closing parentheses
288 | ERROR | [x] Inline comments must start with a capital letter
288 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, question marks, or
| | closing parentheses
292 | ERROR | [x] Expected 1 space after "="; 2 found
298 | ERROR | [x] Functions must not contain multiple empty lines
| | in a row; found 2 empty lines
300 | ERROR | [x] Inline comments must start with a capital letter
300 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, question marks, or
| | closing parentheses
311 | ERROR | [x] Inline comments must start with a capital letter
311 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, question marks, or
| | closing parentheses
322 | ERROR | [x] Inline comments must start with a capital letter
322 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, question marks, or
| | closing parentheses
360 | WARNING | [ ] Only string literals should be passed to t()
| | where possible
380 | ERROR | [ ] If the line declaring an array spans longer than
| | 80 characters, each element should be broken
| | into its own line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 25 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: .../drupal_modules/download_count/includes/download_count.field.inc
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
31 | ERROR | [ ] If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
44 | ERROR | [ ] Doc comment short description must be on a single
| | line, further text should be a separate paragraph
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: .../projects/drupal_modules/download_count/download_count.rules.inc
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
26 | ERROR | [x] Array indentation error, expected 8 spaces but
| | found 7
29 | ERROR | [x] Array closing indentation error, expected 7 spaces
| | but found 8
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...ay/projects/drupal_modules/download_count/download_count.install
----------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------
86 | ERROR | [ ] Do not use t() in hook_schema(), this will only
| | generate overhead for translators
107 | ERROR | [ ] Do not use t() in hook_schema(), this will only
| | generate overhead for translators
114 | ERROR | [ ] Do not use t() in hook_schema(), this will only
| | generate overhead for translators
157 | ERROR | [x] Expected 1 blank line after function; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...way/projects/drupal_modules/download_count/download_count.module
----------------------------------------------------------------------
FOUND 23 ERRORS AND 2 WARNINGS AFFECTING 19 LINES
----------------------------------------------------------------------
5 | WARNING | [ ] Line exceeds 80 characters; contains 128
| | characters
31 | WARNING | [ ] Avoid backslash escaping in translatable strings
| | when possible, use "" quotes instead
150 | ERROR | [x] Expected 1 space after "="; 2 found
152 | ERROR | [x] No space found before comment text; expected "//
| | if role should be skipped, return." but found
| | "//if role should be skipped, return."
152 | ERROR | [x] Inline comments must start with a capital letter
157 | ERROR | [x] No space found before comment text; expected "//
| | if no access, simply return." but found "//if no
| | access, simply return."
157 | ERROR | [x] Inline comments must start with a capital letter
162 | ERROR | [x] No space found before comment text; expected "//
| | check flood control" but found "//check flood
| | control"
162 | ERROR | [x] Inline comments must start with a capital letter
162 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, question marks, or
| | closing parentheses
171 | ERROR | [x] No space found before comment text; expected "//
| | validate file has extension that should be
| | counted, if not return." but found "//validate
| | file has extension that should be counted, if
| | not return."
171 | ERROR | [x] Inline comments must start with a capital letter
187 | ERROR | [x] Line indented incorrectly; expected 4 spaces,
| | found 2
196 | ERROR | [x] Line indented incorrectly; expected 4 spaces,
| | found 2
198 | ERROR | [ ] If the line declaring an array spans longer than
| | 80 characters, each element should be broken
| | into its own line
234 | ERROR | [x] Expected 1 space after comma in function call; 2
| | found
234 | ERROR | [x] Expected one space after the comma, 2 found
242 | ERROR | [ ] Missing parameter type
247 | ERROR | [ ] If the line declaring an array spans longer than
| | 80 characters, each element should be broken
| | into its own line
249 | ERROR | [x] Array indentation error, expected 6 spaces but
| | found 8
250 | ERROR | [x] Array closing indentation error, expected 4
| | spaces but found 6
339 | ERROR | [ ] If the line declaring an array spans longer than
| | 80 characters, each element should be broken
| | into its own line
347 | ERROR | [x] Expected 1 space before "="; 0 found
349 | ERROR | [x] Array indentation error, expected 6 spaces but
| | found 4
350 | ERROR | [x] Array indentation error, expected 6 spaces but
| | found 4
----------------------------------------------------------------------
PHPCBF CAN FIX THE 19 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Time: 517ms; Memory: 18Mb