@@ -15,77 +15,77 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @param string $testFile The name of the file being tested. |
|
25 | - * |
|
26 | - * @return array<int, int> |
|
27 | - */ |
|
28 | - public function getErrorList($testFile='') |
|
29 | - { |
|
30 | - switch ($testFile) { |
|
31 | - case 'SpaceAfterNotUnitTest.inc': |
|
32 | - return [ |
|
33 | - 3 => 2, |
|
34 | - 4 => 2, |
|
35 | - 5 => 2, |
|
36 | - 6 => 1, |
|
37 | - 7 => 1, |
|
38 | - 8 => 1, |
|
39 | - 11 => 1, |
|
40 | - 14 => 1, |
|
41 | - 17 => 1, |
|
42 | - 20 => 1, |
|
43 | - 28 => 1, |
|
44 | - 38 => 2, |
|
45 | - 39 => 2, |
|
46 | - 40 => 1, |
|
47 | - 41 => 1, |
|
48 | - 42 => 1, |
|
49 | - 48 => 1, |
|
50 | - 51 => 1, |
|
51 | - 56 => 2, |
|
52 | - 57 => 1, |
|
53 | - 58 => 1, |
|
54 | - 59 => 1, |
|
55 | - 62 => 1, |
|
56 | - 65 => 1, |
|
57 | - 68 => 1, |
|
58 | - 71 => 1, |
|
59 | - 79 => 1, |
|
60 | - ]; |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @param string $testFile The name of the file being tested. |
|
25 | + * |
|
26 | + * @return array<int, int> |
|
27 | + */ |
|
28 | + public function getErrorList($testFile='') |
|
29 | + { |
|
30 | + switch ($testFile) { |
|
31 | + case 'SpaceAfterNotUnitTest.inc': |
|
32 | + return [ |
|
33 | + 3 => 2, |
|
34 | + 4 => 2, |
|
35 | + 5 => 2, |
|
36 | + 6 => 1, |
|
37 | + 7 => 1, |
|
38 | + 8 => 1, |
|
39 | + 11 => 1, |
|
40 | + 14 => 1, |
|
41 | + 17 => 1, |
|
42 | + 20 => 1, |
|
43 | + 28 => 1, |
|
44 | + 38 => 2, |
|
45 | + 39 => 2, |
|
46 | + 40 => 1, |
|
47 | + 41 => 1, |
|
48 | + 42 => 1, |
|
49 | + 48 => 1, |
|
50 | + 51 => 1, |
|
51 | + 56 => 2, |
|
52 | + 57 => 1, |
|
53 | + 58 => 1, |
|
54 | + 59 => 1, |
|
55 | + 62 => 1, |
|
56 | + 65 => 1, |
|
57 | + 68 => 1, |
|
58 | + 71 => 1, |
|
59 | + 79 => 1, |
|
60 | + ]; |
|
61 | 61 | |
62 | - case 'SpaceAfterNotUnitTest.js': |
|
63 | - return [ |
|
64 | - 2 => 2, |
|
65 | - 4 => 2, |
|
66 | - 5 => 1, |
|
67 | - ]; |
|
62 | + case 'SpaceAfterNotUnitTest.js': |
|
63 | + return [ |
|
64 | + 2 => 2, |
|
65 | + 4 => 2, |
|
66 | + 5 => 1, |
|
67 | + ]; |
|
68 | 68 | |
69 | - default: |
|
70 | - return []; |
|
71 | - }//end switch |
|
69 | + default: |
|
70 | + return []; |
|
71 | + }//end switch |
|
72 | 72 | |
73 | - }//end getErrorList() |
|
73 | + }//end getErrorList() |
|
74 | 74 | |
75 | 75 | |
76 | - /** |
|
77 | - * Returns the lines where warnings should occur. |
|
78 | - * |
|
79 | - * The key of the array should represent the line number and the value |
|
80 | - * should represent the number of warnings that should occur on that line. |
|
81 | - * |
|
82 | - * @return array<int, int> |
|
83 | - */ |
|
84 | - public function getWarningList() |
|
85 | - { |
|
86 | - return []; |
|
76 | + /** |
|
77 | + * Returns the lines where warnings should occur. |
|
78 | + * |
|
79 | + * The key of the array should represent the line number and the value |
|
80 | + * should represent the number of warnings that should occur on that line. |
|
81 | + * |
|
82 | + * @return array<int, int> |
|
83 | + */ |
|
84 | + public function getWarningList() |
|
85 | + { |
|
86 | + return []; |
|
87 | 87 | |
88 | - }//end getWarningList() |
|
88 | + }//end getWarningList() |
|
89 | 89 | |
90 | 90 | |
91 | 91 | }//end class |
@@ -28,46 +28,46 @@ |
||
28 | 28 | public function getErrorList($testFile='') |
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | - case 'SpaceAfterNotUnitTest.inc': |
|
32 | - return [ |
|
33 | - 3 => 2, |
|
34 | - 4 => 2, |
|
35 | - 5 => 2, |
|
36 | - 6 => 1, |
|
37 | - 7 => 1, |
|
38 | - 8 => 1, |
|
39 | - 11 => 1, |
|
40 | - 14 => 1, |
|
41 | - 17 => 1, |
|
42 | - 20 => 1, |
|
43 | - 28 => 1, |
|
44 | - 38 => 2, |
|
45 | - 39 => 2, |
|
46 | - 40 => 1, |
|
47 | - 41 => 1, |
|
48 | - 42 => 1, |
|
49 | - 48 => 1, |
|
50 | - 51 => 1, |
|
51 | - 56 => 2, |
|
52 | - 57 => 1, |
|
53 | - 58 => 1, |
|
54 | - 59 => 1, |
|
55 | - 62 => 1, |
|
56 | - 65 => 1, |
|
57 | - 68 => 1, |
|
58 | - 71 => 1, |
|
59 | - 79 => 1, |
|
60 | - ]; |
|
31 | + case 'SpaceAfterNotUnitTest.inc': |
|
32 | + return [ |
|
33 | + 3 => 2, |
|
34 | + 4 => 2, |
|
35 | + 5 => 2, |
|
36 | + 6 => 1, |
|
37 | + 7 => 1, |
|
38 | + 8 => 1, |
|
39 | + 11 => 1, |
|
40 | + 14 => 1, |
|
41 | + 17 => 1, |
|
42 | + 20 => 1, |
|
43 | + 28 => 1, |
|
44 | + 38 => 2, |
|
45 | + 39 => 2, |
|
46 | + 40 => 1, |
|
47 | + 41 => 1, |
|
48 | + 42 => 1, |
|
49 | + 48 => 1, |
|
50 | + 51 => 1, |
|
51 | + 56 => 2, |
|
52 | + 57 => 1, |
|
53 | + 58 => 1, |
|
54 | + 59 => 1, |
|
55 | + 62 => 1, |
|
56 | + 65 => 1, |
|
57 | + 68 => 1, |
|
58 | + 71 => 1, |
|
59 | + 79 => 1, |
|
60 | + ]; |
|
61 | 61 | |
62 | - case 'SpaceAfterNotUnitTest.js': |
|
63 | - return [ |
|
64 | - 2 => 2, |
|
65 | - 4 => 2, |
|
66 | - 5 => 1, |
|
67 | - ]; |
|
62 | + case 'SpaceAfterNotUnitTest.js': |
|
63 | + return [ |
|
64 | + 2 => 2, |
|
65 | + 4 => 2, |
|
66 | + 5 => 1, |
|
67 | + ]; |
|
68 | 68 | |
69 | - default: |
|
70 | - return []; |
|
69 | + default: |
|
70 | + return []; |
|
71 | 71 | }//end switch |
72 | 72 | |
73 | 73 | }//end getErrorList() |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | * |
26 | 26 | * @return array<int, int> |
27 | 27 | */ |
28 | - public function getErrorList($testFile='') |
|
28 | + public function getErrorList( $testFile = '' ) |
|
29 | 29 | { |
30 | - switch ($testFile) { |
|
30 | + switch ( $testFile ) { |
|
31 | 31 | case 'SpaceAfterNotUnitTest.inc': |
32 | 32 | return [ |
33 | 33 | 3 => 2, |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | ]; |
68 | 68 | |
69 | 69 | default: |
70 | - return []; |
|
70 | + return [ ]; |
|
71 | 71 | }//end switch |
72 | 72 | |
73 | 73 | }//end getErrorList() |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | */ |
84 | 84 | public function getWarningList() |
85 | 85 | { |
86 | - return []; |
|
86 | + return [ ]; |
|
87 | 87 | |
88 | 88 | }//end getWarningList() |
89 | 89 |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class SpaceAfterNotUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class SpaceAfterNotUnitTest extends AbstractSniffUnitTest { |
|
16 | 15 | |
17 | 16 | |
18 | 17 | /** |
@@ -25,8 +24,7 @@ discard block |
||
25 | 24 | * |
26 | 25 | * @return array<int, int> |
27 | 26 | */ |
28 | - public function getErrorList($testFile='') |
|
29 | - { |
|
27 | + public function getErrorList($testFile='') { |
|
30 | 28 | switch ($testFile) { |
31 | 29 | case 'SpaceAfterNotUnitTest.inc': |
32 | 30 | return [ |
@@ -81,8 +79,7 @@ discard block |
||
81 | 79 | * |
82 | 80 | * @return array<int, int> |
83 | 81 | */ |
84 | - public function getWarningList() |
|
85 | - { |
|
82 | + public function getWarningList() { |
|
86 | 83 | return []; |
87 | 84 | |
88 | 85 | }//end getWarningList() |
@@ -15,142 +15,142 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @return array<int, int> |
|
25 | - */ |
|
26 | - public function getErrorList() |
|
27 | - { |
|
28 | - return []; |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @return array<int, int> |
|
25 | + */ |
|
26 | + public function getErrorList() |
|
27 | + { |
|
28 | + return []; |
|
29 | 29 | |
30 | - }//end getErrorList() |
|
30 | + }//end getErrorList() |
|
31 | 31 | |
32 | 32 | |
33 | - /** |
|
34 | - * Returns the lines where warnings should occur. |
|
35 | - * |
|
36 | - * The key of the array should represent the line number and the value |
|
37 | - * should represent the number of warnings that should occur on that line. |
|
38 | - * |
|
39 | - * @param string $testFile The name of the file being tested. |
|
40 | - * |
|
41 | - * @return array<int, int> |
|
42 | - */ |
|
43 | - public function getWarningList($testFile='MultipleStatementAlignmentUnitTest.inc') |
|
44 | - { |
|
45 | - switch ($testFile) { |
|
46 | - case 'MultipleStatementAlignmentUnitTest.inc': |
|
47 | - return [ |
|
48 | - 11 => 1, |
|
49 | - 12 => 1, |
|
50 | - 23 => 1, |
|
51 | - 24 => 1, |
|
52 | - 26 => 1, |
|
53 | - 27 => 1, |
|
54 | - 37 => 1, |
|
55 | - 38 => 1, |
|
56 | - 48 => 1, |
|
57 | - 50 => 1, |
|
58 | - 51 => 1, |
|
59 | - 61 => 1, |
|
60 | - 62 => 1, |
|
61 | - 64 => 1, |
|
62 | - 65 => 1, |
|
63 | - 71 => 1, |
|
64 | - 78 => 1, |
|
65 | - 79 => 1, |
|
66 | - 86 => 1, |
|
67 | - 92 => 1, |
|
68 | - 93 => 1, |
|
69 | - 94 => 1, |
|
70 | - 95 => 1, |
|
71 | - 123 => 1, |
|
72 | - 124 => 1, |
|
73 | - 126 => 1, |
|
74 | - 129 => 1, |
|
75 | - 154 => 1, |
|
76 | - 161 => 1, |
|
77 | - 178 => 1, |
|
78 | - 179 => 1, |
|
79 | - 182 => 1, |
|
80 | - 206 => 1, |
|
81 | - 207 => 1, |
|
82 | - 252 => 1, |
|
83 | - 257 => 1, |
|
84 | - 263 => 1, |
|
85 | - 269 => 1, |
|
86 | - 293 => 1, |
|
87 | - 295 => 1, |
|
88 | - 296 => 1, |
|
89 | - 297 => 1, |
|
90 | - 301 => 1, |
|
91 | - 303 => 1, |
|
92 | - 308 => 1, |
|
93 | - 311 => 1, |
|
94 | - 313 => 1, |
|
95 | - 314 => 1, |
|
96 | - 321 => 1, |
|
97 | - 322 => 1, |
|
98 | - 324 => 1, |
|
99 | - 329 => 1, |
|
100 | - 331 => 1, |
|
101 | - 336 => 1, |
|
102 | - 339 => 1, |
|
103 | - 341 => 1, |
|
104 | - 342 => 1, |
|
105 | - 349 => 1, |
|
106 | - 350 => 1, |
|
107 | - 352 => 1, |
|
108 | - 357 => 1, |
|
109 | - 364 => 1, |
|
110 | - 396 => 1, |
|
111 | - 398 => 1, |
|
112 | - 399 => 1, |
|
113 | - 401 => 1, |
|
114 | - ]; |
|
115 | - break; |
|
116 | - case 'MultipleStatementAlignmentUnitTest.js': |
|
117 | - return [ |
|
118 | - 11 => 1, |
|
119 | - 12 => 1, |
|
120 | - 23 => 1, |
|
121 | - 24 => 1, |
|
122 | - 26 => 1, |
|
123 | - 27 => 1, |
|
124 | - 37 => 1, |
|
125 | - 38 => 1, |
|
126 | - 48 => 1, |
|
127 | - 50 => 1, |
|
128 | - 51 => 1, |
|
129 | - 61 => 1, |
|
130 | - 62 => 1, |
|
131 | - 64 => 1, |
|
132 | - 65 => 1, |
|
133 | - 71 => 1, |
|
134 | - 78 => 1, |
|
135 | - 79 => 1, |
|
136 | - 81 => 1, |
|
137 | - 82 => 1, |
|
138 | - 83 => 1, |
|
139 | - 85 => 1, |
|
140 | - 86 => 1, |
|
141 | - 100 => 1, |
|
142 | - 112 => 1, |
|
143 | - 113 => 1, |
|
144 | - 114 => 1, |
|
145 | - 117 => 1, |
|
146 | - ]; |
|
147 | - break; |
|
148 | - default: |
|
149 | - return []; |
|
150 | - break; |
|
151 | - }//end switch |
|
33 | + /** |
|
34 | + * Returns the lines where warnings should occur. |
|
35 | + * |
|
36 | + * The key of the array should represent the line number and the value |
|
37 | + * should represent the number of warnings that should occur on that line. |
|
38 | + * |
|
39 | + * @param string $testFile The name of the file being tested. |
|
40 | + * |
|
41 | + * @return array<int, int> |
|
42 | + */ |
|
43 | + public function getWarningList($testFile='MultipleStatementAlignmentUnitTest.inc') |
|
44 | + { |
|
45 | + switch ($testFile) { |
|
46 | + case 'MultipleStatementAlignmentUnitTest.inc': |
|
47 | + return [ |
|
48 | + 11 => 1, |
|
49 | + 12 => 1, |
|
50 | + 23 => 1, |
|
51 | + 24 => 1, |
|
52 | + 26 => 1, |
|
53 | + 27 => 1, |
|
54 | + 37 => 1, |
|
55 | + 38 => 1, |
|
56 | + 48 => 1, |
|
57 | + 50 => 1, |
|
58 | + 51 => 1, |
|
59 | + 61 => 1, |
|
60 | + 62 => 1, |
|
61 | + 64 => 1, |
|
62 | + 65 => 1, |
|
63 | + 71 => 1, |
|
64 | + 78 => 1, |
|
65 | + 79 => 1, |
|
66 | + 86 => 1, |
|
67 | + 92 => 1, |
|
68 | + 93 => 1, |
|
69 | + 94 => 1, |
|
70 | + 95 => 1, |
|
71 | + 123 => 1, |
|
72 | + 124 => 1, |
|
73 | + 126 => 1, |
|
74 | + 129 => 1, |
|
75 | + 154 => 1, |
|
76 | + 161 => 1, |
|
77 | + 178 => 1, |
|
78 | + 179 => 1, |
|
79 | + 182 => 1, |
|
80 | + 206 => 1, |
|
81 | + 207 => 1, |
|
82 | + 252 => 1, |
|
83 | + 257 => 1, |
|
84 | + 263 => 1, |
|
85 | + 269 => 1, |
|
86 | + 293 => 1, |
|
87 | + 295 => 1, |
|
88 | + 296 => 1, |
|
89 | + 297 => 1, |
|
90 | + 301 => 1, |
|
91 | + 303 => 1, |
|
92 | + 308 => 1, |
|
93 | + 311 => 1, |
|
94 | + 313 => 1, |
|
95 | + 314 => 1, |
|
96 | + 321 => 1, |
|
97 | + 322 => 1, |
|
98 | + 324 => 1, |
|
99 | + 329 => 1, |
|
100 | + 331 => 1, |
|
101 | + 336 => 1, |
|
102 | + 339 => 1, |
|
103 | + 341 => 1, |
|
104 | + 342 => 1, |
|
105 | + 349 => 1, |
|
106 | + 350 => 1, |
|
107 | + 352 => 1, |
|
108 | + 357 => 1, |
|
109 | + 364 => 1, |
|
110 | + 396 => 1, |
|
111 | + 398 => 1, |
|
112 | + 399 => 1, |
|
113 | + 401 => 1, |
|
114 | + ]; |
|
115 | + break; |
|
116 | + case 'MultipleStatementAlignmentUnitTest.js': |
|
117 | + return [ |
|
118 | + 11 => 1, |
|
119 | + 12 => 1, |
|
120 | + 23 => 1, |
|
121 | + 24 => 1, |
|
122 | + 26 => 1, |
|
123 | + 27 => 1, |
|
124 | + 37 => 1, |
|
125 | + 38 => 1, |
|
126 | + 48 => 1, |
|
127 | + 50 => 1, |
|
128 | + 51 => 1, |
|
129 | + 61 => 1, |
|
130 | + 62 => 1, |
|
131 | + 64 => 1, |
|
132 | + 65 => 1, |
|
133 | + 71 => 1, |
|
134 | + 78 => 1, |
|
135 | + 79 => 1, |
|
136 | + 81 => 1, |
|
137 | + 82 => 1, |
|
138 | + 83 => 1, |
|
139 | + 85 => 1, |
|
140 | + 86 => 1, |
|
141 | + 100 => 1, |
|
142 | + 112 => 1, |
|
143 | + 113 => 1, |
|
144 | + 114 => 1, |
|
145 | + 117 => 1, |
|
146 | + ]; |
|
147 | + break; |
|
148 | + default: |
|
149 | + return []; |
|
150 | + break; |
|
151 | + }//end switch |
|
152 | 152 | |
153 | - }//end getWarningList() |
|
153 | + }//end getWarningList() |
|
154 | 154 | |
155 | 155 | |
156 | 156 | }//end class |
@@ -43,111 +43,111 @@ |
||
43 | 43 | public function getWarningList($testFile='MultipleStatementAlignmentUnitTest.inc') |
44 | 44 | { |
45 | 45 | switch ($testFile) { |
46 | - case 'MultipleStatementAlignmentUnitTest.inc': |
|
47 | - return [ |
|
48 | - 11 => 1, |
|
49 | - 12 => 1, |
|
50 | - 23 => 1, |
|
51 | - 24 => 1, |
|
52 | - 26 => 1, |
|
53 | - 27 => 1, |
|
54 | - 37 => 1, |
|
55 | - 38 => 1, |
|
56 | - 48 => 1, |
|
57 | - 50 => 1, |
|
58 | - 51 => 1, |
|
59 | - 61 => 1, |
|
60 | - 62 => 1, |
|
61 | - 64 => 1, |
|
62 | - 65 => 1, |
|
63 | - 71 => 1, |
|
64 | - 78 => 1, |
|
65 | - 79 => 1, |
|
66 | - 86 => 1, |
|
67 | - 92 => 1, |
|
68 | - 93 => 1, |
|
69 | - 94 => 1, |
|
70 | - 95 => 1, |
|
71 | - 123 => 1, |
|
72 | - 124 => 1, |
|
73 | - 126 => 1, |
|
74 | - 129 => 1, |
|
75 | - 154 => 1, |
|
76 | - 161 => 1, |
|
77 | - 178 => 1, |
|
78 | - 179 => 1, |
|
79 | - 182 => 1, |
|
80 | - 206 => 1, |
|
81 | - 207 => 1, |
|
82 | - 252 => 1, |
|
83 | - 257 => 1, |
|
84 | - 263 => 1, |
|
85 | - 269 => 1, |
|
86 | - 293 => 1, |
|
87 | - 295 => 1, |
|
88 | - 296 => 1, |
|
89 | - 297 => 1, |
|
90 | - 301 => 1, |
|
91 | - 303 => 1, |
|
92 | - 308 => 1, |
|
93 | - 311 => 1, |
|
94 | - 313 => 1, |
|
95 | - 314 => 1, |
|
96 | - 321 => 1, |
|
97 | - 322 => 1, |
|
98 | - 324 => 1, |
|
99 | - 329 => 1, |
|
100 | - 331 => 1, |
|
101 | - 336 => 1, |
|
102 | - 339 => 1, |
|
103 | - 341 => 1, |
|
104 | - 342 => 1, |
|
105 | - 349 => 1, |
|
106 | - 350 => 1, |
|
107 | - 352 => 1, |
|
108 | - 357 => 1, |
|
109 | - 364 => 1, |
|
110 | - 396 => 1, |
|
111 | - 398 => 1, |
|
112 | - 399 => 1, |
|
113 | - 401 => 1, |
|
114 | - ]; |
|
115 | - break; |
|
116 | - case 'MultipleStatementAlignmentUnitTest.js': |
|
117 | - return [ |
|
118 | - 11 => 1, |
|
119 | - 12 => 1, |
|
120 | - 23 => 1, |
|
121 | - 24 => 1, |
|
122 | - 26 => 1, |
|
123 | - 27 => 1, |
|
124 | - 37 => 1, |
|
125 | - 38 => 1, |
|
126 | - 48 => 1, |
|
127 | - 50 => 1, |
|
128 | - 51 => 1, |
|
129 | - 61 => 1, |
|
130 | - 62 => 1, |
|
131 | - 64 => 1, |
|
132 | - 65 => 1, |
|
133 | - 71 => 1, |
|
134 | - 78 => 1, |
|
135 | - 79 => 1, |
|
136 | - 81 => 1, |
|
137 | - 82 => 1, |
|
138 | - 83 => 1, |
|
139 | - 85 => 1, |
|
140 | - 86 => 1, |
|
141 | - 100 => 1, |
|
142 | - 112 => 1, |
|
143 | - 113 => 1, |
|
144 | - 114 => 1, |
|
145 | - 117 => 1, |
|
146 | - ]; |
|
147 | - break; |
|
148 | - default: |
|
149 | - return []; |
|
150 | - break; |
|
46 | + case 'MultipleStatementAlignmentUnitTest.inc': |
|
47 | + return [ |
|
48 | + 11 => 1, |
|
49 | + 12 => 1, |
|
50 | + 23 => 1, |
|
51 | + 24 => 1, |
|
52 | + 26 => 1, |
|
53 | + 27 => 1, |
|
54 | + 37 => 1, |
|
55 | + 38 => 1, |
|
56 | + 48 => 1, |
|
57 | + 50 => 1, |
|
58 | + 51 => 1, |
|
59 | + 61 => 1, |
|
60 | + 62 => 1, |
|
61 | + 64 => 1, |
|
62 | + 65 => 1, |
|
63 | + 71 => 1, |
|
64 | + 78 => 1, |
|
65 | + 79 => 1, |
|
66 | + 86 => 1, |
|
67 | + 92 => 1, |
|
68 | + 93 => 1, |
|
69 | + 94 => 1, |
|
70 | + 95 => 1, |
|
71 | + 123 => 1, |
|
72 | + 124 => 1, |
|
73 | + 126 => 1, |
|
74 | + 129 => 1, |
|
75 | + 154 => 1, |
|
76 | + 161 => 1, |
|
77 | + 178 => 1, |
|
78 | + 179 => 1, |
|
79 | + 182 => 1, |
|
80 | + 206 => 1, |
|
81 | + 207 => 1, |
|
82 | + 252 => 1, |
|
83 | + 257 => 1, |
|
84 | + 263 => 1, |
|
85 | + 269 => 1, |
|
86 | + 293 => 1, |
|
87 | + 295 => 1, |
|
88 | + 296 => 1, |
|
89 | + 297 => 1, |
|
90 | + 301 => 1, |
|
91 | + 303 => 1, |
|
92 | + 308 => 1, |
|
93 | + 311 => 1, |
|
94 | + 313 => 1, |
|
95 | + 314 => 1, |
|
96 | + 321 => 1, |
|
97 | + 322 => 1, |
|
98 | + 324 => 1, |
|
99 | + 329 => 1, |
|
100 | + 331 => 1, |
|
101 | + 336 => 1, |
|
102 | + 339 => 1, |
|
103 | + 341 => 1, |
|
104 | + 342 => 1, |
|
105 | + 349 => 1, |
|
106 | + 350 => 1, |
|
107 | + 352 => 1, |
|
108 | + 357 => 1, |
|
109 | + 364 => 1, |
|
110 | + 396 => 1, |
|
111 | + 398 => 1, |
|
112 | + 399 => 1, |
|
113 | + 401 => 1, |
|
114 | + ]; |
|
115 | + break; |
|
116 | + case 'MultipleStatementAlignmentUnitTest.js': |
|
117 | + return [ |
|
118 | + 11 => 1, |
|
119 | + 12 => 1, |
|
120 | + 23 => 1, |
|
121 | + 24 => 1, |
|
122 | + 26 => 1, |
|
123 | + 27 => 1, |
|
124 | + 37 => 1, |
|
125 | + 38 => 1, |
|
126 | + 48 => 1, |
|
127 | + 50 => 1, |
|
128 | + 51 => 1, |
|
129 | + 61 => 1, |
|
130 | + 62 => 1, |
|
131 | + 64 => 1, |
|
132 | + 65 => 1, |
|
133 | + 71 => 1, |
|
134 | + 78 => 1, |
|
135 | + 79 => 1, |
|
136 | + 81 => 1, |
|
137 | + 82 => 1, |
|
138 | + 83 => 1, |
|
139 | + 85 => 1, |
|
140 | + 86 => 1, |
|
141 | + 100 => 1, |
|
142 | + 112 => 1, |
|
143 | + 113 => 1, |
|
144 | + 114 => 1, |
|
145 | + 117 => 1, |
|
146 | + ]; |
|
147 | + break; |
|
148 | + default: |
|
149 | + return []; |
|
150 | + break; |
|
151 | 151 | }//end switch |
152 | 152 | |
153 | 153 | }//end getWarningList() |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function getErrorList() |
27 | 27 | { |
28 | - return []; |
|
28 | + return [ ]; |
|
29 | 29 | |
30 | 30 | }//end getErrorList() |
31 | 31 | |
@@ -40,9 +40,9 @@ discard block |
||
40 | 40 | * |
41 | 41 | * @return array<int, int> |
42 | 42 | */ |
43 | - public function getWarningList($testFile='MultipleStatementAlignmentUnitTest.inc') |
|
43 | + public function getWarningList( $testFile = 'MultipleStatementAlignmentUnitTest.inc' ) |
|
44 | 44 | { |
45 | - switch ($testFile) { |
|
45 | + switch ( $testFile ) { |
|
46 | 46 | case 'MultipleStatementAlignmentUnitTest.inc': |
47 | 47 | return [ |
48 | 48 | 11 => 1, |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | ]; |
147 | 147 | break; |
148 | 148 | default: |
149 | - return []; |
|
149 | + return [ ]; |
|
150 | 150 | break; |
151 | 151 | }//end switch |
152 | 152 |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class MultipleStatementAlignmentUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class MultipleStatementAlignmentUnitTest extends AbstractSniffUnitTest { |
|
16 | 15 | |
17 | 16 | |
18 | 17 | /** |
@@ -23,8 +22,7 @@ discard block |
||
23 | 22 | * |
24 | 23 | * @return array<int, int> |
25 | 24 | */ |
26 | - public function getErrorList() |
|
27 | - { |
|
25 | + public function getErrorList() { |
|
28 | 26 | return []; |
29 | 27 | |
30 | 28 | }//end getErrorList() |
@@ -40,8 +38,7 @@ discard block |
||
40 | 38 | * |
41 | 39 | * @return array<int, int> |
42 | 40 | */ |
43 | - public function getWarningList($testFile='MultipleStatementAlignmentUnitTest.inc') |
|
44 | - { |
|
41 | + public function getWarningList($testFile='MultipleStatementAlignmentUnitTest.inc') { |
|
45 | 42 | switch ($testFile) { |
46 | 43 | case 'MultipleStatementAlignmentUnitTest.inc': |
47 | 44 | return [ |
@@ -15,73 +15,73 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @return array<int, int> |
|
25 | - */ |
|
26 | - public function getErrorList() |
|
27 | - { |
|
28 | - return [ |
|
29 | - 4 => 1, |
|
30 | - 5 => 1, |
|
31 | - 8 => 1, |
|
32 | - 9 => 1, |
|
33 | - 12 => 1, |
|
34 | - 13 => 1, |
|
35 | - 16 => 1, |
|
36 | - 17 => 1, |
|
37 | - 20 => 1, |
|
38 | - 21 => 1, |
|
39 | - 24 => 1, |
|
40 | - 25 => 1, |
|
41 | - 28 => 1, |
|
42 | - 29 => 1, |
|
43 | - 32 => 1, |
|
44 | - 33 => 1, |
|
45 | - 36 => 1, |
|
46 | - 37 => 1, |
|
47 | - 40 => 1, |
|
48 | - 41 => 1, |
|
49 | - 44 => 1, |
|
50 | - 45 => 1, |
|
51 | - 51 => 1, |
|
52 | - 53 => 1, |
|
53 | - 55 => 1, |
|
54 | - 58 => 1, |
|
55 | - 64 => 1, |
|
56 | - 72 => 1, |
|
57 | - 73 => 1, |
|
58 | - 75 => 1, |
|
59 | - 76 => 1, |
|
60 | - 78 => 1, |
|
61 | - 82 => 1, |
|
62 | - 84 => 1, |
|
63 | - 85 => 1, |
|
64 | - 86 => 1, |
|
65 | - 88 => 1, |
|
66 | - 93 => 1, |
|
67 | - ]; |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @return array<int, int> |
|
25 | + */ |
|
26 | + public function getErrorList() |
|
27 | + { |
|
28 | + return [ |
|
29 | + 4 => 1, |
|
30 | + 5 => 1, |
|
31 | + 8 => 1, |
|
32 | + 9 => 1, |
|
33 | + 12 => 1, |
|
34 | + 13 => 1, |
|
35 | + 16 => 1, |
|
36 | + 17 => 1, |
|
37 | + 20 => 1, |
|
38 | + 21 => 1, |
|
39 | + 24 => 1, |
|
40 | + 25 => 1, |
|
41 | + 28 => 1, |
|
42 | + 29 => 1, |
|
43 | + 32 => 1, |
|
44 | + 33 => 1, |
|
45 | + 36 => 1, |
|
46 | + 37 => 1, |
|
47 | + 40 => 1, |
|
48 | + 41 => 1, |
|
49 | + 44 => 1, |
|
50 | + 45 => 1, |
|
51 | + 51 => 1, |
|
52 | + 53 => 1, |
|
53 | + 55 => 1, |
|
54 | + 58 => 1, |
|
55 | + 64 => 1, |
|
56 | + 72 => 1, |
|
57 | + 73 => 1, |
|
58 | + 75 => 1, |
|
59 | + 76 => 1, |
|
60 | + 78 => 1, |
|
61 | + 82 => 1, |
|
62 | + 84 => 1, |
|
63 | + 85 => 1, |
|
64 | + 86 => 1, |
|
65 | + 88 => 1, |
|
66 | + 93 => 1, |
|
67 | + ]; |
|
68 | 68 | |
69 | - }//end getErrorList() |
|
69 | + }//end getErrorList() |
|
70 | 70 | |
71 | 71 | |
72 | - /** |
|
73 | - * Returns the lines where warnings should occur. |
|
74 | - * |
|
75 | - * The key of the array should represent the line number and the value |
|
76 | - * should represent the number of warnings that should occur on that line. |
|
77 | - * |
|
78 | - * @return array<int, int> |
|
79 | - */ |
|
80 | - public function getWarningList() |
|
81 | - { |
|
82 | - return []; |
|
72 | + /** |
|
73 | + * Returns the lines where warnings should occur. |
|
74 | + * |
|
75 | + * The key of the array should represent the line number and the value |
|
76 | + * should represent the number of warnings that should occur on that line. |
|
77 | + * |
|
78 | + * @return array<int, int> |
|
79 | + */ |
|
80 | + public function getWarningList() |
|
81 | + { |
|
82 | + return []; |
|
83 | 83 | |
84 | - }//end getWarningList() |
|
84 | + }//end getWarningList() |
|
85 | 85 | |
86 | 86 | |
87 | 87 | }//end class |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class SpaceAfterCastUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class SpaceAfterCastUnitTest extends AbstractSniffUnitTest { |
|
16 | 15 | |
17 | 16 | |
18 | 17 | /** |
@@ -23,8 +22,7 @@ discard block |
||
23 | 22 | * |
24 | 23 | * @return array<int, int> |
25 | 24 | */ |
26 | - public function getErrorList() |
|
27 | - { |
|
25 | + public function getErrorList() { |
|
28 | 26 | return [ |
29 | 27 | 4 => 1, |
30 | 28 | 5 => 1, |
@@ -77,8 +75,7 @@ discard block |
||
77 | 75 | * |
78 | 76 | * @return array<int, int> |
79 | 77 | */ |
80 | - public function getWarningList() |
|
81 | - { |
|
78 | + public function getWarningList() { |
|
82 | 79 | return []; |
83 | 80 | |
84 | 81 | }//end getWarningList() |
@@ -64,7 +64,7 @@ |
||
64 | 64 | */ |
65 | 65 | public function getWarningList() |
66 | 66 | { |
67 | - return []; |
|
67 | + return [ ]; |
|
68 | 68 | |
69 | 69 | }//end getWarningList() |
70 | 70 |
@@ -8,28 +8,28 @@ discard block |
||
8 | 8 | $var = ! /*comment*/ ($x || $y); |
9 | 9 | |
10 | 10 | $baz = function () { |
11 | - return ! $bar; |
|
11 | + return ! $bar; |
|
12 | 12 | }; |
13 | 13 | |
14 | 14 | if ( ! |
15 | - ($x || $y) |
|
15 | + ($x || $y) |
|
16 | 16 | ) { |
17 | - return !$bar; |
|
17 | + return !$bar; |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | if ( ! // phpcs:ignore Standard.Cat.SniffName -- for reasons. |
21 | - ($x || $y) |
|
21 | + ($x || $y) |
|
22 | 22 | ) {} |
23 | 23 | |
24 | 24 | // phpcs:set Generic.Formatting.SpaceAfterNot ignoreNewlines true |
25 | 25 | if ( ! |
26 | - ($x || $y) |
|
26 | + ($x || $y) |
|
27 | 27 | ) { |
28 | - return !$bar; |
|
28 | + return !$bar; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | if ( ! // phpcs:ignore Standard.Cat.SniffName -- for reasons. |
32 | - ($x || $y) |
|
32 | + ($x || $y) |
|
33 | 33 | ) {} |
34 | 34 | // phpcs:set Generic.Formatting.SpaceAfterNot ignoreNewlines false |
35 | 35 | |
@@ -42,13 +42,13 @@ discard block |
||
42 | 42 | $var = ! ($x || $y); |
43 | 43 | |
44 | 44 | $baz = function () { |
45 | - return ! $bar; |
|
45 | + return ! $bar; |
|
46 | 46 | }; |
47 | 47 | |
48 | 48 | if ( ! |
49 | - ($x || $y) |
|
49 | + ($x || $y) |
|
50 | 50 | ) { |
51 | - return !$bar; |
|
51 | + return !$bar; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | // phpcs:set Generic.Formatting.SpaceAfterNot spacing 0 |
@@ -59,28 +59,28 @@ discard block |
||
59 | 59 | $var = ! /*comment*/ ($x || $y); |
60 | 60 | |
61 | 61 | $baz = function () { |
62 | - return ! $bar; |
|
62 | + return ! $bar; |
|
63 | 63 | }; |
64 | 64 | |
65 | 65 | if ( ! |
66 | - ($x || $y) |
|
66 | + ($x || $y) |
|
67 | 67 | ) { |
68 | - return ! $bar; |
|
68 | + return ! $bar; |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | if ( ! // phpcs:ignore Standard.Cat.SniffName -- for reasons. |
72 | - ($x || $y) |
|
72 | + ($x || $y) |
|
73 | 73 | ) {} |
74 | 74 | |
75 | 75 | // phpcs:set Generic.Formatting.SpaceAfterNot ignoreNewlines true |
76 | 76 | if ( ! |
77 | - ($x || $y) |
|
77 | + ($x || $y) |
|
78 | 78 | ) { |
79 | - return ! $bar; |
|
79 | + return ! $bar; |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | if ( ! // phpcs:ignore Standard.Cat.SniffName -- for reasons. |
83 | - ($x || $y) |
|
83 | + ($x || $y) |
|
84 | 84 | ) {} |
85 | 85 | // phpcs:set Generic.Formatting.SpaceAfterNot ignoreNewlines false |
86 | 86 | // phpcs:set Generic.Formatting.SpaceAfterNot spacing 1 |
@@ -1,86 +1,81 @@ |
||
1 | 1 | <?php |
2 | -if (! $someVar || ! $x instanceOf stdClass) {} |
|
3 | -if (!$someVar || !$x instanceOf stdClass) {} |
|
4 | -if (! $someVar || ! $x instanceOf stdClass) {} |
|
5 | -if (!foo() && (!$x || true)) {} |
|
6 | -$var = !($x || $y); |
|
7 | -$var = ! ($x || $y); |
|
8 | -$var = ! /*comment*/ ($x || $y); |
|
2 | +if ( ! $someVar || ! $x instanceOf stdClass ) {} |
|
3 | +if ( ! $someVar || ! $x instanceOf stdClass ) {} |
|
4 | +if ( ! $someVar || ! $x instanceOf stdClass ) {} |
|
5 | +if ( ! foo() && ( ! $x || true ) ) {} |
|
6 | +$var = ! ( $x || $y ); |
|
7 | +$var = ! ( $x || $y ); |
|
8 | +$var = ! /*comment*/ ( $x || $y ); |
|
9 | 9 | |
10 | -$baz = function () { |
|
11 | - return ! $bar; |
|
10 | +$baz = function() { |
|
11 | + return ! $bar; |
|
12 | 12 | }; |
13 | 13 | |
14 | -if ( ! |
|
15 | - ($x || $y) |
|
14 | +if ( ! ( $x || $y ) |
|
16 | 15 | ) { |
17 | - return !$bar; |
|
16 | + return ! $bar; |
|
18 | 17 | } |
19 | 18 | |
20 | 19 | if ( ! // phpcs:ignore Standard.Cat.SniffName -- for reasons. |
21 | - ($x || $y) |
|
20 | + ( $x || $y ) |
|
22 | 21 | ) {} |
23 | 22 | |
24 | 23 | // phpcs:set Generic.Formatting.SpaceAfterNot ignoreNewlines true |
25 | -if ( ! |
|
26 | - ($x || $y) |
|
24 | +if ( ! ( $x || $y ) |
|
27 | 25 | ) { |
28 | - return !$bar; |
|
26 | + return ! $bar; |
|
29 | 27 | } |
30 | 28 | |
31 | 29 | if ( ! // phpcs:ignore Standard.Cat.SniffName -- for reasons. |
32 | - ($x || $y) |
|
30 | + ( $x || $y ) |
|
33 | 31 | ) {} |
34 | 32 | // phpcs:set Generic.Formatting.SpaceAfterNot ignoreNewlines false |
35 | 33 | |
36 | 34 | // phpcs:set Generic.Formatting.SpaceAfterNot spacing 2 |
37 | -if (! $someVar || ! $x instanceOf stdClass) {} |
|
38 | -if (!$someVar || !$x instanceOf stdClass) {} |
|
39 | -if (! $someVar || ! $x instanceOf stdClass) {} |
|
40 | -if (!foo() && (! $x || true)) {} |
|
41 | -$var = ! ($x || $y); |
|
42 | -$var = ! ($x || $y); |
|
35 | +if ( ! $someVar || ! $x instanceOf stdClass ) {} |
|
36 | +if ( ! $someVar || ! $x instanceOf stdClass ) {} |
|
37 | +if ( ! $someVar || ! $x instanceOf stdClass ) {} |
|
38 | +if ( ! foo() && ( ! $x || true ) ) {} |
|
39 | +$var = ! ( $x || $y ); |
|
40 | +$var = ! ( $x || $y ); |
|
43 | 41 | |
44 | -$baz = function () { |
|
45 | - return ! $bar; |
|
42 | +$baz = function() { |
|
43 | + return ! $bar; |
|
46 | 44 | }; |
47 | 45 | |
48 | -if ( ! |
|
49 | - ($x || $y) |
|
46 | +if ( ! ( $x || $y ) |
|
50 | 47 | ) { |
51 | - return !$bar; |
|
48 | + return ! $bar; |
|
52 | 49 | } |
53 | 50 | |
54 | 51 | // phpcs:set Generic.Formatting.SpaceAfterNot spacing 0 |
55 | -if (!$someVar || !$x instanceOf stdClass) {} |
|
56 | -if (! $someVar || ! $x instanceOf stdClass) {} |
|
57 | -if (! foo() && (!$x || true)) {} |
|
58 | -$var = ! ($x || $y); |
|
59 | -$var = ! /*comment*/ ($x || $y); |
|
52 | +if ( ! $someVar || ! $x instanceOf stdClass ) {} |
|
53 | +if ( ! $someVar || ! $x instanceOf stdClass ) {} |
|
54 | +if ( ! foo() && ( ! $x || true ) ) {} |
|
55 | +$var = ! ( $x || $y ); |
|
56 | +$var = ! /*comment*/ ( $x || $y ); |
|
60 | 57 | |
61 | -$baz = function () { |
|
62 | - return ! $bar; |
|
58 | +$baz = function() { |
|
59 | + return ! $bar; |
|
63 | 60 | }; |
64 | 61 | |
65 | -if ( ! |
|
66 | - ($x || $y) |
|
62 | +if ( ! ( $x || $y ) |
|
67 | 63 | ) { |
68 | 64 | return ! $bar; |
69 | 65 | } |
70 | 66 | |
71 | 67 | if ( ! // phpcs:ignore Standard.Cat.SniffName -- for reasons. |
72 | - ($x || $y) |
|
68 | + ( $x || $y ) |
|
73 | 69 | ) {} |
74 | 70 | |
75 | 71 | // phpcs:set Generic.Formatting.SpaceAfterNot ignoreNewlines true |
76 | -if ( ! |
|
77 | - ($x || $y) |
|
72 | +if ( ! ( $x || $y ) |
|
78 | 73 | ) { |
79 | - return ! $bar; |
|
74 | + return ! $bar; |
|
80 | 75 | } |
81 | 76 | |
82 | 77 | if ( ! // phpcs:ignore Standard.Cat.SniffName -- for reasons. |
83 | - ($x || $y) |
|
78 | + ( $x || $y ) |
|
84 | 79 | ) {} |
85 | 80 | // phpcs:set Generic.Formatting.SpaceAfterNot ignoreNewlines false |
86 | 81 | // phpcs:set Generic.Formatting.SpaceAfterNot spacing 1 |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if (! $someVar || ! $x instanceOf stdClass) {} |
|
3 | -if (!$someVar || !$x instanceOf stdClass) {} |
|
4 | -if (! $someVar || ! $x instanceOf stdClass) {} |
|
2 | +if (! $someVar || ! $x instanceof stdClass) {} |
|
3 | +if (!$someVar || !$x instanceof stdClass) {} |
|
4 | +if (! $someVar || ! $x instanceof stdClass) {} |
|
5 | 5 | if (!foo() && (!$x || true)) {} |
6 | 6 | $var = !($x || $y); |
7 | 7 | $var = ! ($x || $y); |
@@ -34,9 +34,9 @@ discard block |
||
34 | 34 | // phpcs:set Generic.Formatting.SpaceAfterNot ignoreNewlines false |
35 | 35 | |
36 | 36 | // phpcs:set Generic.Formatting.SpaceAfterNot spacing 2 |
37 | -if (! $someVar || ! $x instanceOf stdClass) {} |
|
38 | -if (!$someVar || !$x instanceOf stdClass) {} |
|
39 | -if (! $someVar || ! $x instanceOf stdClass) {} |
|
37 | +if (! $someVar || ! $x instanceof stdClass) {} |
|
38 | +if (!$someVar || !$x instanceof stdClass) {} |
|
39 | +if (! $someVar || ! $x instanceof stdClass) {} |
|
40 | 40 | if (!foo() && (! $x || true)) {} |
41 | 41 | $var = ! ($x || $y); |
42 | 42 | $var = ! ($x || $y); |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | // phpcs:set Generic.Formatting.SpaceAfterNot spacing 0 |
55 | -if (!$someVar || !$x instanceOf stdClass) {} |
|
56 | -if (! $someVar || ! $x instanceOf stdClass) {} |
|
55 | +if (!$someVar || !$x instanceof stdClass) {} |
|
56 | +if (! $someVar || ! $x instanceof stdClass) {} |
|
57 | 57 | if (! foo() && (!$x || true)) {} |
58 | 58 | $var = ! ($x || $y); |
59 | 59 | $var = ! /*comment*/ ($x || $y); |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | -$y = 2;; |
|
2 | +$y = 2; ; |
|
3 | 3 | echo $y; |
4 | -for ($i = 1; $i < $length; $i++) {} |
|
5 | -for (; $i < $length; $i++) {} |
|
4 | +for ( $i = 1; $i < $length; $i++ ) {} |
|
5 | +for ( ; $i < $length; $i++ ) {} |
|
6 | 6 | echo 'x'; echo $y; |
7 | 7 | $x = 10; echo $y; |
8 | 8 | $this->wizardid = 10; $this->paint(); echo 'x'; |
@@ -15,64 +15,64 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @return array<int, int> |
|
25 | - */ |
|
26 | - public function getErrorList() |
|
27 | - { |
|
28 | - return [ |
|
29 | - 3 => 1, |
|
30 | - 4 => 1, |
|
31 | - 5 => 2, |
|
32 | - 8 => 1, |
|
33 | - 9 => 1, |
|
34 | - 12 => 1, |
|
35 | - 13 => 1, |
|
36 | - 16 => 1, |
|
37 | - 17 => 1, |
|
38 | - 20 => 1, |
|
39 | - 21 => 1, |
|
40 | - 24 => 1, |
|
41 | - 25 => 1, |
|
42 | - 28 => 1, |
|
43 | - 29 => 1, |
|
44 | - 32 => 1, |
|
45 | - 33 => 1, |
|
46 | - 36 => 1, |
|
47 | - 37 => 1, |
|
48 | - 40 => 1, |
|
49 | - 41 => 1, |
|
50 | - 44 => 1, |
|
51 | - 45 => 1, |
|
52 | - 48 => 1, |
|
53 | - 49 => 1, |
|
54 | - 52 => 1, |
|
55 | - 53 => 1, |
|
56 | - 55 => 1, |
|
57 | - 56 => 1, |
|
58 | - ]; |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @return array<int, int> |
|
25 | + */ |
|
26 | + public function getErrorList() |
|
27 | + { |
|
28 | + return [ |
|
29 | + 3 => 1, |
|
30 | + 4 => 1, |
|
31 | + 5 => 2, |
|
32 | + 8 => 1, |
|
33 | + 9 => 1, |
|
34 | + 12 => 1, |
|
35 | + 13 => 1, |
|
36 | + 16 => 1, |
|
37 | + 17 => 1, |
|
38 | + 20 => 1, |
|
39 | + 21 => 1, |
|
40 | + 24 => 1, |
|
41 | + 25 => 1, |
|
42 | + 28 => 1, |
|
43 | + 29 => 1, |
|
44 | + 32 => 1, |
|
45 | + 33 => 1, |
|
46 | + 36 => 1, |
|
47 | + 37 => 1, |
|
48 | + 40 => 1, |
|
49 | + 41 => 1, |
|
50 | + 44 => 1, |
|
51 | + 45 => 1, |
|
52 | + 48 => 1, |
|
53 | + 49 => 1, |
|
54 | + 52 => 1, |
|
55 | + 53 => 1, |
|
56 | + 55 => 1, |
|
57 | + 56 => 1, |
|
58 | + ]; |
|
59 | 59 | |
60 | - }//end getErrorList() |
|
60 | + }//end getErrorList() |
|
61 | 61 | |
62 | 62 | |
63 | - /** |
|
64 | - * Returns the lines where warnings should occur. |
|
65 | - * |
|
66 | - * The key of the array should represent the line number and the value |
|
67 | - * should represent the number of warnings that should occur on that line. |
|
68 | - * |
|
69 | - * @return array<int, int> |
|
70 | - */ |
|
71 | - public function getWarningList() |
|
72 | - { |
|
73 | - return []; |
|
63 | + /** |
|
64 | + * Returns the lines where warnings should occur. |
|
65 | + * |
|
66 | + * The key of the array should represent the line number and the value |
|
67 | + * should represent the number of warnings that should occur on that line. |
|
68 | + * |
|
69 | + * @return array<int, int> |
|
70 | + */ |
|
71 | + public function getWarningList() |
|
72 | + { |
|
73 | + return []; |
|
74 | 74 | |
75 | - }//end getWarningList() |
|
75 | + }//end getWarningList() |
|
76 | 76 | |
77 | 77 | |
78 | 78 | }//end class |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class SpaceBeforeCastUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class SpaceBeforeCastUnitTest extends AbstractSniffUnitTest { |
|
16 | 15 | |
17 | 16 | |
18 | 17 | /** |
@@ -23,8 +22,7 @@ discard block |
||
23 | 22 | * |
24 | 23 | * @return array<int, int> |
25 | 24 | */ |
26 | - public function getErrorList() |
|
27 | - { |
|
25 | + public function getErrorList() { |
|
28 | 26 | return [ |
29 | 27 | 3 => 1, |
30 | 28 | 4 => 1, |
@@ -68,8 +66,7 @@ discard block |
||
68 | 66 | * |
69 | 67 | * @return array<int, int> |
70 | 68 | */ |
71 | - public function getWarningList() |
|
72 | - { |
|
69 | + public function getWarningList() { |
|
73 | 70 | return []; |
74 | 71 | |
75 | 72 | }//end getWarningList() |
@@ -64,7 +64,7 @@ |
||
64 | 64 | */ |
65 | 65 | public function getWarningList() |
66 | 66 | { |
67 | - return []; |
|
67 | + return [ ]; |
|
68 | 68 | |
69 | 69 | }//end getWarningList() |
70 | 70 |
@@ -15,34 +15,34 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @return array<int, int> |
|
25 | - */ |
|
26 | - public function getErrorList() |
|
27 | - { |
|
28 | - return []; |
|
29 | - |
|
30 | - }//end getErrorList() |
|
31 | - |
|
32 | - |
|
33 | - /** |
|
34 | - * Returns the lines where warnings should occur. |
|
35 | - * |
|
36 | - * The key of the array should represent the line number and the value |
|
37 | - * should represent the number of warnings that should occur on that line. |
|
38 | - * |
|
39 | - * @return array<int, int> |
|
40 | - */ |
|
41 | - public function getWarningList() |
|
42 | - { |
|
43 | - return [5 => 1]; |
|
44 | - |
|
45 | - }//end getWarningList() |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @return array<int, int> |
|
25 | + */ |
|
26 | + public function getErrorList() |
|
27 | + { |
|
28 | + return []; |
|
29 | + |
|
30 | + }//end getErrorList() |
|
31 | + |
|
32 | + |
|
33 | + /** |
|
34 | + * Returns the lines where warnings should occur. |
|
35 | + * |
|
36 | + * The key of the array should represent the line number and the value |
|
37 | + * should represent the number of warnings that should occur on that line. |
|
38 | + * |
|
39 | + * @return array<int, int> |
|
40 | + */ |
|
41 | + public function getWarningList() |
|
42 | + { |
|
43 | + return [5 => 1]; |
|
44 | + |
|
45 | + }//end getWarningList() |
|
46 | 46 | |
47 | 47 | |
48 | 48 | }//end class |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function getErrorList() |
27 | 27 | { |
28 | - return []; |
|
28 | + return [ ]; |
|
29 | 29 | |
30 | 30 | }//end getErrorList() |
31 | 31 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function getWarningList() |
42 | 42 | { |
43 | - return [5 => 1]; |
|
43 | + return [ 5 => 1 ]; |
|
44 | 44 | |
45 | 45 | }//end getWarningList() |
46 | 46 |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class NoSilencedErrorsUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class NoSilencedErrorsUnitTest extends AbstractSniffUnitTest { |
|
16 | 15 | |
17 | 16 | |
18 | 17 | /** |
@@ -23,8 +22,7 @@ discard block |
||
23 | 22 | * |
24 | 23 | * @return array<int, int> |
25 | 24 | */ |
26 | - public function getErrorList() |
|
27 | - { |
|
25 | + public function getErrorList() { |
|
28 | 26 | return []; |
29 | 27 | |
30 | 28 | }//end getErrorList() |
@@ -38,8 +36,7 @@ discard block |
||
38 | 36 | * |
39 | 37 | * @return array<int, int> |
40 | 38 | */ |
41 | - public function getWarningList() |
|
42 | - { |
|
39 | + public function getWarningList() { |
|
43 | 40 | return [5 => 1]; |
44 | 41 | |
45 | 42 | }//end getWarningList() |
@@ -15,54 +15,54 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @return array<int, int> |
|
25 | - */ |
|
26 | - public function getErrorList() |
|
27 | - { |
|
28 | - return [ |
|
29 | - 14 => 1, |
|
30 | - 15 => 1, |
|
31 | - 16 => 1, |
|
32 | - 17 => 1, |
|
33 | - 18 => 1, |
|
34 | - 21 => 4, |
|
35 | - 22 => 3, |
|
36 | - 23 => 3, |
|
37 | - 25 => 1, |
|
38 | - 26 => 2, |
|
39 | - 27 => 2, |
|
40 | - 32 => 4, |
|
41 | - 36 => 1, |
|
42 | - 37 => 1, |
|
43 | - 38 => 1, |
|
44 | - 39 => 1, |
|
45 | - 43 => 2, |
|
46 | - 44 => 1, |
|
47 | - 46 => 1, |
|
48 | - ]; |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @return array<int, int> |
|
25 | + */ |
|
26 | + public function getErrorList() |
|
27 | + { |
|
28 | + return [ |
|
29 | + 14 => 1, |
|
30 | + 15 => 1, |
|
31 | + 16 => 1, |
|
32 | + 17 => 1, |
|
33 | + 18 => 1, |
|
34 | + 21 => 4, |
|
35 | + 22 => 3, |
|
36 | + 23 => 3, |
|
37 | + 25 => 1, |
|
38 | + 26 => 2, |
|
39 | + 27 => 2, |
|
40 | + 32 => 4, |
|
41 | + 36 => 1, |
|
42 | + 37 => 1, |
|
43 | + 38 => 1, |
|
44 | + 39 => 1, |
|
45 | + 43 => 2, |
|
46 | + 44 => 1, |
|
47 | + 46 => 1, |
|
48 | + ]; |
|
49 | 49 | |
50 | - }//end getErrorList() |
|
50 | + }//end getErrorList() |
|
51 | 51 | |
52 | 52 | |
53 | - /** |
|
54 | - * Returns the lines where warnings should occur. |
|
55 | - * |
|
56 | - * The key of the array should represent the line number and the value |
|
57 | - * should represent the number of warnings that should occur on that line. |
|
58 | - * |
|
59 | - * @return array<int, int> |
|
60 | - */ |
|
61 | - public function getWarningList() |
|
62 | - { |
|
63 | - return []; |
|
53 | + /** |
|
54 | + * Returns the lines where warnings should occur. |
|
55 | + * |
|
56 | + * The key of the array should represent the line number and the value |
|
57 | + * should represent the number of warnings that should occur on that line. |
|
58 | + * |
|
59 | + * @return array<int, int> |
|
60 | + */ |
|
61 | + public function getWarningList() |
|
62 | + { |
|
63 | + return []; |
|
64 | 64 | |
65 | - }//end getWarningList() |
|
65 | + }//end getWarningList() |
|
66 | 66 | |
67 | 67 | |
68 | 68 | }//end class |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class LowerCaseTypeUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class LowerCaseTypeUnitTest extends AbstractSniffUnitTest { |
|
16 | 15 | |
17 | 16 | |
18 | 17 | /** |
@@ -23,8 +22,7 @@ discard block |
||
23 | 22 | * |
24 | 23 | * @return array<int, int> |
25 | 24 | */ |
26 | - public function getErrorList() |
|
27 | - { |
|
25 | + public function getErrorList() { |
|
28 | 26 | return [ |
29 | 27 | 14 => 1, |
30 | 28 | 15 => 1, |
@@ -58,8 +56,7 @@ discard block |
||
58 | 56 | * |
59 | 57 | * @return array<int, int> |
60 | 58 | */ |
61 | - public function getWarningList() |
|
62 | - { |
|
59 | + public function getWarningList() { |
|
63 | 60 | return []; |
64 | 61 | |
65 | 62 | }//end getWarningList() |
@@ -64,7 +64,7 @@ |
||
64 | 64 | */ |
65 | 65 | public function getWarningList() |
66 | 66 | { |
67 | - return []; |
|
67 | + return [ ]; |
|
68 | 68 | |
69 | 69 | }//end getWarningList() |
70 | 70 |
@@ -15,46 +15,46 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @return array<int, int> |
|
25 | - */ |
|
26 | - public function getErrorList() |
|
27 | - { |
|
28 | - return [ |
|
29 | - 10 => 3, |
|
30 | - 11 => 4, |
|
31 | - 12 => 1, |
|
32 | - 13 => 3, |
|
33 | - 14 => 7, |
|
34 | - 15 => 1, |
|
35 | - 19 => 1, |
|
36 | - 20 => 1, |
|
37 | - 21 => 1, |
|
38 | - 25 => 1, |
|
39 | - 28 => 1, |
|
40 | - ]; |
|
41 | - |
|
42 | - }//end getErrorList() |
|
43 | - |
|
44 | - |
|
45 | - /** |
|
46 | - * Returns the lines where warnings should occur. |
|
47 | - * |
|
48 | - * The key of the array should represent the line number and the value |
|
49 | - * should represent the number of warnings that should occur on that line. |
|
50 | - * |
|
51 | - * @return array<int, int> |
|
52 | - */ |
|
53 | - public function getWarningList() |
|
54 | - { |
|
55 | - return []; |
|
56 | - |
|
57 | - }//end getWarningList() |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @return array<int, int> |
|
25 | + */ |
|
26 | + public function getErrorList() |
|
27 | + { |
|
28 | + return [ |
|
29 | + 10 => 3, |
|
30 | + 11 => 4, |
|
31 | + 12 => 1, |
|
32 | + 13 => 3, |
|
33 | + 14 => 7, |
|
34 | + 15 => 1, |
|
35 | + 19 => 1, |
|
36 | + 20 => 1, |
|
37 | + 21 => 1, |
|
38 | + 25 => 1, |
|
39 | + 28 => 1, |
|
40 | + ]; |
|
41 | + |
|
42 | + }//end getErrorList() |
|
43 | + |
|
44 | + |
|
45 | + /** |
|
46 | + * Returns the lines where warnings should occur. |
|
47 | + * |
|
48 | + * The key of the array should represent the line number and the value |
|
49 | + * should represent the number of warnings that should occur on that line. |
|
50 | + * |
|
51 | + * @return array<int, int> |
|
52 | + */ |
|
53 | + public function getWarningList() |
|
54 | + { |
|
55 | + return []; |
|
56 | + |
|
57 | + }//end getWarningList() |
|
58 | 58 | |
59 | 59 | |
60 | 60 | }//end class |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class LowerCaseKeywordUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class LowerCaseKeywordUnitTest extends AbstractSniffUnitTest { |
|
16 | 15 | |
17 | 16 | |
18 | 17 | /** |
@@ -23,8 +22,7 @@ discard block |
||
23 | 22 | * |
24 | 23 | * @return array<int, int> |
25 | 24 | */ |
26 | - public function getErrorList() |
|
27 | - { |
|
25 | + public function getErrorList() { |
|
28 | 26 | return [ |
29 | 27 | 10 => 3, |
30 | 28 | 11 => 4, |
@@ -50,8 +48,7 @@ discard block |
||
50 | 48 | * |
51 | 49 | * @return array<int, int> |
52 | 50 | */ |
53 | - public function getWarningList() |
|
54 | - { |
|
51 | + public function getWarningList() { |
|
55 | 52 | return []; |
56 | 53 | |
57 | 54 | }//end getWarningList() |
@@ -64,7 +64,7 @@ |
||
64 | 64 | */ |
65 | 65 | public function getWarningList() |
66 | 66 | { |
67 | - return []; |
|
67 | + return [ ]; |
|
68 | 68 | |
69 | 69 | }//end getWarningList() |
70 | 70 |