@@ -31,7 +31,7 @@ |
||
31 | 31 | class ValidCamelCaseClassEndingWithNumber5 extends MyClass {} |
32 | 32 | class 12345 extends MyClass {} |
33 | 33 | |
34 | -class Testing{} |
|
34 | +class Testing {} |
|
35 | 35 | |
36 | 36 | class Base |
37 | 37 | { |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | - class ClassDeclaration |
|
5 | + class ClassDeclaration |
|
6 | 6 | { |
7 | 7 | |
8 | 8 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | { |
57 | 57 | }//end class |
58 | 58 | |
59 | -class ClassOne implements ClassFour ,ClassFive, ClassSix |
|
59 | +class ClassOne implements ClassFour, ClassFive, ClassSix |
|
60 | 60 | { |
61 | 61 | }//end class |
62 | 62 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | |
83 | 83 | }//end class |
84 | 84 | |
85 | -class File implements \Zend_Auth_Storage_Interface,\Zend_Auth_Storage, \Zend_Foo |
|
85 | +class File implements \Zend_Auth_Storage_Interface, \Zend_Auth_Storage, \Zend_Foo |
|
86 | 86 | { |
87 | 87 | } |
88 | 88 | |
@@ -107,4 +107,4 @@ discard block |
||
107 | 107 | class IncorrectCodeBeforeClosingBrace |
108 | 108 | { |
109 | 109 | |
110 | -echo phpinfo();} |
|
110 | +echo phpinfo(); } |
@@ -50,7 +50,7 @@ |
||
50 | 50 | 16 => 1, |
51 | 51 | 17 => 1, |
52 | 52 | 18 => 1, |
53 | - ); |
|
53 | + ); |
|
54 | 54 | |
55 | 55 | }//end getErrorList() |
56 | 56 |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | 30 => 1, |
57 | 57 | 37 => 2, |
58 | 58 | 39 => 2, |
59 | - ); |
|
60 | - break; |
|
59 | + ); |
|
60 | + break; |
|
61 | 61 | case 'ForLoopDeclarationUnitTest.js': |
62 | 62 | return array( |
63 | 63 | 6 => 2, |
@@ -69,8 +69,8 @@ discard block |
||
69 | 69 | 36 => 1, |
70 | 70 | 43 => 2, |
71 | 71 | 45 => 2, |
72 | - ); |
|
73 | - break; |
|
72 | + ); |
|
73 | + break; |
|
74 | 74 | default: |
75 | 75 | return array(); |
76 | 76 | break; |
@@ -45,35 +45,35 @@ |
||
45 | 45 | public function getErrorList($testFile='ForLoopDeclarationUnitTest.inc') |
46 | 46 | { |
47 | 47 | switch ($testFile) { |
48 | - case 'ForLoopDeclarationUnitTest.inc': |
|
49 | - return array( |
|
50 | - 8 => 2, |
|
51 | - 11 => 2, |
|
52 | - 14 => 2, |
|
53 | - 17 => 2, |
|
54 | - 21 => 6, |
|
55 | - 27 => 1, |
|
56 | - 30 => 1, |
|
57 | - 37 => 2, |
|
58 | - 39 => 2, |
|
59 | - ); |
|
60 | - break; |
|
61 | - case 'ForLoopDeclarationUnitTest.js': |
|
62 | - return array( |
|
63 | - 6 => 2, |
|
64 | - 9 => 2, |
|
65 | - 12 => 2, |
|
66 | - 15 => 2, |
|
67 | - 19 => 6, |
|
68 | - 33 => 1, |
|
69 | - 36 => 1, |
|
70 | - 43 => 2, |
|
71 | - 45 => 2, |
|
72 | - ); |
|
73 | - break; |
|
74 | - default: |
|
75 | - return array(); |
|
76 | - break; |
|
48 | + case 'ForLoopDeclarationUnitTest.inc': |
|
49 | + return array( |
|
50 | + 8 => 2, |
|
51 | + 11 => 2, |
|
52 | + 14 => 2, |
|
53 | + 17 => 2, |
|
54 | + 21 => 6, |
|
55 | + 27 => 1, |
|
56 | + 30 => 1, |
|
57 | + 37 => 2, |
|
58 | + 39 => 2, |
|
59 | + ); |
|
60 | + break; |
|
61 | + case 'ForLoopDeclarationUnitTest.js': |
|
62 | + return array( |
|
63 | + 6 => 2, |
|
64 | + 9 => 2, |
|
65 | + 12 => 2, |
|
66 | + 15 => 2, |
|
67 | + 19 => 6, |
|
68 | + 33 => 1, |
|
69 | + 36 => 1, |
|
70 | + 43 => 2, |
|
71 | + 45 => 2, |
|
72 | + ); |
|
73 | + break; |
|
74 | + default: |
|
75 | + return array(); |
|
76 | + break; |
|
77 | 77 | }//end switch |
78 | 78 | |
79 | 79 | }//end getErrorList() |
@@ -42,7 +42,7 @@ |
||
42 | 42 | * |
43 | 43 | * @return array<int, int> |
44 | 44 | */ |
45 | - public function getErrorList($testFile='ForLoopDeclarationUnitTest.inc') |
|
45 | + public function getErrorList($testFile = 'ForLoopDeclarationUnitTest.inc') |
|
46 | 46 | { |
47 | 47 | switch ($testFile) { |
48 | 48 | case 'ForLoopDeclarationUnitTest.inc': |
@@ -292,7 +292,7 @@ |
||
292 | 292 | return array( |
293 | 293 | 'whiz', |
294 | 294 | 'bang', |
295 | - ); |
|
295 | + ); |
|
296 | 296 | |
297 | 297 | case 2: |
298 | 298 | return helper_func( |
@@ -26,14 +26,14 @@ discard block |
||
26 | 26 | $case = '1'; |
27 | 27 | return '1'; |
28 | 28 | |
29 | -case '2': |
|
29 | + case '2': |
|
30 | 30 | case '3': |
31 | 31 | $case = '5'; |
32 | 32 | break; |
33 | 33 | |
34 | -case '4': |
|
35 | - $case = '4'; |
|
36 | -break; |
|
34 | + case '4': |
|
35 | + $case = '4'; |
|
36 | + break; |
|
37 | 37 | |
38 | 38 | default: |
39 | 39 | $case = null; |
@@ -49,19 +49,19 @@ discard block |
||
49 | 49 | |
50 | 50 | // PEAR style. |
51 | 51 | switch ($something) { |
52 | -case '1': |
|
53 | - $case = '1'; |
|
54 | - break; |
|
55 | -case '2': |
|
56 | -case '3': |
|
57 | - $case = '5'; |
|
58 | - break; |
|
59 | -case '4': |
|
60 | - $case = '4'; |
|
61 | - break; |
|
62 | -default: |
|
63 | - $case = null; |
|
64 | - break; |
|
52 | + case '1': |
|
53 | + $case = '1'; |
|
54 | + break; |
|
55 | + case '2': |
|
56 | + case '3': |
|
57 | + $case = '5'; |
|
58 | + break; |
|
59 | + case '4': |
|
60 | + $case = '4'; |
|
61 | + break; |
|
62 | + default: |
|
63 | + $case = null; |
|
64 | + break; |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | // Valid, but missing BREAKS. |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | Case '1' : |
86 | 86 | $case = '1'; |
87 | 87 | |
88 | -case '2': |
|
88 | + case '2': |
|
89 | 89 | case '3' : |
90 | 90 | $case = '5'; |
91 | 91 | |
@@ -140,21 +140,21 @@ discard block |
||
140 | 140 | } |
141 | 141 | |
142 | 142 | switch ($var) { |
143 | - case 'one': |
|
144 | - case 'two': |
|
145 | - break; |
|
143 | + case 'one': |
|
144 | + case 'two': |
|
145 | + break; |
|
146 | 146 | |
147 | - case 'three': |
|
148 | - // Nothing to do. |
|
149 | - break; |
|
147 | + case 'three': |
|
148 | + // Nothing to do. |
|
149 | + break; |
|
150 | 150 | |
151 | - case 'four': |
|
152 | - echo $hi; |
|
153 | - break; |
|
151 | + case 'four': |
|
152 | + echo $hi; |
|
153 | + break; |
|
154 | 154 | |
155 | - default: |
|
156 | - // No default. |
|
157 | - break; |
|
155 | + default: |
|
156 | + // No default. |
|
157 | + break; |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | switch ($var) { |
@@ -170,8 +170,8 @@ discard block |
||
170 | 170 | } |
171 | 171 | |
172 | 172 | switch ($name) { |
173 | - case "1": |
|
174 | - switch ($name2) { |
|
173 | + case "1": |
|
174 | + switch ($name2) { |
|
175 | 175 | case "1": |
176 | 176 | return true; |
177 | 177 | break; |
@@ -183,24 +183,24 @@ discard block |
||
183 | 183 | default: |
184 | 184 | // No default. |
185 | 185 | break; |
186 | - } |
|
186 | + } |
|
187 | 187 | break; |
188 | 188 | |
189 | - case "2": |
|
189 | + case "2": |
|
190 | 190 | switch ($name2) { |
191 | - case "1": |
|
192 | - return true; |
|
193 | - break; |
|
191 | + case "1": |
|
192 | + return true; |
|
193 | + break; |
|
194 | 194 | |
195 | - case "2": |
|
196 | - return true; |
|
197 | - break; |
|
195 | + case "2": |
|
196 | + return true; |
|
197 | + break; |
|
198 | 198 | |
199 | - default: |
|
200 | - // No default. |
|
201 | - break; |
|
199 | + default: |
|
200 | + // No default. |
|
201 | + break; |
|
202 | 202 | } |
203 | - break; |
|
203 | + break; |
|
204 | 204 | } |
205 | 205 | |
206 | 206 | switch ($name) { |
@@ -221,9 +221,9 @@ discard block |
||
221 | 221 | } |
222 | 222 | |
223 | 223 | switch ($name2) { |
224 | - default: |
|
225 | - // No default. |
|
226 | - break; |
|
224 | + default: |
|
225 | + // No default. |
|
226 | + break; |
|
227 | 227 | } |
228 | 228 | |
229 | 229 | switch ($foo) { |
@@ -258,15 +258,15 @@ discard block |
||
258 | 258 | } |
259 | 259 | |
260 | 260 | switch ($something) { |
261 | - case '1': |
|
262 | - $case = '1'; |
|
263 | - break; |
|
261 | + case '1': |
|
262 | + $case = '1'; |
|
263 | + break; |
|
264 | 264 | |
265 | - case '2': |
|
266 | - throw new Exception('message'); |
|
265 | + case '2': |
|
266 | + throw new Exception('message'); |
|
267 | 267 | |
268 | - default: |
|
269 | - throw new Exception('message'); |
|
268 | + default: |
|
269 | + throw new Exception('message'); |
|
270 | 270 | } |
271 | 271 | |
272 | 272 | switch ($something) { |
@@ -280,9 +280,9 @@ discard block |
||
280 | 280 | } |
281 | 281 | |
282 | 282 | switch ($foo) { |
283 | - case '1': |
|
284 | - return; // comment |
|
285 | - break; |
|
283 | + case '1': |
|
284 | + return; // comment |
|
285 | + break; |
|
286 | 286 | |
287 | 287 | } |
288 | 288 | |
@@ -305,13 +305,13 @@ discard block |
||
305 | 305 | } |
306 | 306 | |
307 | 307 | switch ($foo) { |
308 | - case 'bar': |
|
309 | - throw new \Exception( |
|
310 | - 'bar' |
|
311 | - ); |
|
312 | - |
|
313 | - default: |
|
314 | - throw new \Exception( |
|
315 | - 'bar' |
|
316 | - ); |
|
308 | + case 'bar': |
|
309 | + throw new \Exception( |
|
310 | + 'bar' |
|
311 | + ); |
|
312 | + |
|
313 | + default: |
|
314 | + throw new \Exception( |
|
315 | + 'bar' |
|
316 | + ); |
|
317 | 317 | } |
@@ -50,7 +50,7 @@ |
||
50 | 50 | 21 => 7, |
51 | 51 | 26 => 2, |
52 | 52 | 28 => 2, |
53 | - ); |
|
53 | + ); |
|
54 | 54 | |
55 | 55 | }//end getErrorList() |
56 | 56 |
@@ -5,37 +5,37 @@ |
||
5 | 5 | } |
6 | 6 | |
7 | 7 | // Invalid. |
8 | -for ( $i = 0; $i < 10; $i++ ) { |
|
8 | +for ($i = 0; $i < 10; $i++) { |
|
9 | 9 | } |
10 | 10 | |
11 | -for ($i = 0; $i < 10; $i++) { |
|
11 | +for ($i = 0; $i < 10; $i++) { |
|
12 | 12 | } |
13 | 13 | |
14 | -for ($i = 0 ; $i < 10 ; $i++) { |
|
14 | +for ($i = 0; $i < 10; $i++) { |
|
15 | 15 | } |
16 | 16 | |
17 | -for ($i = 0;$i < 10;$i++) { |
|
17 | +for ($i = 0; $i < 10; $i++) { |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | // The works. |
21 | -for ( $i = 0 ; $i < 10 ; $i++ ) { |
|
21 | +for ($i = 0; $i < 10; $i++) { |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | for ($i = 0; $i < 10;) { |
25 | 25 | } |
26 | 26 | |
27 | -for ($i = 0; $i < 10; ) { |
|
27 | +for ($i = 0; $i < 10;) { |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | for ($i = 0; ; $i++) { |
31 | 31 | } |
32 | -for ($i = 0;; $i++) { |
|
32 | +for ($i = 0; ; $i++) { |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | // @codingStandardsChangeSetting Squiz.ControlStructures.ForLoopDeclaration requiredSpacesAfterOpen 1 |
36 | 36 | // @codingStandardsChangeSetting Squiz.ControlStructures.ForLoopDeclaration requiredSpacesBeforeClose 1 |
37 | 37 | for ($i = 0; $i < 10; $i++) {} |
38 | -for ( $i = 0; $i < 10; $i++ ) {} |
|
39 | -for ( $i = 0; $i < 10; $i++ ) {} |
|
38 | +for ($i = 0; $i < 10; $i++) {} |
|
39 | +for ($i = 0; $i < 10; $i++) {} |
|
40 | 40 | // @codingStandardsChangeSetting Squiz.ControlStructures.ForLoopDeclaration requiredSpacesAfterOpen 0 |
41 | 41 | // @codingStandardsChangeSetting Squiz.ControlStructures.ForLoopDeclaration requiredSpacesBeforeClose 0 |
@@ -14,11 +14,11 @@ |
||
14 | 14 | : 'positive'); |
15 | 15 | |
16 | 16 | $args = array( |
17 | - '"'.$this->id.'"', |
|
18 | - '"'.$this->stepInfo['title'].'"', |
|
19 | - '"'.((isset($this->stepInfo['description']) === TRUE) ? $this->stepInfo['description'] : '').'"', |
|
20 | - '"'.(isset($this->stepInfo['description']) === TRUE ? $this->stepInfo['description'] : '').'"', |
|
21 | - '"'.$this->stepInfo['title'].'"', |
|
17 | + '"'.$this->id.'"', |
|
18 | + '"'.$this->stepInfo['title'].'"', |
|
19 | + '"'.((isset($this->stepInfo['description']) === TRUE) ? $this->stepInfo['description'] : '').'"', |
|
20 | + '"'.(isset($this->stepInfo['description']) === TRUE ? $this->stepInfo['description'] : '').'"', |
|
21 | + '"'.$this->stepInfo['title'].'"', |
|
22 | 22 | ); |
23 | 23 | |
24 | 24 | echo (TRUE)?'Hello':'Bye'; |
@@ -2,12 +2,12 @@ discard block |
||
2 | 2 | |
3 | 3 | echo 'var is '.(($var < 0) ? 'negative' : 'positive'); |
4 | 4 | echo 'var is '.($var < 0 ? 'negative' : 'positive'); |
5 | -echo 'var is '.(($var < 0) ? 'negative' :'positive'); |
|
6 | -echo 'var is '.(($var < 0) ? 'negative': 'positive'); |
|
7 | -echo 'var is '.(($var < 0) ? 'negative' : 'positive'); |
|
8 | -echo 'var is '.(($var < 0) ? 'negative' : 'positive'); |
|
9 | -echo 'var is '.(($var < 0) ? 'negative' : 'positive'); |
|
10 | -echo 'var is '.(($var < 0) ? 'negative' : 'positive'); |
|
5 | +echo 'var is '.(($var < 0) ? 'negative' : 'positive'); |
|
6 | +echo 'var is '.(($var < 0) ? 'negative' : 'positive'); |
|
7 | +echo 'var is '.(($var < 0) ? 'negative' : 'positive'); |
|
8 | +echo 'var is '.(($var < 0) ? 'negative' : 'positive'); |
|
9 | +echo 'var is '.(($var < 0) ? 'negative' : 'positive'); |
|
10 | +echo 'var is '.(($var < 0) ? 'negative' : 'positive'); |
|
11 | 11 | |
12 | 12 | echo 'var is '.(($var < 0) |
13 | 13 | ? 'negative' |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | '"'.$this->stepInfo['title'].'"', |
22 | 22 | ); |
23 | 23 | |
24 | -echo (TRUE)?'Hello':'Bye'; |
|
24 | +echo (TRUE) ? 'Hello' : 'Bye'; |
|
25 | 25 | |
26 | 26 | $array = array( |
27 | 27 | 'one' => ($test == 1) ? true : false, |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | 'three' => (($test == 1) ? true : false) |
30 | 30 | ); |
31 | 31 | $var = ($test == 1) ? true : false; |
32 | -$var = (myFunc(1,2,3) == 1) ? true : false; |
|
32 | +$var = (myFunc(1, 2, 3) == 1) ? true : false; |
|
33 | 33 | |
34 | 34 | set('config', function() { |
35 | 35 | $foo = ($bar === "on") ? "1" : "2"; |
@@ -85,7 +85,7 @@ |
||
85 | 85 | 266 => 1, |
86 | 86 | 282 => 1, |
87 | 87 | 284 => 2, |
88 | - ); |
|
88 | + ); |
|
89 | 89 | |
90 | 90 | }//end getErrorList() |
91 | 91 |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | * |
43 | 43 | * @return array<int, int> |
44 | 44 | */ |
45 | - public function getErrorList($testFile='SwitchDeclarationUnitTest.inc') |
|
45 | + public function getErrorList($testFile = 'SwitchDeclarationUnitTest.inc') |
|
46 | 46 | { |
47 | 47 | return array( |
48 | 48 | 27 => 1, |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | * |
101 | 101 | * @return array<int, int> |
102 | 102 | */ |
103 | - public function getWarningList($testFile='SwitchDeclarationUnitTest.inc') |
|
103 | + public function getWarningList($testFile = 'SwitchDeclarationUnitTest.inc') |
|
104 | 104 | { |
105 | 105 | if ($testFile === 'SwitchDeclarationUnitTest.js') { |
106 | 106 | return array(273 => 1); |