@@ -2,25 +2,25 @@ discard block |
||
2 | 2 | |
3 | 3 | class ExampleClass |
4 | 4 | { |
5 | - function exampleFunction() {} |
|
5 | + function exampleFunction() {} |
|
6 | 6 | |
7 | 7 | } |
8 | 8 | |
9 | - $o = <<<EOF |
|
9 | + $o = <<<EOF |
|
10 | 10 | this is some text |
11 | 11 | this is some text |
12 | 12 | EOF; |
13 | 13 | |
14 | 14 | $correctVar = true; |
15 | - $correctVar = false; |
|
15 | + $correctVar = false; |
|
16 | 16 | |
17 | 17 | class MyClass |
18 | 18 | { |
19 | 19 | /** |
20 | - * Short description. |
|
21 | - * |
|
22 | - * @return void |
|
23 | - */ |
|
20 | + * Short description. |
|
21 | + * |
|
22 | + * @return void |
|
23 | + */ |
|
24 | 24 | public function myFunction() { } |
25 | 25 | } |
26 | 26 | |
@@ -28,9 +28,9 @@ discard block |
||
28 | 28 | there'; |
29 | 29 | |
30 | 30 | $foo = array( |
31 | - 'Česká republika' => 'Czech republic', |
|
32 | - 'România' => 'Romania', |
|
33 | - 'Magyarország' => 'Hungary', |
|
31 | + 'Česká republika' => 'Czech republic', |
|
32 | + 'România' => 'Romania', |
|
33 | + 'Magyarország' => 'Hungary', |
|
34 | 34 | ); |
35 | 35 | |
36 | 36 | $var = "$hello $there"; |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | class ExampleClass |
4 | 4 | { |
5 | - function exampleFunction() {} |
|
5 | + function exampleFunction() {} |
|
6 | 6 | |
7 | 7 | } |
8 | 8 |
@@ -11,29 +11,29 @@ |
||
11 | 11 | this is some text |
12 | 12 | EOF; |
13 | 13 | |
14 | - $correctVar = false; |
|
14 | + $correctVar = false; |
|
15 | 15 | $correctVar = true; |
16 | 16 | |
17 | 17 | // Indent with spaces is not allowed |
18 | - $hello = array(); |
|
19 | - $world = ''; |
|
18 | + $hello = array(); |
|
19 | + $world = ''; |
|
20 | 20 | // here the indention is mixed with tabs and spaces |
21 | 21 | // [tab][space][space][space][tab]return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>"; |
22 | - return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>"; |
|
22 | + return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>"; |
|
23 | 23 | // [space][space][space][tab]return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>"; |
24 | - return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>"; |
|
24 | + return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>"; |
|
25 | 25 | // Doc comments are indent with tabs and one space |
26 | 26 | //[tab]/** |
27 | 27 | //[tab][space]* |
28 | - /** |
|
29 | - * CVS revision for HTTP headers. |
|
28 | + /** |
|
29 | + * CVS revision for HTTP headers. |
|
30 | 30 | * |
31 | - * @var string |
|
32 | - * @access private |
|
33 | - */ |
|
34 | - /** |
|
31 | + * @var string |
|
32 | + * @access private |
|
33 | + */ |
|
34 | + /** |
|
35 | 35 | * |
36 | - */ |
|
36 | + */ |
|
37 | 37 | |
38 | 38 | $str = 'hello |
39 | 39 | there'; |
@@ -4,30 +4,30 @@ discard block |
||
4 | 4 | class Test { |
5 | 5 | function __construct() |
6 | 6 | { |
7 | - $this->hello(); |
|
7 | + $this->hello(); |
|
8 | 8 | } |
9 | 9 | |
10 | - function hello() |
|
10 | + function hello() |
|
11 | 11 | { |
12 | 12 | echo 'hello'; |
13 | 13 | }//end hello() |
14 | 14 | |
15 | 15 | function hello2() |
16 | 16 | { |
17 | - if (TRUE) { |
|
17 | + if (TRUE) { |
|
18 | 18 | echo 'hello'; // no error here as its more than 4 spaces. |
19 | 19 | } else { |
20 | 20 | echo 'bye'; |
21 | 21 | } |
22 | 22 | |
23 | 23 | while (TRUE) { |
24 | - echo 'hello'; |
|
25 | - } |
|
24 | + echo 'hello'; |
|
25 | + } |
|
26 | 26 | |
27 | - do { |
|
28 | - echo 'hello'; |
|
29 | - } while (TRUE); |
|
30 | - } |
|
27 | + do { |
|
28 | + echo 'hello'; |
|
29 | + } while (TRUE); |
|
30 | + } |
|
31 | 31 | |
32 | 32 | function hello3() |
33 | 33 | { |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | */ |
124 | 124 | |
125 | 125 | /** This is a T_DOC_COMMENT |
126 | - */ |
|
126 | + */ |
|
127 | 127 | |
128 | 128 | /* |
129 | 129 | This T_COMMENT has a newline in it. |
@@ -136,14 +136,14 @@ discard block |
||
136 | 136 | |
137 | 137 | // no errors below. |
138 | 138 | $array = array( |
139 | - 'this', |
|
140 | - 'that' => array( |
|
141 | - 'hello', |
|
142 | - 'hello again' => array( |
|
143 | - 'hello', |
|
144 | - ), |
|
139 | + 'this', |
|
140 | + 'that' => array( |
|
141 | + 'hello', |
|
142 | + 'hello again' => array( |
|
143 | + 'hello', |
|
144 | + ), |
|
145 | 145 | ), |
146 | - ); |
|
146 | + ); |
|
147 | 147 | } |
148 | 148 | } |
149 | 149 | |
@@ -221,8 +221,8 @@ discard block |
||
221 | 221 | { |
222 | 222 | /* taken from http://de3.php.net/manual/en/reserved.php */ |
223 | 223 | # $m[] = 'declare'; |
224 | - /* taken from http://de3.php.net/manual/en/reserved.php */ |
|
225 | - # $m[] = 'declare'; |
|
224 | + /* taken from http://de3.php.net/manual/en/reserved.php */ |
|
225 | + # $m[] = 'declare'; |
|
226 | 226 | } |
227 | 227 | |
228 | 228 | foreach ($elements as $element) { |
@@ -383,18 +383,18 @@ discard block |
||
383 | 383 | ); |
384 | 384 | |
385 | 385 | some_function( |
386 | - function() { |
|
387 | - $a = 403; |
|
388 | - if ($a === 404) { |
|
389 | - $a = 403; |
|
390 | - } |
|
386 | + function() { |
|
387 | + $a = 403; |
|
388 | + if ($a === 404) { |
|
389 | + $a = 403; |
|
390 | + } |
|
391 | 391 | } |
392 | 392 | ); |
393 | 393 | |
394 | 394 | $myFunction = function() { |
395 | 395 | $a = 403; |
396 | 396 | if ($a === 404) { |
397 | - $a = 403; |
|
397 | + $a = 403; |
|
398 | 398 | } |
399 | 399 | } |
400 | 400 | |
@@ -416,8 +416,8 @@ discard block |
||
416 | 416 | public static function myFunction() |
417 | 417 | { |
418 | 418 | if (empty($keywords) === FALSE) { |
419 | - $keywords = 'foo'; |
|
420 | - $existing = 'foo'; |
|
419 | + $keywords = 'foo'; |
|
420 | + $existing = 'foo'; |
|
421 | 421 | } |
422 | 422 | |
423 | 423 | return $keywords; |
@@ -657,7 +657,7 @@ discard block |
||
657 | 657 | ]; |
658 | 658 | |
659 | 659 | if ($foo) { |
660 | - ?> |
|
660 | + ?> |
|
661 | 661 | </p> |
662 | 662 | <?php |
663 | 663 | } |
@@ -665,12 +665,12 @@ discard block |
||
665 | 665 | function foo() |
666 | 666 | { |
667 | 667 | $failingTests[$testName][] = array( |
668 | - 'comment' => self::_replaceKeywords($failingComment, $result), |
|
669 | - 'screenshot' => Test::getScreenshotPath( |
|
670 | - $projectid, |
|
671 | - $result['class_name'], |
|
672 | - ), |
|
673 | - ); |
|
668 | + 'comment' => self::_replaceKeywords($failingComment, $result), |
|
669 | + 'screenshot' => Test::getScreenshotPath( |
|
670 | + $projectid, |
|
671 | + $result['class_name'], |
|
672 | + ), |
|
673 | + ); |
|
674 | 674 | |
675 | 675 | } |
676 | 676 | |
@@ -737,13 +737,13 @@ discard block |
||
737 | 737 | |
738 | 738 | public $scopeOpeners = array( |
739 | 739 | T_CASE => array( |
740 | - 'end' => array( |
|
740 | + 'end' => array( |
|
741 | 741 | T_BREAK => T_BREAK, |
742 | 742 | T_RETURN => T_RETURN, |
743 | - ), |
|
744 | - 'strict' => true, |
|
745 | - ), |
|
746 | - ); |
|
743 | + ), |
|
744 | + 'strict' => true, |
|
745 | + ), |
|
746 | + ); |
|
747 | 747 | } |
748 | 748 | |
749 | 749 | echo $string-> |
@@ -827,12 +827,12 @@ discard block |
||
827 | 827 | foo(); |
828 | 828 | |
829 | 829 | array( |
830 | - 'key1' => function ($bar) { |
|
830 | + 'key1' => function ($bar) { |
|
831 | 831 | return $bar; |
832 | - }, |
|
833 | - 'key2' => function ($foo) { |
|
832 | + }, |
|
833 | + 'key2' => function ($foo) { |
|
834 | 834 | return $foo; |
835 | - }, |
|
835 | + }, |
|
836 | 836 | ); |
837 | 837 | |
838 | 838 | ?> |
@@ -855,7 +855,7 @@ discard block |
||
855 | 855 | |
856 | 856 | class C0 |
857 | 857 | { |
858 | - public function m0() |
|
858 | + public function m0() |
|
859 | 859 | { |
860 | 860 | } |
861 | 861 |
@@ -254,11 +254,11 @@ discard block |
||
254 | 254 | } |
255 | 255 | |
256 | 256 | switch ($foo) { |
257 | - case 1: |
|
258 | - switch ($bar) { |
|
257 | + case 1: |
|
258 | + switch ($bar) { |
|
259 | 259 | default: |
260 | 260 | echo $string{1}; |
261 | - } |
|
261 | + } |
|
262 | 262 | break; |
263 | 263 | } |
264 | 264 | |
@@ -274,25 +274,25 @@ discard block |
||
274 | 274 | } |
275 | 275 | |
276 | 276 | switch ($foo) { |
277 | - case 1: |
|
278 | - switch ($bar) { |
|
279 | - default: |
|
280 | - if ($something) { |
|
281 | - echo $string{1}; |
|
282 | - } else if ($else) { |
|
283 | - switch ($else) { |
|
277 | + case 1: |
|
278 | + switch ($bar) { |
|
284 | 279 | default: |
280 | + if ($something) { |
|
281 | + echo $string{1}; |
|
282 | + } else if ($else) { |
|
283 | + switch ($else) { |
|
284 | + default: |
|
285 | + } |
|
285 | 286 | } |
286 | - } |
|
287 | 287 | } |
288 | 288 | break; |
289 | 289 | } |
290 | 290 | |
291 | 291 | switch ($name) { |
292 | - case "1": |
|
293 | - case "2": |
|
294 | - case "3": |
|
295 | - return true; |
|
292 | + case "1": |
|
293 | + case "2": |
|
294 | + case "3": |
|
295 | + return true; |
|
296 | 296 | } |
297 | 297 | |
298 | 298 | switch ($name) { |
@@ -314,16 +314,16 @@ discard block |
||
314 | 314 | } |
315 | 315 | |
316 | 316 | switch ($name) { |
317 | - case "1": |
|
318 | - switch ($name2) { |
|
317 | + case "1": |
|
318 | + switch ($name2) { |
|
319 | 319 | case "1": |
320 | 320 | break; |
321 | 321 | case "2": |
322 | 322 | break; |
323 | - } |
|
324 | - break; |
|
325 | - case "2": |
|
323 | + } |
|
326 | 324 | break; |
325 | + case "2": |
|
326 | + break; |
|
327 | 327 | } |
328 | 328 | |
329 | 329 | switch (true) { |
@@ -339,17 +339,17 @@ discard block |
||
339 | 339 | } |
340 | 340 | |
341 | 341 | switch (true) { |
342 | - case true: { |
|
343 | - echo 'hi'; |
|
344 | - } |
|
345 | - // No break here. |
|
346 | - case false: |
|
347 | - case true: |
|
348 | - case null:{ |
|
349 | - echo 'hi'; |
|
342 | + case true: { |
|
343 | + echo 'hi'; |
|
344 | + } |
|
345 | + // No break here. |
|
346 | + case false: |
|
347 | + case true: |
|
348 | + case null:{ |
|
350 | 349 | echo 'hi'; |
351 | - } |
|
352 | - break; |
|
350 | + echo 'hi'; |
|
351 | + } |
|
352 | + break; |
|
353 | 353 | } |
354 | 354 | |
355 | 355 | switch (true) { |
@@ -910,29 +910,29 @@ discard block |
||
910 | 910 | } |
911 | 911 | |
912 | 912 | switch ($foo) { |
913 | - case 1: |
|
914 | - return array(); |
|
915 | - case 2: |
|
916 | - return ''; |
|
917 | - case 3: |
|
918 | - return $function(); |
|
919 | - case 4: |
|
920 | - return $functionCall($param[0]); |
|
921 | - case 5: |
|
922 | - return array() + array(); // Array Merge |
|
923 | - case 6: |
|
924 | - // String connect |
|
925 | - return $functionReturningString('') . $functionReturningString(array()); |
|
926 | - case 7: |
|
927 | - return functionCall( |
|
928 | - $withMultiLineParam[0], |
|
929 | - array(), |
|
930 | - $functionReturningString( |
|
931 | - $withMultiLineParam[1] |
|
932 | - ) |
|
933 | - ); |
|
934 | - case 8: |
|
935 | - return $param[0][0]; |
|
913 | + case 1: |
|
914 | + return array(); |
|
915 | + case 2: |
|
916 | + return ''; |
|
917 | + case 3: |
|
918 | + return $function(); |
|
919 | + case 4: |
|
920 | + return $functionCall($param[0]); |
|
921 | + case 5: |
|
922 | + return array() + array(); // Array Merge |
|
923 | + case 6: |
|
924 | + // String connect |
|
925 | + return $functionReturningString('') . $functionReturningString(array()); |
|
926 | + case 7: |
|
927 | + return functionCall( |
|
928 | + $withMultiLineParam[0], |
|
929 | + array(), |
|
930 | + $functionReturningString( |
|
931 | + $withMultiLineParam[1] |
|
932 | + ) |
|
933 | + ); |
|
934 | + case 8: |
|
935 | + return $param[0][0]; |
|
936 | 936 | } |
937 | 937 | |
938 | 938 | class Test { |
@@ -948,10 +948,10 @@ discard block |
||
948 | 948 | } |
949 | 949 | |
950 | 950 | switch ($x) { |
951 | - case 1: |
|
952 | - return [1]; |
|
953 | - default: |
|
954 | - return [2]; |
|
951 | + case 1: |
|
952 | + return [1]; |
|
953 | + default: |
|
954 | + return [2]; |
|
955 | 955 | } |
956 | 956 | |
957 | 957 | switch ($foo) { |
@@ -1024,16 +1024,16 @@ discard block |
||
1024 | 1024 | } |
1025 | 1025 | |
1026 | 1026 | switch ($parameter) { |
1027 | - case null: |
|
1028 | - return [ |
|
1029 | - 'foo' => in_array( |
|
1030 | - 'foo', |
|
1031 | - [] |
|
1032 | - ), |
|
1033 | - ]; |
|
1027 | + case null: |
|
1028 | + return [ |
|
1029 | + 'foo' => in_array( |
|
1030 | + 'foo', |
|
1031 | + [] |
|
1032 | + ), |
|
1033 | + ]; |
|
1034 | 1034 | |
1035 | - default: |
|
1036 | - return []; |
|
1035 | + default: |
|
1036 | + return []; |
|
1037 | 1037 | } |
1038 | 1038 | |
1039 | 1039 | class SomeClass |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | if ($last >= 3 && |
167 | 167 | $ts[0]['token'] != T_CLASS && |
168 | 168 | $ts[$last - 2]['token'] == T_OBJECT_OPERATOR && |
169 | - $ts[$last - 3]['token'] == T_VARIABLE ) { |
|
169 | + $ts[$last - 3]['token'] == T_VARIABLE) { |
|
170 | 170 | |
171 | 171 | |
172 | 172 | if (true) { |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | function c() |
367 | 367 | { |
368 | 368 | $this->doSomething( |
369 | - function () { |
|
369 | + function() { |
|
370 | 370 | echo 123; |
371 | 371 | } |
372 | 372 | ); |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | }//end class |
428 | 428 | |
429 | 429 | $var = call_user_func( |
430 | - $new_var = function () use (&$a) { |
|
430 | + $new_var = function() use (&$a) { |
|
431 | 431 | if ($a > 0) { |
432 | 432 | return $a++; |
433 | 433 | } else { |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | { |
443 | 443 | return array( |
444 | 444 | 'functions' => Array( |
445 | - 'function1' => function ($a, $b, $c) { |
|
445 | + 'function1' => function($a, $b, $c) { |
|
446 | 446 | $a = $b + $c; |
447 | 447 | $b = $c / 2; |
448 | 448 | return Array($a, $b, $c); |
@@ -512,7 +512,7 @@ discard block |
||
512 | 512 | <?php } |
513 | 513 | |
514 | 514 | $list = [ |
515 | - 'fn' => function ($a) { |
|
515 | + 'fn' => function($a) { |
|
516 | 516 | if ($a === true) { |
517 | 517 | echo 'hi'; |
518 | 518 | } |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | ]; |
521 | 521 | |
522 | 522 | $list = [ |
523 | - 'fn' => function ($a) { |
|
523 | + 'fn' => function($a) { |
|
524 | 524 | if ($a === true) { |
525 | 525 | echo 'hi'; |
526 | 526 | } |
@@ -576,11 +576,11 @@ discard block |
||
576 | 576 | $array |
577 | 577 | ); |
578 | 578 | |
579 | -function foo(){return function(){};} |
|
579 | +function foo() {return function() {};} |
|
580 | 580 | |
581 | 581 | $mockedDatabase->expects($this->at(2)) |
582 | 582 | ->with($this->callback( |
583 | - function ($subject) |
|
583 | + function($subject) |
|
584 | 584 | { |
585 | 585 | } |
586 | 586 | ) |
@@ -593,7 +593,7 @@ discard block |
||
593 | 593 | ->appaend('bar') |
594 | 594 | ->appaend('baz') |
595 | 595 | ->outputUsing( |
596 | - function () |
|
596 | + function() |
|
597 | 597 | { |
598 | 598 | } |
599 | 599 | ); |
@@ -643,13 +643,13 @@ discard block |
||
643 | 643 | $var = [ |
644 | 644 | [ |
645 | 645 | '1' => |
646 | - function () { |
|
646 | + function() { |
|
647 | 647 | return true; |
648 | 648 | }, |
649 | 649 | ], |
650 | 650 | [ |
651 | 651 | '1' => |
652 | - function () { |
|
652 | + function() { |
|
653 | 653 | return true; |
654 | 654 | }, |
655 | 655 | '2' => true, |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | $this->mockedDatabase |
678 | 678 | ->with( |
679 | 679 | $this->callback( |
680 | - function () { |
|
680 | + function() { |
|
681 | 681 | return; |
682 | 682 | } |
683 | 683 | ) |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | static::where($c) |
693 | 693 | ->where($c) |
694 | 694 | ->where( |
695 | - function ($d) { |
|
695 | + function($d) { |
|
696 | 696 | $d->whereNull(); |
697 | 697 | $d->orWhere(); |
698 | 698 | } |
@@ -714,7 +714,7 @@ discard block |
||
714 | 714 | |
715 | 715 | $foo->load( |
716 | 716 | array( |
717 | - 'bar' => function ($baz) { |
|
717 | + 'bar' => function($baz) { |
|
718 | 718 | $baz->call(); |
719 | 719 | } |
720 | 720 | ) |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | |
725 | 725 | $foo = array_unique( |
726 | 726 | array_map( |
727 | - function ($entry) { |
|
727 | + function($entry) { |
|
728 | 728 | return $entry * 2; |
729 | 729 | }, |
730 | 730 | array() |
@@ -751,12 +751,12 @@ discard block |
||
751 | 751 | appaend('bar')-> |
752 | 752 | appaend('baz')-> |
753 | 753 | outputUsing( |
754 | - function () |
|
754 | + function() |
|
755 | 755 | { |
756 | 756 | } |
757 | 757 | ); |
758 | 758 | |
759 | -$str = 'the items I want to show are: ' . |
|
759 | +$str = 'the items I want to show are: '. |
|
760 | 760 | implode( |
761 | 761 | ', ', |
762 | 762 | array('a', 'b', 'c') |
@@ -771,14 +771,14 @@ discard block |
||
771 | 771 | echo $str; |
772 | 772 | |
773 | 773 | bar([ |
774 | - 'foo' => foo(function () { |
|
774 | + 'foo' => foo(function() { |
|
775 | 775 | return 'foo'; |
776 | 776 | }) |
777 | 777 | ]); |
778 | 778 | |
779 | 779 | $domains = array_unique( |
780 | 780 | array_map( |
781 | - function ($url) { |
|
781 | + function($url) { |
|
782 | 782 | $urlObject = new \Purl\Url($url); |
783 | 783 | return $urlObject->registerableDomain; |
784 | 784 | }, |
@@ -827,10 +827,10 @@ discard block |
||
827 | 827 | foo(); |
828 | 828 | |
829 | 829 | array( |
830 | - 'key1' => function ($bar) { |
|
830 | + 'key1' => function($bar) { |
|
831 | 831 | return $bar; |
832 | 832 | }, |
833 | - 'key2' => function ($foo) { |
|
833 | + 'key2' => function($foo) { |
|
834 | 834 | return $foo; |
835 | 835 | }, |
836 | 836 | ); |
@@ -875,7 +875,7 @@ discard block |
||
875 | 875 | |
876 | 876 | } |
877 | 877 | |
878 | -declare(ticks=1) { |
|
878 | +declare(ticks = 1) { |
|
879 | 879 | echo 'foo'; |
880 | 880 | } |
881 | 881 | |
@@ -922,7 +922,7 @@ discard block |
||
922 | 922 | return array() + array(); // Array Merge |
923 | 923 | case 6: |
924 | 924 | // String connect |
925 | - return $functionReturningString('') . $functionReturningString(array()); |
|
925 | + return $functionReturningString('').$functionReturningString(array()); |
|
926 | 926 | case 7: |
927 | 927 | return functionCall( |
928 | 928 | $withMultiLineParam[0], |
@@ -940,7 +940,7 @@ discard block |
||
940 | 940 | public |
941 | 941 | $foo |
942 | 942 | ,$bar |
943 | - ,$baz = [ ] |
|
943 | + ,$baz = [] |
|
944 | 944 | ; |
945 | 945 | |
946 | 946 | public function wtfindent() { |
@@ -956,7 +956,7 @@ discard block |
||
956 | 956 | |
957 | 957 | switch ($foo) { |
958 | 958 | case self::FOO: |
959 | - return $this->bar($gfoo, function ($id) { |
|
959 | + return $this->bar($gfoo, function($id) { |
|
960 | 960 | return FOO::bar($id); |
961 | 961 | }, $values); |
962 | 962 | case self::BAR: |
@@ -1040,9 +1040,9 @@ discard block |
||
1040 | 1040 | { |
1041 | 1041 | public function someFunc() |
1042 | 1042 | { |
1043 | - a(function () { |
|
1043 | + a(function() { |
|
1044 | 1044 | echo "a"; |
1045 | - })->b(function () { |
|
1045 | + })->b(function() { |
|
1046 | 1046 | echo "b"; |
1047 | 1047 | }); |
1048 | 1048 | |
@@ -1084,7 +1084,7 @@ discard block |
||
1084 | 1084 | } |
1085 | 1085 | |
1086 | 1086 | $foo = foo( |
1087 | - function () { |
|
1087 | + function() { |
|
1088 | 1088 | $foo->debug( |
1089 | 1089 | $a, |
1090 | 1090 | $b |
@@ -1097,7 +1097,7 @@ discard block |
||
1097 | 1097 | ); |
1098 | 1098 | |
1099 | 1099 | $foo = foo( |
1100 | - function () { |
|
1100 | + function() { |
|
1101 | 1101 | $foo->debug( |
1102 | 1102 | $a, |
1103 | 1103 | $b |
@@ -61,8 +61,12 @@ discard block |
||
61 | 61 | public function open() |
62 | 62 | { |
63 | 63 | // Some inline stuff that shouldn't error |
64 | - if (TRUE) echo 'hello'; |
|
65 | - foreach ($tokens as $token) echo $token; |
|
64 | + if (TRUE) { |
|
65 | + echo 'hello'; |
|
66 | + } |
|
67 | + foreach ($tokens as $token) { |
|
68 | + echo $token; |
|
69 | + } |
|
66 | 70 | } |
67 | 71 | |
68 | 72 | /** |
@@ -794,13 +798,18 @@ discard block |
||
794 | 798 | elseif ($a == 6) : |
795 | 799 | echo "a equals 6"; |
796 | 800 | echo "!!!"; |
797 | -else : |
|
801 | +else { |
|
802 | + : |
|
798 | 803 | echo "a is neither 5 nor 6"; |
804 | +} |
|
799 | 805 | endif; |
800 | 806 | |
801 | 807 | if ($foo): |
802 | -if ($bar) $foo = 1; |
|
803 | -elseif ($baz) $foo = 2; |
|
808 | +if ($bar) { |
|
809 | + $foo = 1; |
|
810 | +} elseif ($baz) { |
|
811 | + $foo = 2; |
|
812 | +} |
|
804 | 813 | endif; |
805 | 814 | |
806 | 815 | $this |
@@ -79,20 +79,20 @@ |
||
79 | 79 | 46 => 1, |
80 | 80 | 47 => 1, |
81 | 81 | 48 => 1, |
82 | - ); |
|
82 | + ); |
|
83 | 83 | break; |
84 | 84 | case 'DisallowTabIndentUnitTest.js': |
85 | 85 | return array( |
86 | 86 | 3 => 1, |
87 | 87 | 5 => 1, |
88 | 88 | 6 => 1, |
89 | - ); |
|
89 | + ); |
|
90 | 90 | break; |
91 | 91 | case 'DisallowTabIndentUnitTest.css': |
92 | 92 | return array( |
93 | 93 | 1 => 1, |
94 | 94 | 2 => 1, |
95 | - ); |
|
95 | + ); |
|
96 | 96 | break; |
97 | 97 | default: |
98 | 98 | return array(); |
@@ -58,45 +58,45 @@ |
||
58 | 58 | public function getErrorList($testFile='DisallowTabIndentUnitTest.inc') |
59 | 59 | { |
60 | 60 | switch ($testFile) { |
61 | - case 'DisallowTabIndentUnitTest.inc': |
|
62 | - return array( |
|
63 | - 5 => 2, |
|
64 | - 9 => 1, |
|
65 | - 15 => 1, |
|
66 | - 20 => 2, |
|
67 | - 21 => 1, |
|
68 | - 22 => 2, |
|
69 | - 23 => 1, |
|
70 | - 24 => 2, |
|
71 | - 31 => 1, |
|
72 | - 32 => 2, |
|
73 | - 33 => 2, |
|
74 | - 41 => 1, |
|
75 | - 42 => 1, |
|
76 | - 43 => 1, |
|
77 | - 44 => 1, |
|
78 | - 45 => 1, |
|
79 | - 46 => 1, |
|
80 | - 47 => 1, |
|
81 | - 48 => 1, |
|
82 | - ); |
|
83 | - break; |
|
84 | - case 'DisallowTabIndentUnitTest.js': |
|
85 | - return array( |
|
86 | - 3 => 1, |
|
87 | - 5 => 1, |
|
88 | - 6 => 1, |
|
89 | - ); |
|
90 | - break; |
|
91 | - case 'DisallowTabIndentUnitTest.css': |
|
92 | - return array( |
|
93 | - 1 => 1, |
|
94 | - 2 => 1, |
|
95 | - ); |
|
96 | - break; |
|
97 | - default: |
|
98 | - return array(); |
|
99 | - break; |
|
61 | + case 'DisallowTabIndentUnitTest.inc': |
|
62 | + return array( |
|
63 | + 5 => 2, |
|
64 | + 9 => 1, |
|
65 | + 15 => 1, |
|
66 | + 20 => 2, |
|
67 | + 21 => 1, |
|
68 | + 22 => 2, |
|
69 | + 23 => 1, |
|
70 | + 24 => 2, |
|
71 | + 31 => 1, |
|
72 | + 32 => 2, |
|
73 | + 33 => 2, |
|
74 | + 41 => 1, |
|
75 | + 42 => 1, |
|
76 | + 43 => 1, |
|
77 | + 44 => 1, |
|
78 | + 45 => 1, |
|
79 | + 46 => 1, |
|
80 | + 47 => 1, |
|
81 | + 48 => 1, |
|
82 | + ); |
|
83 | + break; |
|
84 | + case 'DisallowTabIndentUnitTest.js': |
|
85 | + return array( |
|
86 | + 3 => 1, |
|
87 | + 5 => 1, |
|
88 | + 6 => 1, |
|
89 | + ); |
|
90 | + break; |
|
91 | + case 'DisallowTabIndentUnitTest.css': |
|
92 | + return array( |
|
93 | + 1 => 1, |
|
94 | + 2 => 1, |
|
95 | + ); |
|
96 | + break; |
|
97 | + default: |
|
98 | + return array(); |
|
99 | + break; |
|
100 | 100 | }//end switch |
101 | 101 | |
102 | 102 | }//end getErrorList() |
@@ -55,7 +55,7 @@ |
||
55 | 55 | * |
56 | 56 | * @return array<int, int> |
57 | 57 | */ |
58 | - public function getErrorList($testFile='DisallowTabIndentUnitTest.inc') |
|
58 | + public function getErrorList($testFile = 'DisallowTabIndentUnitTest.inc') |
|
59 | 59 | { |
60 | 60 | switch ($testFile) { |
61 | 61 | case 'DisallowTabIndentUnitTest.inc': |
@@ -3,11 +3,11 @@ |
||
3 | 3 | <?php |
4 | 4 | function test() |
5 | 5 | { |
6 | - echo 'test'; |
|
7 | - echo 'test2'; |
|
6 | + echo 'test'; |
|
7 | + echo 'test2'; |
|
8 | 8 | echo 'test3'; |
9 | 9 | if (true) { |
10 | - echo 'test3'; |
|
10 | + echo 'test3'; |
|
11 | 11 | } |
12 | 12 | echo 'test3'; |
13 | 13 | $x = f1( |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | 156 => 1, |
88 | 88 | 168 => 1, |
89 | 89 | 184 => 1, |
90 | - ); |
|
90 | + ); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | if ($testFile === 'ScopeIndentUnitTest.3.inc') { |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | 6 => 1, |
96 | 96 | 7 => 1, |
97 | 97 | 10 => 1, |
98 | - ); |
|
98 | + ); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | return array( |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | 1117 => 1, |
160 | 160 | 1119 => 1, |
161 | 161 | 1122 => 1, |
162 | - ); |
|
162 | + ); |
|
163 | 163 | |
164 | 164 | }//end getErrorList() |
165 | 165 |
@@ -61,7 +61,7 @@ |
||
61 | 61 | * |
62 | 62 | * @return array<int, int> |
63 | 63 | */ |
64 | - public function getErrorList($testFile='ScopeIndentUnitTest.inc') |
|
64 | + public function getErrorList($testFile = 'ScopeIndentUnitTest.inc') |
|
65 | 65 | { |
66 | 66 | if ($testFile === 'ScopeIndentUnitTest.1.js') { |
67 | 67 | return array( |
@@ -57,7 +57,7 @@ |
||
57 | 57 | 48 => 1, |
58 | 58 | 70 => 1, |
59 | 59 | 71 => 1, |
60 | - ); |
|
60 | + ); |
|
61 | 61 | |
62 | 62 | }//end getErrorList() |
63 | 63 |
@@ -57,7 +57,7 @@ |
||
57 | 57 | 48 => 1, |
58 | 58 | 70 => 1, |
59 | 59 | 71 => 1, |
60 | - ); |
|
60 | + ); |
|
61 | 61 | |
62 | 62 | }//end getErrorList() |
63 | 63 |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | * |
43 | 43 | * @return array<int, int> |
44 | 44 | */ |
45 | - public function getErrorList($testFile='TodoUnitTest.inc') |
|
45 | + public function getErrorList($testFile = 'TodoUnitTest.inc') |
|
46 | 46 | { |
47 | 47 | return array(); |
48 | 48 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * |
60 | 60 | * @return array<int, int> |
61 | 61 | */ |
62 | - public function getWarningList($testFile='TodoUnitTest.inc') |
|
62 | + public function getWarningList($testFile = 'TodoUnitTest.inc') |
|
63 | 63 | { |
64 | 64 | return array( |
65 | 65 | 3 => 1, |
@@ -57,7 +57,7 @@ |
||
57 | 57 | 48 => 1, |
58 | 58 | 70 => 1, |
59 | 59 | 71 => 1, |
60 | - ); |
|
60 | + ); |
|
61 | 61 | |
62 | 62 | }//end getErrorList() |
63 | 63 |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * |
45 | 45 | * @return array<int, int> |
46 | 46 | */ |
47 | - public function getErrorList($testFile='FixmeUnitTest.inc') |
|
47 | + public function getErrorList($testFile = 'FixmeUnitTest.inc') |
|
48 | 48 | { |
49 | 49 | return array( |
50 | 50 | 3 => 1, |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | * |
71 | 71 | * @return array<int, int> |
72 | 72 | */ |
73 | - public function getWarningList($testFile='FixmeUnitTest.inc') |
|
73 | + public function getWarningList($testFile = 'FixmeUnitTest.inc') |
|
74 | 74 | { |
75 | 75 | return array(); |
76 | 76 |