Problem/Motivation
FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\dl_file\src\Commands\DlFileCommands.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 161 ERRORS AND 1 WARNING AFFECTING 85 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
19 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 5
19 | ERROR | [ ] Missing short description in doc comment
19 | ERROR | [ ] Parameter $options is not described in comment
20 | ERROR | [x] Expected 6 space(s) before asterisk; 5 found
20 | ERROR | [x] Expected "string" but found "String" for parameter type
21 | ERROR | [x] Expected 6 space(s) before asterisk; 5 found
22 | ERROR | [x] Doc comment star missing
23 | ERROR | [x] Expected 6 space(s) before asterisk; 5 found
24 | ERROR | [x] Expected 6 space(s) before asterisk; 5 found
25 | ERROR | [x] Doc comment star missing
26 | ERROR | [x] Expected 6 space(s) before asterisk; 5 found
27 | ERROR | [x] Expected 6 space(s) before asterisk; 5 found
28 | ERROR | [x] Doc comment star missing
29 | ERROR | [x] Expected 6 space(s) before asterisk; 5 found
30 | ERROR | [x] Expected 6 space(s) before asterisk; 5 found
31 | ERROR | [x] Doc comment star missing
32 | ERROR | [x] Expected 6 space(s) before asterisk; 5 found
33 | ERROR | [x] Expected 6 space(s) before asterisk; 5 found
34 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
34 | ERROR | [x] Expected 1 blank line before function; 0 found
34 | ERROR | [x] Expected 0 spaces before opening parenthesis; 1 found
34 | ERROR | [ ] The array declaration extends to column 136 (the limit is 80). The array content should be split up over multiple lines
34 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
34 | ERROR | [x] Expected 1 space between comma and "'info'"; 0 found
34 | ERROR | [x] Expected one space after the comma, 0 found
34 | ERROR | [x] Expected 1 space between double arrow and "false"; 0 found
34 | ERROR | [x] Expected 1 space after "=>"; 0 found
34 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
34 | ERROR | [x] There should be no white space before a closing ")"
34 | ERROR | [x] Expected 0 spaces before closing parenthesis; 1 found
35 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
35 | ERROR | [x] Expected 1 space after IF keyword; 0 found
36 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
37 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
37 | ERROR | [x] Concat operator must be surrounded by a single space
38 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
38 | ERROR | [x] Expected 1 space after IF keyword; 0 found
39 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
39 | ERROR | [x] Concat operator must be surrounded by a single space
39 | ERROR | [x] Concat operator must be surrounded by a single space
40 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
41 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
41 | ERROR | [x] Concat operator must be surrounded by a single space
41 | ERROR | [x] Concat operator must be surrounded by a single space
42 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
43 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
44 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
44 | ERROR | [x] Inline comments must start with a capital letter
45 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
45 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
46 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
47 | ERROR | [x] Object operator not indented correctly; expected 18 spaces but found 20
51 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
51 | ERROR | [x] Inline comments must start with a capital letter
52 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
53 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
54 | ERROR | [x] Concat operator must be surrounded by a single space
54 | ERROR | [x] Concat operator must be surrounded by a single space
56 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 16
56 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
57 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 20
59 | ERROR | [x] Concat operator must be surrounded by a single space
59 | ERROR | [x] Concat operator must be surrounded by a single space
59 | ERROR | [x] Concat operator must be surrounded by a single space
59 | ERROR | [x] Concat operator must be surrounded by a single space
61 | ERROR | [x] Line indented incorrectly; expected -10 spaces, found 20
61 | ERROR | [x] Short array syntax must be used to define arrays
62 | ERROR | [x] Line indented incorrectly; expected -10 spaces, found 20
62 | ERROR | [x] Expected 1 space before "="; 0 found
62 | ERROR | [x] Expected 1 space after "="; 0 found
63 | ERROR | [x] Line indented incorrectly; expected -10 spaces, found 20
64 | ERROR | [x] Line indented incorrectly; expected -8 spaces, found 24
65 | ERROR | [x] Line indented incorrectly; expected -10 spaces, found 20
65 | ERROR | [x] Expected newline after closing brace
66 | ERROR | [x] Line indented incorrectly; expected -8 spaces, found 24
67 | ERROR | [x] Line indented incorrectly; expected -10 spaces, found 20
68 | ERROR | [x] Line indented incorrectly; expected -10 spaces, found 20
68 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
69 | ERROR | [x] Line indented incorrectly; expected -8 spaces, found 24
70 | ERROR | [x] Line indented incorrectly; expected -8 spaces, found 24
71 | ERROR | [x] Line indented incorrectly; expected -8 spaces, found 24
72 | ERROR | [x] Line indented incorrectly; expected -8 spaces, found 24
73 | ERROR | [x] Line indented incorrectly; expected -8 spaces, found 24
74 | ERROR | [x] Line indented incorrectly; expected -8 spaces, found 24
75 | ERROR | [x] Line indented incorrectly; expected -8 spaces, found 24
75 | ERROR | [x] Concat operator must be surrounded by a single space
75 | ERROR | [x] Concat operator must be surrounded by a single space
75 | ERROR | [x] Concat operator must be surrounded by a single space
75 | ERROR | [x] Concat operator must be surrounded by a single space
75 | ERROR | [x] Concat operator must be surrounded by a single space
76 | ERROR | [x] Line indented incorrectly; expected -8 spaces, found 24
76 | ERROR | [x] Concat operator must be surrounded by a single space
76 | ERROR | [x] Concat operator must be surrounded by a single space
76 | ERROR | [x] Concat operator must be surrounded by a single space
76 | ERROR | [x] Concat operator must be surrounded by a single space
76 | ERROR | [x] Concat operator must be surrounded by a single space
77 | ERROR | [x] Line indented incorrectly; expected -8 spaces, found 24
77 | ERROR | [x] Concat operator must be surrounded by a single space
77 | ERROR | [x] Concat operator must be surrounded by a single space
77 | ERROR | [x] Concat operator must be surrounded by a single space
77 | ERROR | [x] Concat operator must be surrounded by a single space
78 | ERROR | [x] Line indented incorrectly; expected -8 spaces, found 24
79 | ERROR | [x] Line indented incorrectly; expected -8 spaces, found 24
79 | ERROR | [x] Concat operator must be surrounded by a single space
79 | ERROR | [x] Concat operator must be surrounded by a single space
79 | ERROR | [x] Concat operator must be surrounded by a single space
79 | ERROR | [x] Concat operator must be surrounded by a single space
80 | ERROR | [x] Line indented incorrectly; expected -8 spaces, found 24
81 | ERROR | [x] Line indented incorrectly; expected -8 spaces, found 24
81 | ERROR | [x] Concat operator must be surrounded by a single space
81 | ERROR | [x] Concat operator must be surrounded by a single space
81 | ERROR | [x] Concat operator must be surrounded by a single space
81 | ERROR | [x] Concat operator must be surrounded by a single space
81 | ERROR | [x] Concat operator must be surrounded by a single space
81 | ERROR | [x] Concat operator must be surrounded by a single space
82 | ERROR | [x] Line indented incorrectly; expected -8 spaces, found 24
83 | ERROR | [x] Line indented incorrectly; expected -8 spaces, found 24
83 | ERROR | [x] Concat operator must be surrounded by a single space
83 | ERROR | [x] Concat operator must be surrounded by a single space
84 | ERROR | [x] Line indented incorrectly; expected -8 spaces, found 24
85 | ERROR | [x] Line indented incorrectly; expected -10 spaces, found 20
86 | ERROR | [x] Line indented incorrectly; expected -10 spaces, found 20
86 | ERROR | [x] Concat operator must be surrounded by a single space
86 | ERROR | [x] Concat operator must be surrounded by a single space
87 | ERROR | [x] Line indented incorrectly; expected -10 spaces, found 20
88 | ERROR | [x] Line indented incorrectly; expected -10 spaces, found 20
89 | ERROR | [x] Line indented incorrectly; expected -10 spaces, found 20
91 | ERROR | [x] Line indented incorrectly; expected -10 spaces, found 20
91 | ERROR | [x] Expected 1 space after FOR keyword; 0 found
91 | ERROR | [x] Expected 1 space after first semicolon of FOR loop; 0 found
91 | ERROR | [x] Expected 1 space before "<"; 0 found
91 | ERROR | [x] Expected 1 space after "<"; 0 found
91 | ERROR | [x] Expected 1 space after second semicolon of FOR loop; 0 found
91 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
92 | ERROR | [x] Line indented incorrectly; expected -8 spaces, found 24
93 | ERROR | [x] Line indented incorrectly; expected -8 spaces, found 24
94 | ERROR | [x] Line indented incorrectly; expected -8 spaces, found 24
95 | ERROR | [x] Line indented incorrectly; expected -10 spaces, found 20
96 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 16
96 | ERROR | [x] Expected newline after closing brace
97 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 20
98 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 16
99 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
99 | ERROR | [x] Expected newline after closing brace
100 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
101 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
102 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
103 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
103 | ERROR | [x] Expected newline after closing brace
104 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
105 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
105 | ERROR | [x] Expected newline after closing brace
106 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
106 | ERROR | [x] Concat operator must be surrounded by a single space
106 | ERROR | [x] Concat operator must be surrounded by a single space
107 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
108 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
108 | ERROR | [x] Expected 1 blank line after function; 0 found
109 | ERROR | [x] The closing brace for the class must have an empty line before it
109 | ERROR | [ ] Closing class brace must be on a line by itself
109 | ERROR | [x] Whitespace found at end of line
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 157 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------
Time: 9.98 secs; Memory: 10MB
Steps to reproduce
Run following command
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml dl_file/