@@ -18,39 +18,39 @@ discard block |
||
18 | 18 | |
19 | 19 | class TestClass |
20 | 20 | { |
21 | - function __construct() |
|
22 | - { |
|
23 | - }//end __construct() |
|
21 | + function __construct() |
|
22 | + { |
|
23 | + }//end __construct() |
|
24 | 24 | |
25 | - function myFunction() |
|
26 | - { |
|
27 | - }//end myFunction() |
|
25 | + function myFunction() |
|
26 | + { |
|
27 | + }//end myFunction() |
|
28 | 28 | |
29 | - function yourFunction() |
|
30 | - { |
|
31 | - }//end myFunction() |
|
29 | + function yourFunction() |
|
30 | + { |
|
31 | + }//end myFunction() |
|
32 | 32 | |
33 | 33 | }//end class |
34 | 34 | |
35 | 35 | abstract class TestClass |
36 | 36 | { |
37 | - abstract function myFunction(); |
|
37 | + abstract function myFunction(); |
|
38 | 38 | |
39 | - function ourFunction() |
|
40 | - { |
|
41 | - }//end myFunction() |
|
39 | + function ourFunction() |
|
40 | + { |
|
41 | + }//end myFunction() |
|
42 | 42 | |
43 | - function yourFunction() |
|
44 | - { |
|
45 | - }//end yourFunction() |
|
43 | + function yourFunction() |
|
44 | + { |
|
45 | + }//end yourFunction() |
|
46 | 46 | |
47 | 47 | }//end class |
48 | 48 | |
49 | 49 | interface TestClass |
50 | 50 | { |
51 | - function myFunction(); |
|
52 | - function ourFunction(); |
|
53 | - function yourFunction(); |
|
51 | + function myFunction(); |
|
52 | + function ourFunction(); |
|
53 | + function yourFunction(); |
|
54 | 54 | |
55 | 55 | }//end interface |
56 | 56 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | class MyClass |
70 | 70 | { |
71 | - public function myFunction(); |
|
71 | + public function myFunction(); |
|
72 | 72 | }//end class |
73 | 73 | |
74 | 74 | // Closures don't need end comments. |
@@ -72,7 +72,7 @@ |
||
72 | 72 | }//end class |
73 | 73 | |
74 | 74 | // Closures don't need end comments. |
75 | -echo preg_replace_callback('~-([a-z])~', function ($match) { return strtoupper($match[1]); }, 'hello-world'); |
|
75 | +echo preg_replace_callback('~-([a-z])~', function($match) { return strtoupper($match[1]); }, 'hello-world'); |
|
76 | 76 | |
77 | 77 | class TestClass |
78 | 78 | { |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * |
26 | 26 | * @return array<int, int> |
27 | 27 | */ |
28 | - public function getErrorList($testFile='DocCommentAlignmentUnitTest.inc') |
|
28 | + public function getErrorList($testFile = 'DocCommentAlignmentUnitTest.inc') |
|
29 | 29 | { |
30 | 30 | $errors = [ |
31 | 31 | 3 => 1, |
@@ -15,62 +15,62 @@ |
||
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='DocCommentAlignmentUnitTest.inc') |
|
29 | - { |
|
30 | - $errors = [ |
|
31 | - 3 => 1, |
|
32 | - 11 => 1, |
|
33 | - 17 => 1, |
|
34 | - 18 => 1, |
|
35 | - 19 => 1, |
|
36 | - 23 => 2, |
|
37 | - 24 => 1, |
|
38 | - 25 => 2, |
|
39 | - 26 => 1, |
|
40 | - 32 => 1, |
|
41 | - 33 => 1, |
|
42 | - 38 => 1, |
|
43 | - 39 => 1, |
|
44 | - ]; |
|
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='DocCommentAlignmentUnitTest.inc') |
|
29 | + { |
|
30 | + $errors = [ |
|
31 | + 3 => 1, |
|
32 | + 11 => 1, |
|
33 | + 17 => 1, |
|
34 | + 18 => 1, |
|
35 | + 19 => 1, |
|
36 | + 23 => 2, |
|
37 | + 24 => 1, |
|
38 | + 25 => 2, |
|
39 | + 26 => 1, |
|
40 | + 32 => 1, |
|
41 | + 33 => 1, |
|
42 | + 38 => 1, |
|
43 | + 39 => 1, |
|
44 | + ]; |
|
45 | 45 | |
46 | - if ($testFile === 'DocCommentAlignmentUnitTest.inc') { |
|
47 | - $errors[75] = 1; |
|
48 | - $errors[83] = 1; |
|
49 | - $errors[84] = 1; |
|
50 | - $errors[90] = 1; |
|
51 | - $errors[91] = 1; |
|
52 | - $errors[95] = 1; |
|
53 | - $errors[96] = 1; |
|
54 | - } |
|
46 | + if ($testFile === 'DocCommentAlignmentUnitTest.inc') { |
|
47 | + $errors[75] = 1; |
|
48 | + $errors[83] = 1; |
|
49 | + $errors[84] = 1; |
|
50 | + $errors[90] = 1; |
|
51 | + $errors[91] = 1; |
|
52 | + $errors[95] = 1; |
|
53 | + $errors[96] = 1; |
|
54 | + } |
|
55 | 55 | |
56 | - return $errors; |
|
56 | + return $errors; |
|
57 | 57 | |
58 | - }//end getErrorList() |
|
58 | + }//end getErrorList() |
|
59 | 59 | |
60 | 60 | |
61 | - /** |
|
62 | - * Returns the lines where warnings should occur. |
|
63 | - * |
|
64 | - * The key of the array should represent the line number and the value |
|
65 | - * should represent the number of warnings that should occur on that line. |
|
66 | - * |
|
67 | - * @return array<int, int> |
|
68 | - */ |
|
69 | - public function getWarningList() |
|
70 | - { |
|
71 | - return []; |
|
61 | + /** |
|
62 | + * Returns the lines where warnings should occur. |
|
63 | + * |
|
64 | + * The key of the array should represent the line number and the value |
|
65 | + * should represent the number of warnings that should occur on that line. |
|
66 | + * |
|
67 | + * @return array<int, int> |
|
68 | + */ |
|
69 | + public function getWarningList() |
|
70 | + { |
|
71 | + return []; |
|
72 | 72 | |
73 | - }//end getWarningList() |
|
73 | + }//end getWarningList() |
|
74 | 74 | |
75 | 75 | |
76 | 76 | }//end class |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * |
26 | 26 | * @return array<int, int> |
27 | 27 | */ |
28 | - public function getErrorList($testFile='InlineCommentUnitTest.inc') |
|
28 | + public function getErrorList($testFile = 'InlineCommentUnitTest.inc') |
|
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | 31 | case 'InlineCommentUnitTest.inc': |
@@ -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='InlineCommentUnitTest.inc') |
|
29 | - { |
|
30 | - switch ($testFile) { |
|
31 | - case 'InlineCommentUnitTest.inc': |
|
32 | - $errors = [ |
|
33 | - 17 => 1, |
|
34 | - 27 => 1, |
|
35 | - 28 => 1, |
|
36 | - 32 => 2, |
|
37 | - 36 => 1, |
|
38 | - 44 => 2, |
|
39 | - 58 => 1, |
|
40 | - 61 => 1, |
|
41 | - 64 => 1, |
|
42 | - 67 => 1, |
|
43 | - 95 => 1, |
|
44 | - 96 => 1, |
|
45 | - 97 => 3, |
|
46 | - 118 => 1, |
|
47 | - 126 => 2, |
|
48 | - 130 => 2, |
|
49 | - 149 => 1, |
|
50 | - ]; |
|
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='InlineCommentUnitTest.inc') |
|
29 | + { |
|
30 | + switch ($testFile) { |
|
31 | + case 'InlineCommentUnitTest.inc': |
|
32 | + $errors = [ |
|
33 | + 17 => 1, |
|
34 | + 27 => 1, |
|
35 | + 28 => 1, |
|
36 | + 32 => 2, |
|
37 | + 36 => 1, |
|
38 | + 44 => 2, |
|
39 | + 58 => 1, |
|
40 | + 61 => 1, |
|
41 | + 64 => 1, |
|
42 | + 67 => 1, |
|
43 | + 95 => 1, |
|
44 | + 96 => 1, |
|
45 | + 97 => 3, |
|
46 | + 118 => 1, |
|
47 | + 126 => 2, |
|
48 | + 130 => 2, |
|
49 | + 149 => 1, |
|
50 | + ]; |
|
51 | 51 | |
52 | - return $errors; |
|
53 | - case 'InlineCommentUnitTest.js': |
|
54 | - return [ |
|
55 | - 31 => 1, |
|
56 | - 36 => 2, |
|
57 | - 48 => 1, |
|
58 | - 51 => 1, |
|
59 | - 54 => 1, |
|
60 | - 57 => 1, |
|
61 | - 102 => 1, |
|
62 | - 103 => 1, |
|
63 | - 104 => 3, |
|
64 | - 118 => 1, |
|
65 | - 121 => 1, |
|
66 | - 125 => 2, |
|
67 | - 129 => 2, |
|
68 | - ]; |
|
69 | - default: |
|
70 | - return []; |
|
71 | - }//end switch |
|
52 | + return $errors; |
|
53 | + case 'InlineCommentUnitTest.js': |
|
54 | + return [ |
|
55 | + 31 => 1, |
|
56 | + 36 => 2, |
|
57 | + 48 => 1, |
|
58 | + 51 => 1, |
|
59 | + 54 => 1, |
|
60 | + 57 => 1, |
|
61 | + 102 => 1, |
|
62 | + 103 => 1, |
|
63 | + 104 => 3, |
|
64 | + 118 => 1, |
|
65 | + 121 => 1, |
|
66 | + 125 => 2, |
|
67 | + 129 => 2, |
|
68 | + ]; |
|
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='InlineCommentUnitTest.inc') |
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | - case 'InlineCommentUnitTest.inc': |
|
32 | - $errors = [ |
|
33 | - 17 => 1, |
|
34 | - 27 => 1, |
|
35 | - 28 => 1, |
|
36 | - 32 => 2, |
|
37 | - 36 => 1, |
|
38 | - 44 => 2, |
|
39 | - 58 => 1, |
|
40 | - 61 => 1, |
|
41 | - 64 => 1, |
|
42 | - 67 => 1, |
|
43 | - 95 => 1, |
|
44 | - 96 => 1, |
|
45 | - 97 => 3, |
|
46 | - 118 => 1, |
|
47 | - 126 => 2, |
|
48 | - 130 => 2, |
|
49 | - 149 => 1, |
|
50 | - ]; |
|
31 | + case 'InlineCommentUnitTest.inc': |
|
32 | + $errors = [ |
|
33 | + 17 => 1, |
|
34 | + 27 => 1, |
|
35 | + 28 => 1, |
|
36 | + 32 => 2, |
|
37 | + 36 => 1, |
|
38 | + 44 => 2, |
|
39 | + 58 => 1, |
|
40 | + 61 => 1, |
|
41 | + 64 => 1, |
|
42 | + 67 => 1, |
|
43 | + 95 => 1, |
|
44 | + 96 => 1, |
|
45 | + 97 => 3, |
|
46 | + 118 => 1, |
|
47 | + 126 => 2, |
|
48 | + 130 => 2, |
|
49 | + 149 => 1, |
|
50 | + ]; |
|
51 | 51 | |
52 | - return $errors; |
|
53 | - case 'InlineCommentUnitTest.js': |
|
54 | - return [ |
|
55 | - 31 => 1, |
|
56 | - 36 => 2, |
|
57 | - 48 => 1, |
|
58 | - 51 => 1, |
|
59 | - 54 => 1, |
|
60 | - 57 => 1, |
|
61 | - 102 => 1, |
|
62 | - 103 => 1, |
|
63 | - 104 => 3, |
|
64 | - 118 => 1, |
|
65 | - 121 => 1, |
|
66 | - 125 => 2, |
|
67 | - 129 => 2, |
|
68 | - ]; |
|
69 | - default: |
|
70 | - return []; |
|
52 | + return $errors; |
|
53 | + case 'InlineCommentUnitTest.js': |
|
54 | + return [ |
|
55 | + 31 => 1, |
|
56 | + 36 => 2, |
|
57 | + 48 => 1, |
|
58 | + 51 => 1, |
|
59 | + 54 => 1, |
|
60 | + 57 => 1, |
|
61 | + 102 => 1, |
|
62 | + 103 => 1, |
|
63 | + 104 => 3, |
|
64 | + 118 => 1, |
|
65 | + 121 => 1, |
|
66 | + 125 => 2, |
|
67 | + 129 => 2, |
|
68 | + ]; |
|
69 | + default: |
|
70 | + return []; |
|
71 | 71 | }//end switch |
72 | 72 | |
73 | 73 | }//end getErrorList() |
@@ -493,41 +493,41 @@ discard block |
||
493 | 493 | } |
494 | 494 | |
495 | 495 | switch ($something) { |
496 | - case '1': |
|
497 | - // Line 1 |
|
498 | - // Line 2 |
|
499 | - // Line 3 |
|
500 | - // Line 4 |
|
501 | - // Line 5 |
|
502 | - break; |
|
503 | - case '2': |
|
504 | - // Line 1 |
|
505 | - // Line 2 |
|
506 | - // Line 3 |
|
507 | - // Line 4 |
|
508 | - // Line 5 |
|
509 | - break; |
|
510 | - case '3': |
|
511 | - // Line 1 |
|
512 | - // Line 2 |
|
513 | - // Line 3 |
|
514 | - // Line 4 |
|
515 | - // Line 5 |
|
516 | - break; |
|
517 | - case '4': |
|
518 | - // Line 1 |
|
519 | - // Line 2 |
|
520 | - // Line 3 |
|
521 | - // Line 4 |
|
522 | - // Line 5 |
|
523 | - break; |
|
524 | - case '5': |
|
525 | - // Line 1 |
|
526 | - // Line 2 |
|
527 | - // Line 3 |
|
528 | - // Line 4 |
|
529 | - // Line 5 |
|
530 | - break; |
|
496 | + case '1': |
|
497 | + // Line 1 |
|
498 | + // Line 2 |
|
499 | + // Line 3 |
|
500 | + // Line 4 |
|
501 | + // Line 5 |
|
502 | + break; |
|
503 | + case '2': |
|
504 | + // Line 1 |
|
505 | + // Line 2 |
|
506 | + // Line 3 |
|
507 | + // Line 4 |
|
508 | + // Line 5 |
|
509 | + break; |
|
510 | + case '3': |
|
511 | + // Line 1 |
|
512 | + // Line 2 |
|
513 | + // Line 3 |
|
514 | + // Line 4 |
|
515 | + // Line 5 |
|
516 | + break; |
|
517 | + case '4': |
|
518 | + // Line 1 |
|
519 | + // Line 2 |
|
520 | + // Line 3 |
|
521 | + // Line 4 |
|
522 | + // Line 5 |
|
523 | + break; |
|
524 | + case '5': |
|
525 | + // Line 1 |
|
526 | + // Line 2 |
|
527 | + // Line 3 |
|
528 | + // Line 4 |
|
529 | + // Line 5 |
|
530 | + break; |
|
531 | 531 | } |
532 | 532 | |
533 | 533 | // Wrong comment |
@@ -629,69 +629,69 @@ discard block |
||
629 | 629 | } |
630 | 630 | |
631 | 631 | switch ($foo) { |
632 | - case 'one' : { |
|
633 | - // some code here. |
|
634 | - // some code here. |
|
635 | - // some code here. |
|
636 | - // some code here. |
|
637 | - // some code here. |
|
638 | - // some code here. |
|
639 | - // some code here. |
|
640 | - // some code here. |
|
641 | - // some code here. |
|
642 | - // some code here. |
|
643 | - // some code here. |
|
644 | - // some code here. |
|
645 | - // some code here. |
|
646 | - // some code here. |
|
647 | - // some code here. |
|
648 | - // some code here. |
|
649 | - // some code here. |
|
650 | - // some code here. |
|
651 | - // some code here. |
|
652 | - // some code here. |
|
653 | - // some code here. |
|
654 | - // some code here. |
|
655 | - // some code here. |
|
656 | - // some code here. |
|
657 | - // some code here. |
|
658 | - // some code here. |
|
659 | - // some code here. |
|
660 | - // some code here. |
|
661 | - // some code here. |
|
662 | - break; |
|
663 | - } |
|
664 | - case 'one' : |
|
665 | - // some code here. |
|
666 | - // some code here. |
|
667 | - // some code here. |
|
668 | - // some code here. |
|
669 | - // some code here. |
|
670 | - // some code here. |
|
671 | - // some code here. |
|
672 | - // some code here. |
|
673 | - // some code here. |
|
674 | - // some code here. |
|
675 | - // some code here. |
|
676 | - // some code here. |
|
677 | - // some code here. |
|
678 | - // some code here. |
|
679 | - // some code here. |
|
680 | - // some code here. |
|
681 | - // some code here. |
|
682 | - // some code here. |
|
683 | - // some code here. |
|
684 | - // some code here. |
|
685 | - // some code here. |
|
686 | - // some code here. |
|
687 | - // some code here. |
|
688 | - // some code here. |
|
689 | - // some code here. |
|
690 | - // some code here. |
|
691 | - // some code here. |
|
692 | - // some code here. |
|
693 | - // some code here. |
|
694 | - break; |
|
632 | + case 'one' : { |
|
633 | + // some code here. |
|
634 | + // some code here. |
|
635 | + // some code here. |
|
636 | + // some code here. |
|
637 | + // some code here. |
|
638 | + // some code here. |
|
639 | + // some code here. |
|
640 | + // some code here. |
|
641 | + // some code here. |
|
642 | + // some code here. |
|
643 | + // some code here. |
|
644 | + // some code here. |
|
645 | + // some code here. |
|
646 | + // some code here. |
|
647 | + // some code here. |
|
648 | + // some code here. |
|
649 | + // some code here. |
|
650 | + // some code here. |
|
651 | + // some code here. |
|
652 | + // some code here. |
|
653 | + // some code here. |
|
654 | + // some code here. |
|
655 | + // some code here. |
|
656 | + // some code here. |
|
657 | + // some code here. |
|
658 | + // some code here. |
|
659 | + // some code here. |
|
660 | + // some code here. |
|
661 | + // some code here. |
|
662 | + break; |
|
663 | + } |
|
664 | + case 'one' : |
|
665 | + // some code here. |
|
666 | + // some code here. |
|
667 | + // some code here. |
|
668 | + // some code here. |
|
669 | + // some code here. |
|
670 | + // some code here. |
|
671 | + // some code here. |
|
672 | + // some code here. |
|
673 | + // some code here. |
|
674 | + // some code here. |
|
675 | + // some code here. |
|
676 | + // some code here. |
|
677 | + // some code here. |
|
678 | + // some code here. |
|
679 | + // some code here. |
|
680 | + // some code here. |
|
681 | + // some code here. |
|
682 | + // some code here. |
|
683 | + // some code here. |
|
684 | + // some code here. |
|
685 | + // some code here. |
|
686 | + // some code here. |
|
687 | + // some code here. |
|
688 | + // some code here. |
|
689 | + // some code here. |
|
690 | + // some code here. |
|
691 | + // some code here. |
|
692 | + // some code here. |
|
693 | + // some code here. |
|
694 | + break; |
|
695 | 695 | }//end switch |
696 | 696 | |
697 | 697 | // Yes, code like this does exist. |
@@ -701,67 +701,67 @@ discard block |
||
701 | 701 | return $bar; |
702 | 702 | |
703 | 703 | switch ($foo) { |
704 | - case 1: |
|
705 | - case 2: |
|
706 | - case 3: |
|
707 | - case 4: |
|
708 | - case 5: |
|
709 | - case 6: |
|
710 | - case 7: |
|
711 | - case 8: |
|
712 | - case 9: |
|
713 | - case 10: |
|
714 | - case 11: |
|
715 | - case 12: |
|
716 | - case 13: |
|
717 | - case 14: |
|
718 | - case 15: |
|
719 | - case 16: |
|
720 | - case 17: |
|
721 | - case 18: |
|
722 | - case 19: |
|
723 | - case 20: |
|
724 | - case 21: |
|
725 | - case 22: |
|
726 | - case 23: |
|
727 | - case 24: |
|
728 | - case 25: |
|
729 | - case 26: |
|
730 | - case 27: |
|
731 | - case 28: |
|
732 | - case 29: |
|
733 | - case 30: |
|
734 | - case 31: |
|
735 | - case 32: |
|
736 | - case 33: |
|
737 | - case 34: |
|
738 | - case 35: |
|
739 | - case 36: |
|
740 | - case 37: |
|
741 | - case 38: |
|
742 | - case 39: |
|
743 | - case 40: |
|
744 | - case 41: |
|
745 | - case 42: |
|
746 | - case 43: |
|
747 | - case 44: |
|
748 | - case 45: |
|
749 | - case 46: |
|
750 | - case 47: |
|
751 | - case 48: |
|
752 | - case 49: |
|
753 | - case 50: |
|
754 | - case 51: |
|
755 | - case 52: |
|
756 | - case 53: |
|
757 | - case 54: |
|
758 | - case 55: |
|
759 | - case 56: |
|
760 | - case 57: |
|
761 | - case 58: |
|
762 | - case 59: |
|
763 | - echo $foo; |
|
764 | - break; |
|
704 | + case 1: |
|
705 | + case 2: |
|
706 | + case 3: |
|
707 | + case 4: |
|
708 | + case 5: |
|
709 | + case 6: |
|
710 | + case 7: |
|
711 | + case 8: |
|
712 | + case 9: |
|
713 | + case 10: |
|
714 | + case 11: |
|
715 | + case 12: |
|
716 | + case 13: |
|
717 | + case 14: |
|
718 | + case 15: |
|
719 | + case 16: |
|
720 | + case 17: |
|
721 | + case 18: |
|
722 | + case 19: |
|
723 | + case 20: |
|
724 | + case 21: |
|
725 | + case 22: |
|
726 | + case 23: |
|
727 | + case 24: |
|
728 | + case 25: |
|
729 | + case 26: |
|
730 | + case 27: |
|
731 | + case 28: |
|
732 | + case 29: |
|
733 | + case 30: |
|
734 | + case 31: |
|
735 | + case 32: |
|
736 | + case 33: |
|
737 | + case 34: |
|
738 | + case 35: |
|
739 | + case 36: |
|
740 | + case 37: |
|
741 | + case 38: |
|
742 | + case 39: |
|
743 | + case 40: |
|
744 | + case 41: |
|
745 | + case 42: |
|
746 | + case 43: |
|
747 | + case 44: |
|
748 | + case 45: |
|
749 | + case 46: |
|
750 | + case 47: |
|
751 | + case 48: |
|
752 | + case 49: |
|
753 | + case 50: |
|
754 | + case 51: |
|
755 | + case 52: |
|
756 | + case 53: |
|
757 | + case 54: |
|
758 | + case 55: |
|
759 | + case 56: |
|
760 | + case 57: |
|
761 | + case 58: |
|
762 | + case 59: |
|
763 | + echo $foo; |
|
764 | + break; |
|
765 | 765 | } |
766 | 766 | |
767 | 767 | // phpcs:set Squiz.Commenting.LongConditionClosingComment lineLimit 5 |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | // Line 20 |
146 | 146 | } |
147 | 147 | |
148 | -for ($var =1; $var < 20; $var++) { |
|
148 | +for ($var = 1; $var < 20; $var++) { |
|
149 | 149 | // Line 1 |
150 | 150 | // Line 2 |
151 | 151 | // Line 3 |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | // Line 20 |
169 | 169 | }//end for |
170 | 170 | |
171 | -for ($var =1; $var < 20; $var++) { |
|
171 | +for ($var = 1; $var < 20; $var++) { |
|
172 | 172 | // Line 1 |
173 | 173 | // Line 2 |
174 | 174 | // Line 3 |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | // Line 7 |
179 | 179 | // Line 8 |
180 | 180 | // Line 9 |
181 | - for ($val =1; $val < 20; $val++) { |
|
181 | + for ($val = 1; $val < 20; $val++) { |
|
182 | 182 | // Short for. |
183 | 183 | } |
184 | 184 | // Line 13 |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | // Line 20 |
309 | 309 | } //end foreach |
310 | 310 | |
311 | -for ($var =1; $var < 20; $var++) { |
|
311 | +for ($var = 1; $var < 20; $var++) { |
|
312 | 312 | // Line 1 |
313 | 313 | // Line 2 |
314 | 314 | // Line 3 |
@@ -697,8 +697,9 @@ |
||
697 | 697 | // Yes, code like this does exist. |
698 | 698 | if ($foo) { |
699 | 699 | return $foo; |
700 | -} elseif ($bar) |
|
700 | +} elseif ($bar) { |
|
701 | 701 | return $bar; |
702 | +} |
|
702 | 703 | |
703 | 704 | switch ($foo) { |
704 | 705 | case 1: |
@@ -2,766 +2,766 @@ discard block |
||
2 | 2 | |
3 | 3 | function long_function() |
4 | 4 | { |
5 | - if ($longFunction) { |
|
6 | - // This is a long |
|
7 | - // IF statement |
|
8 | - // that does |
|
9 | - // not have |
|
10 | - // an ELSE |
|
11 | - // block on it |
|
12 | - $variable = 'hello'; |
|
5 | + if ($longFunction) { |
|
6 | + // This is a long |
|
7 | + // IF statement |
|
8 | + // that does |
|
9 | + // not have |
|
10 | + // an ELSE |
|
11 | + // block on it |
|
12 | + $variable = 'hello'; |
|
13 | 13 | |
14 | - if ($variable === 'hello') { |
|
15 | - // This is a short |
|
16 | - // IF statement |
|
17 | - } |
|
14 | + if ($variable === 'hello') { |
|
15 | + // This is a short |
|
16 | + // IF statement |
|
17 | + } |
|
18 | 18 | |
19 | - if ($variable === 'hello') { |
|
20 | - // This is a short |
|
21 | - // IF statement |
|
22 | - } else { |
|
23 | - // This is a short ELSE |
|
24 | - // statement |
|
25 | - } |
|
26 | - }//end if |
|
19 | + if ($variable === 'hello') { |
|
20 | + // This is a short |
|
21 | + // IF statement |
|
22 | + } else { |
|
23 | + // This is a short ELSE |
|
24 | + // statement |
|
25 | + } |
|
26 | + }//end if |
|
27 | 27 | |
28 | - if ($longFunction) { |
|
29 | - // This is a long |
|
30 | - // IF statement |
|
31 | - // that does |
|
32 | - // not have |
|
33 | - // an ELSE |
|
34 | - // block on it |
|
35 | - $variable = 'hello'; |
|
28 | + if ($longFunction) { |
|
29 | + // This is a long |
|
30 | + // IF statement |
|
31 | + // that does |
|
32 | + // not have |
|
33 | + // an ELSE |
|
34 | + // block on it |
|
35 | + $variable = 'hello'; |
|
36 | 36 | |
37 | - if ($variable === 'hello') { |
|
38 | - // This is a short |
|
39 | - // IF statement |
|
40 | - } |
|
37 | + if ($variable === 'hello') { |
|
38 | + // This is a short |
|
39 | + // IF statement |
|
40 | + } |
|
41 | 41 | |
42 | - if ($variable === 'hello') { |
|
43 | - // This is a short |
|
44 | - // IF statement |
|
45 | - } else { |
|
46 | - // This is a short ELSE |
|
47 | - // statement |
|
48 | - } |
|
49 | - } |
|
42 | + if ($variable === 'hello') { |
|
43 | + // This is a short |
|
44 | + // IF statement |
|
45 | + } else { |
|
46 | + // This is a short ELSE |
|
47 | + // statement |
|
48 | + } |
|
49 | + } |
|
50 | 50 | |
51 | - if ($longFunction) { |
|
52 | - // This is a long |
|
53 | - // IF statement |
|
54 | - // that does |
|
55 | - // not have |
|
56 | - // an ELSE |
|
57 | - // block on it |
|
58 | - $variable = 'hello'; |
|
51 | + if ($longFunction) { |
|
52 | + // This is a long |
|
53 | + // IF statement |
|
54 | + // that does |
|
55 | + // not have |
|
56 | + // an ELSE |
|
57 | + // block on it |
|
58 | + $variable = 'hello'; |
|
59 | 59 | |
60 | - if ($variable === 'hello') { |
|
61 | - // This is a short |
|
62 | - // IF statement |
|
63 | - } |
|
60 | + if ($variable === 'hello') { |
|
61 | + // This is a short |
|
62 | + // IF statement |
|
63 | + } |
|
64 | 64 | |
65 | - if ($variable === 'hello') { |
|
66 | - // This is a short |
|
67 | - // IF statement |
|
68 | - } else { |
|
69 | - // This is a short ELSE |
|
70 | - // statement |
|
71 | - } |
|
72 | - } else { |
|
73 | - // Short ELSE |
|
74 | - }//end if |
|
65 | + if ($variable === 'hello') { |
|
66 | + // This is a short |
|
67 | + // IF statement |
|
68 | + } else { |
|
69 | + // This is a short ELSE |
|
70 | + // statement |
|
71 | + } |
|
72 | + } else { |
|
73 | + // Short ELSE |
|
74 | + }//end if |
|
75 | 75 | |
76 | - if ($longFunction) { |
|
77 | - // This is a long |
|
78 | - // IF statement |
|
79 | - // that does |
|
80 | - // not have |
|
81 | - // an ELSE |
|
82 | - // block on it |
|
83 | - $variable = 'hello'; |
|
76 | + if ($longFunction) { |
|
77 | + // This is a long |
|
78 | + // IF statement |
|
79 | + // that does |
|
80 | + // not have |
|
81 | + // an ELSE |
|
82 | + // block on it |
|
83 | + $variable = 'hello'; |
|
84 | 84 | |
85 | - if ($variable === 'hello') { |
|
86 | - // This is a short |
|
87 | - // IF statement |
|
88 | - } |
|
85 | + if ($variable === 'hello') { |
|
86 | + // This is a short |
|
87 | + // IF statement |
|
88 | + } |
|
89 | 89 | |
90 | - if ($variable === 'hello') { |
|
91 | - // This is a short |
|
92 | - // IF statement |
|
93 | - } else { |
|
94 | - // This is a short ELSE |
|
95 | - // statement |
|
96 | - } |
|
97 | - } else { |
|
98 | - // Short ELSE |
|
99 | - } |
|
90 | + if ($variable === 'hello') { |
|
91 | + // This is a short |
|
92 | + // IF statement |
|
93 | + } else { |
|
94 | + // This is a short ELSE |
|
95 | + // statement |
|
96 | + } |
|
97 | + } else { |
|
98 | + // Short ELSE |
|
99 | + } |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | foreach ($var as $val) { |
103 | - // Line 1 |
|
104 | - // Line 2 |
|
105 | - // Line 3 |
|
106 | - // Line 4 |
|
107 | - // Line 5 |
|
108 | - // Line 6 |
|
109 | - // Line 7 |
|
110 | - // Line 8 |
|
111 | - // Line 9 |
|
112 | - // Line 10 |
|
113 | - // Line 11 |
|
114 | - // Line 12 |
|
115 | - // Line 13 |
|
116 | - // Line 14 |
|
117 | - // Line 15 |
|
118 | - // Line 16 |
|
119 | - // Line 17 |
|
120 | - // Line 18 |
|
121 | - // Line 19 |
|
122 | - // Line 20 |
|
103 | + // Line 1 |
|
104 | + // Line 2 |
|
105 | + // Line 3 |
|
106 | + // Line 4 |
|
107 | + // Line 5 |
|
108 | + // Line 6 |
|
109 | + // Line 7 |
|
110 | + // Line 8 |
|
111 | + // Line 9 |
|
112 | + // Line 10 |
|
113 | + // Line 11 |
|
114 | + // Line 12 |
|
115 | + // Line 13 |
|
116 | + // Line 14 |
|
117 | + // Line 15 |
|
118 | + // Line 16 |
|
119 | + // Line 17 |
|
120 | + // Line 18 |
|
121 | + // Line 19 |
|
122 | + // Line 20 |
|
123 | 123 | }//end foreach |
124 | 124 | |
125 | 125 | foreach ($var as $val) { |
126 | - // Line 1 |
|
127 | - // Line 2 |
|
128 | - // Line 3 |
|
129 | - // Line 4 |
|
130 | - // Line 5 |
|
131 | - // Line 6 |
|
132 | - // Line 7 |
|
133 | - // Line 8 |
|
134 | - // Line 9 |
|
135 | - foreach ($blah as $val) { |
|
136 | - // Short foreach. |
|
137 | - } |
|
138 | - // Line 13 |
|
139 | - // Line 14 |
|
140 | - // Line 15 |
|
141 | - // Line 16 |
|
142 | - // Line 17 |
|
143 | - // Line 18 |
|
144 | - // Line 19 |
|
145 | - // Line 20 |
|
126 | + // Line 1 |
|
127 | + // Line 2 |
|
128 | + // Line 3 |
|
129 | + // Line 4 |
|
130 | + // Line 5 |
|
131 | + // Line 6 |
|
132 | + // Line 7 |
|
133 | + // Line 8 |
|
134 | + // Line 9 |
|
135 | + foreach ($blah as $val) { |
|
136 | + // Short foreach. |
|
137 | + } |
|
138 | + // Line 13 |
|
139 | + // Line 14 |
|
140 | + // Line 15 |
|
141 | + // Line 16 |
|
142 | + // Line 17 |
|
143 | + // Line 18 |
|
144 | + // Line 19 |
|
145 | + // Line 20 |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | for ($var =1; $var < 20; $var++) { |
149 | - // Line 1 |
|
150 | - // Line 2 |
|
151 | - // Line 3 |
|
152 | - // Line 4 |
|
153 | - // Line 5 |
|
154 | - // Line 6 |
|
155 | - // Line 7 |
|
156 | - // Line 8 |
|
157 | - // Line 9 |
|
158 | - // Line 10 |
|
159 | - // Line 11 |
|
160 | - // Line 12 |
|
161 | - // Line 13 |
|
162 | - // Line 14 |
|
163 | - // Line 15 |
|
164 | - // Line 16 |
|
165 | - // Line 17 |
|
166 | - // Line 18 |
|
167 | - // Line 19 |
|
168 | - // Line 20 |
|
149 | + // Line 1 |
|
150 | + // Line 2 |
|
151 | + // Line 3 |
|
152 | + // Line 4 |
|
153 | + // Line 5 |
|
154 | + // Line 6 |
|
155 | + // Line 7 |
|
156 | + // Line 8 |
|
157 | + // Line 9 |
|
158 | + // Line 10 |
|
159 | + // Line 11 |
|
160 | + // Line 12 |
|
161 | + // Line 13 |
|
162 | + // Line 14 |
|
163 | + // Line 15 |
|
164 | + // Line 16 |
|
165 | + // Line 17 |
|
166 | + // Line 18 |
|
167 | + // Line 19 |
|
168 | + // Line 20 |
|
169 | 169 | }//end for |
170 | 170 | |
171 | 171 | for ($var =1; $var < 20; $var++) { |
172 | - // Line 1 |
|
173 | - // Line 2 |
|
174 | - // Line 3 |
|
175 | - // Line 4 |
|
176 | - // Line 5 |
|
177 | - // Line 6 |
|
178 | - // Line 7 |
|
179 | - // Line 8 |
|
180 | - // Line 9 |
|
181 | - for ($val =1; $val < 20; $val++) { |
|
182 | - // Short for. |
|
183 | - } |
|
184 | - // Line 13 |
|
185 | - // Line 14 |
|
186 | - // Line 15 |
|
187 | - // Line 16 |
|
188 | - // Line 17 |
|
189 | - // Line 18 |
|
190 | - // Line 19 |
|
191 | - // Line 20 |
|
172 | + // Line 1 |
|
173 | + // Line 2 |
|
174 | + // Line 3 |
|
175 | + // Line 4 |
|
176 | + // Line 5 |
|
177 | + // Line 6 |
|
178 | + // Line 7 |
|
179 | + // Line 8 |
|
180 | + // Line 9 |
|
181 | + for ($val =1; $val < 20; $val++) { |
|
182 | + // Short for. |
|
183 | + } |
|
184 | + // Line 13 |
|
185 | + // Line 14 |
|
186 | + // Line 15 |
|
187 | + // Line 16 |
|
188 | + // Line 17 |
|
189 | + // Line 18 |
|
190 | + // Line 19 |
|
191 | + // Line 20 |
|
192 | 192 | } |
193 | 193 | |
194 | 194 | while ($var < 20) { |
195 | - // Line 1 |
|
196 | - // Line 2 |
|
197 | - // Line 3 |
|
198 | - // Line 4 |
|
199 | - // Line 5 |
|
200 | - // Line 6 |
|
201 | - // Line 7 |
|
202 | - // Line 8 |
|
203 | - // Line 9 |
|
204 | - // Line 10 |
|
205 | - // Line 11 |
|
206 | - // Line 12 |
|
207 | - // Line 13 |
|
208 | - // Line 14 |
|
209 | - // Line 15 |
|
210 | - // Line 16 |
|
211 | - // Line 17 |
|
212 | - // Line 18 |
|
213 | - // Line 19 |
|
214 | - // Line 20 |
|
195 | + // Line 1 |
|
196 | + // Line 2 |
|
197 | + // Line 3 |
|
198 | + // Line 4 |
|
199 | + // Line 5 |
|
200 | + // Line 6 |
|
201 | + // Line 7 |
|
202 | + // Line 8 |
|
203 | + // Line 9 |
|
204 | + // Line 10 |
|
205 | + // Line 11 |
|
206 | + // Line 12 |
|
207 | + // Line 13 |
|
208 | + // Line 14 |
|
209 | + // Line 15 |
|
210 | + // Line 16 |
|
211 | + // Line 17 |
|
212 | + // Line 18 |
|
213 | + // Line 19 |
|
214 | + // Line 20 |
|
215 | 215 | }//end while looping |
216 | 216 | |
217 | 217 | while ($var < 20) { |
218 | - // Line 1 |
|
219 | - // Line 2 |
|
220 | - // Line 3 |
|
221 | - // Line 4 |
|
222 | - // Line 5 |
|
223 | - // Line 6 |
|
224 | - // Line 7 |
|
225 | - // Line 8 |
|
226 | - // Line 9 |
|
227 | - while ($something) { |
|
228 | - // Short while. |
|
229 | - } |
|
230 | - // Line 13 |
|
231 | - // Line 14 |
|
232 | - // Line 15 |
|
233 | - // Line 16 |
|
234 | - // Line 17 |
|
235 | - // Line 18 |
|
236 | - // Line 19 |
|
237 | - // Line 20 |
|
218 | + // Line 1 |
|
219 | + // Line 2 |
|
220 | + // Line 3 |
|
221 | + // Line 4 |
|
222 | + // Line 5 |
|
223 | + // Line 6 |
|
224 | + // Line 7 |
|
225 | + // Line 8 |
|
226 | + // Line 9 |
|
227 | + while ($something) { |
|
228 | + // Short while. |
|
229 | + } |
|
230 | + // Line 13 |
|
231 | + // Line 14 |
|
232 | + // Line 15 |
|
233 | + // Line 16 |
|
234 | + // Line 17 |
|
235 | + // Line 18 |
|
236 | + // Line 19 |
|
237 | + // Line 20 |
|
238 | 238 | } |
239 | 239 | |
240 | 240 | if ($longFunction) { |
241 | - // This is a long |
|
242 | - // IF statement |
|
243 | - // that does |
|
244 | - // not have |
|
245 | - // an ELSE |
|
246 | - // block on it |
|
247 | - $variable = 'hello'; |
|
241 | + // This is a long |
|
242 | + // IF statement |
|
243 | + // that does |
|
244 | + // not have |
|
245 | + // an ELSE |
|
246 | + // block on it |
|
247 | + $variable = 'hello'; |
|
248 | 248 | |
249 | - if ($variable === 'hello') { |
|
250 | - // This is a short |
|
251 | - // IF statement |
|
252 | - } |
|
249 | + if ($variable === 'hello') { |
|
250 | + // This is a short |
|
251 | + // IF statement |
|
252 | + } |
|
253 | 253 | |
254 | - if ($variable === 'hello') { |
|
255 | - // This is a short |
|
256 | - // IF statement |
|
257 | - } else { |
|
258 | - // This is a short ELSE |
|
259 | - // statement |
|
260 | - } |
|
254 | + if ($variable === 'hello') { |
|
255 | + // This is a short |
|
256 | + // IF statement |
|
257 | + } else { |
|
258 | + // This is a short ELSE |
|
259 | + // statement |
|
260 | + } |
|
261 | 261 | } //end if |
262 | 262 | |
263 | 263 | if ($longFunction) { |
264 | - // This is a long |
|
265 | - // IF statement |
|
266 | - // that does |
|
267 | - // not have |
|
268 | - // an ELSE |
|
269 | - // block on it |
|
270 | - $variable = 'hello'; |
|
264 | + // This is a long |
|
265 | + // IF statement |
|
266 | + // that does |
|
267 | + // not have |
|
268 | + // an ELSE |
|
269 | + // block on it |
|
270 | + $variable = 'hello'; |
|
271 | 271 | |
272 | - if ($variable === 'hello') { |
|
273 | - // This is a short |
|
274 | - // IF statement |
|
275 | - } |
|
272 | + if ($variable === 'hello') { |
|
273 | + // This is a short |
|
274 | + // IF statement |
|
275 | + } |
|
276 | 276 | |
277 | - if ($variable === 'hello') { |
|
278 | - // This is a short |
|
279 | - // IF statement |
|
280 | - } else { |
|
281 | - // This is a short ELSE |
|
282 | - // statement |
|
283 | - } |
|
277 | + if ($variable === 'hello') { |
|
278 | + // This is a short |
|
279 | + // IF statement |
|
280 | + } else { |
|
281 | + // This is a short ELSE |
|
282 | + // statement |
|
283 | + } |
|
284 | 284 | } else { |
285 | - // Short ELSE |
|
285 | + // Short ELSE |
|
286 | 286 | } //end if |
287 | 287 | |
288 | 288 | foreach ($var as $val) { |
289 | - // Line 1 |
|
290 | - // Line 2 |
|
291 | - // Line 3 |
|
292 | - // Line 4 |
|
293 | - // Line 5 |
|
294 | - // Line 6 |
|
295 | - // Line 7 |
|
296 | - // Line 8 |
|
297 | - // Line 9 |
|
298 | - // Line 10 |
|
299 | - // Line 11 |
|
300 | - // Line 12 |
|
301 | - // Line 13 |
|
302 | - // Line 14 |
|
303 | - // Line 15 |
|
304 | - // Line 16 |
|
305 | - // Line 17 |
|
306 | - // Line 18 |
|
307 | - // Line 19 |
|
308 | - // Line 20 |
|
289 | + // Line 1 |
|
290 | + // Line 2 |
|
291 | + // Line 3 |
|
292 | + // Line 4 |
|
293 | + // Line 5 |
|
294 | + // Line 6 |
|
295 | + // Line 7 |
|
296 | + // Line 8 |
|
297 | + // Line 9 |
|
298 | + // Line 10 |
|
299 | + // Line 11 |
|
300 | + // Line 12 |
|
301 | + // Line 13 |
|
302 | + // Line 14 |
|
303 | + // Line 15 |
|
304 | + // Line 16 |
|
305 | + // Line 17 |
|
306 | + // Line 18 |
|
307 | + // Line 19 |
|
308 | + // Line 20 |
|
309 | 309 | } //end foreach |
310 | 310 | |
311 | 311 | for ($var =1; $var < 20; $var++) { |
312 | - // Line 1 |
|
313 | - // Line 2 |
|
314 | - // Line 3 |
|
315 | - // Line 4 |
|
316 | - // Line 5 |
|
317 | - // Line 6 |
|
318 | - // Line 7 |
|
319 | - // Line 8 |
|
320 | - // Line 9 |
|
321 | - // Line 10 |
|
322 | - // Line 11 |
|
323 | - // Line 12 |
|
324 | - // Line 13 |
|
325 | - // Line 14 |
|
326 | - // Line 15 |
|
327 | - // Line 16 |
|
328 | - // Line 17 |
|
329 | - // Line 18 |
|
330 | - // Line 19 |
|
331 | - // Line 20 |
|
312 | + // Line 1 |
|
313 | + // Line 2 |
|
314 | + // Line 3 |
|
315 | + // Line 4 |
|
316 | + // Line 5 |
|
317 | + // Line 6 |
|
318 | + // Line 7 |
|
319 | + // Line 8 |
|
320 | + // Line 9 |
|
321 | + // Line 10 |
|
322 | + // Line 11 |
|
323 | + // Line 12 |
|
324 | + // Line 13 |
|
325 | + // Line 14 |
|
326 | + // Line 15 |
|
327 | + // Line 16 |
|
328 | + // Line 17 |
|
329 | + // Line 18 |
|
330 | + // Line 19 |
|
331 | + // Line 20 |
|
332 | 332 | } //end for |
333 | 333 | |
334 | 334 | while ($var < 20) { |
335 | - // Line 1 |
|
336 | - // Line 2 |
|
337 | - // Line 3 |
|
338 | - // Line 4 |
|
339 | - // Line 5 |
|
340 | - // Line 6 |
|
341 | - // Line 7 |
|
342 | - // Line 8 |
|
343 | - // Line 9 |
|
344 | - // Line 10 |
|
345 | - // Line 11 |
|
346 | - // Line 12 |
|
347 | - // Line 13 |
|
348 | - // Line 14 |
|
349 | - // Line 15 |
|
350 | - // Line 16 |
|
351 | - // Line 17 |
|
352 | - // Line 18 |
|
353 | - // Line 19 |
|
354 | - // Line 20 |
|
335 | + // Line 1 |
|
336 | + // Line 2 |
|
337 | + // Line 3 |
|
338 | + // Line 4 |
|
339 | + // Line 5 |
|
340 | + // Line 6 |
|
341 | + // Line 7 |
|
342 | + // Line 8 |
|
343 | + // Line 9 |
|
344 | + // Line 10 |
|
345 | + // Line 11 |
|
346 | + // Line 12 |
|
347 | + // Line 13 |
|
348 | + // Line 14 |
|
349 | + // Line 15 |
|
350 | + // Line 16 |
|
351 | + // Line 17 |
|
352 | + // Line 18 |
|
353 | + // Line 19 |
|
354 | + // Line 20 |
|
355 | 355 | } //end while |
356 | 356 | |
357 | 357 | while ($var < 20) { |
358 | - // Line 1 |
|
359 | - // Line 2 |
|
360 | - // Line 3 |
|
361 | - // Line 4 |
|
362 | - // Line 5 |
|
363 | - // Line 6 |
|
364 | - // Line 7 |
|
365 | - // Line 8 |
|
366 | - // Line 9 |
|
367 | - // Line 10 |
|
368 | - // Line 11 |
|
369 | - // Line 12 |
|
370 | - // Line 13 |
|
371 | - // Line 14 |
|
372 | - // Line 15 |
|
373 | - // Line 16 |
|
374 | - // Line 17 |
|
375 | - // Line 18 |
|
376 | - // Line 19 |
|
377 | - // Line 20 |
|
358 | + // Line 1 |
|
359 | + // Line 2 |
|
360 | + // Line 3 |
|
361 | + // Line 4 |
|
362 | + // Line 5 |
|
363 | + // Line 6 |
|
364 | + // Line 7 |
|
365 | + // Line 8 |
|
366 | + // Line 9 |
|
367 | + // Line 10 |
|
368 | + // Line 11 |
|
369 | + // Line 12 |
|
370 | + // Line 13 |
|
371 | + // Line 14 |
|
372 | + // Line 15 |
|
373 | + // Line 16 |
|
374 | + // Line 17 |
|
375 | + // Line 18 |
|
376 | + // Line 19 |
|
377 | + // Line 20 |
|
378 | 378 | }//end for |
379 | 379 | |
380 | 380 | if (true) { |
381 | - // Line 1 |
|
382 | - // Line 2 |
|
383 | - // Line 3 |
|
384 | - // Line 4 |
|
385 | - // Line 5 |
|
386 | - // Line 6 |
|
387 | - // Line 7 |
|
388 | - // Line 8 |
|
389 | - // Line 9 |
|
390 | - // Line 10 |
|
391 | - // Line 11 |
|
392 | - // Line 12 |
|
393 | - // Line 13 |
|
394 | - // Line 14 |
|
395 | - // Line 15 |
|
396 | - // Line 16 |
|
397 | - // Line 17 |
|
398 | - // Line 18 |
|
399 | - // Line 19 |
|
400 | - // Line 20 |
|
381 | + // Line 1 |
|
382 | + // Line 2 |
|
383 | + // Line 3 |
|
384 | + // Line 4 |
|
385 | + // Line 5 |
|
386 | + // Line 6 |
|
387 | + // Line 7 |
|
388 | + // Line 8 |
|
389 | + // Line 9 |
|
390 | + // Line 10 |
|
391 | + // Line 11 |
|
392 | + // Line 12 |
|
393 | + // Line 13 |
|
394 | + // Line 14 |
|
395 | + // Line 15 |
|
396 | + // Line 16 |
|
397 | + // Line 17 |
|
398 | + // Line 18 |
|
399 | + // Line 19 |
|
400 | + // Line 20 |
|
401 | 401 | } else if ($condition) { |
402 | - // Line 1 |
|
403 | - // Line 2 |
|
404 | - // Line 3 |
|
405 | - // Line 4 |
|
406 | - // Line 5 |
|
407 | - // Line 6 |
|
408 | - // Line 7 |
|
409 | - // Line 8 |
|
410 | - // Line 9 |
|
411 | - // Line 10 |
|
412 | - // Line 11 |
|
413 | - // Line 12 |
|
414 | - // Line 13 |
|
415 | - // Line 14 |
|
416 | - // Line 15 |
|
417 | - // Line 16 |
|
418 | - // Line 17 |
|
419 | - // Line 18 |
|
420 | - // Line 19 |
|
421 | - // Line 20 |
|
402 | + // Line 1 |
|
403 | + // Line 2 |
|
404 | + // Line 3 |
|
405 | + // Line 4 |
|
406 | + // Line 5 |
|
407 | + // Line 6 |
|
408 | + // Line 7 |
|
409 | + // Line 8 |
|
410 | + // Line 9 |
|
411 | + // Line 10 |
|
412 | + // Line 11 |
|
413 | + // Line 12 |
|
414 | + // Line 13 |
|
415 | + // Line 14 |
|
416 | + // Line 15 |
|
417 | + // Line 16 |
|
418 | + // Line 17 |
|
419 | + // Line 18 |
|
420 | + // Line 19 |
|
421 | + // Line 20 |
|
422 | 422 | } elseif ($cond) { |
423 | - // Line 1 |
|
424 | - // Line 2 |
|
425 | - // Line 3 |
|
426 | - // Line 4 |
|
427 | - // Line 5 |
|
428 | - // Line 6 |
|
429 | - // Line 7 |
|
430 | - // Line 8 |
|
431 | - // Line 9 |
|
432 | - // Line 10 |
|
433 | - // Line 11 |
|
434 | - // Line 12 |
|
435 | - // Line 13 |
|
436 | - // Line 14 |
|
437 | - // Line 15 |
|
438 | - // Line 16 |
|
439 | - // Line 17 |
|
440 | - // Line 18 |
|
441 | - // Line 19 |
|
442 | - // Line 20 |
|
423 | + // Line 1 |
|
424 | + // Line 2 |
|
425 | + // Line 3 |
|
426 | + // Line 4 |
|
427 | + // Line 5 |
|
428 | + // Line 6 |
|
429 | + // Line 7 |
|
430 | + // Line 8 |
|
431 | + // Line 9 |
|
432 | + // Line 10 |
|
433 | + // Line 11 |
|
434 | + // Line 12 |
|
435 | + // Line 13 |
|
436 | + // Line 14 |
|
437 | + // Line 15 |
|
438 | + // Line 16 |
|
439 | + // Line 17 |
|
440 | + // Line 18 |
|
441 | + // Line 19 |
|
442 | + // Line 20 |
|
443 | 443 | } else { |
444 | - // Line 1 |
|
445 | - // Line 2 |
|
446 | - // Line 3 |
|
447 | - // Line 4 |
|
448 | - // Line 5 |
|
449 | - // Line 6 |
|
450 | - // Line 7 |
|
451 | - // Line 8 |
|
452 | - // Line 9 |
|
453 | - // Line 10 |
|
454 | - // Line 11 |
|
455 | - // Line 12 |
|
456 | - // Line 13 |
|
457 | - // Line 14 |
|
458 | - // Line 15 |
|
459 | - // Line 16 |
|
460 | - // Line 17 |
|
461 | - // Line 18 |
|
462 | - // Line 19 |
|
463 | - // Line 20 |
|
444 | + // Line 1 |
|
445 | + // Line 2 |
|
446 | + // Line 3 |
|
447 | + // Line 4 |
|
448 | + // Line 5 |
|
449 | + // Line 6 |
|
450 | + // Line 7 |
|
451 | + // Line 8 |
|
452 | + // Line 9 |
|
453 | + // Line 10 |
|
454 | + // Line 11 |
|
455 | + // Line 12 |
|
456 | + // Line 13 |
|
457 | + // Line 14 |
|
458 | + // Line 15 |
|
459 | + // Line 16 |
|
460 | + // Line 17 |
|
461 | + // Line 18 |
|
462 | + // Line 19 |
|
463 | + // Line 20 |
|
464 | 464 | }//end if |
465 | 465 | |
466 | 466 | if ($something) { |
467 | - // Line 1 |
|
468 | - // Line 2 |
|
467 | + // Line 1 |
|
468 | + // Line 2 |
|
469 | 469 | } else if ($somethingElse) { |
470 | - // Line 1 |
|
471 | - // Line 2 |
|
470 | + // Line 1 |
|
471 | + // Line 2 |
|
472 | 472 | } else { |
473 | - // Line 1 |
|
474 | - // Line 2 |
|
475 | - // Line 3 |
|
476 | - // Line 4 |
|
477 | - // Line 5 |
|
478 | - // Line 6 |
|
479 | - // Line 7 |
|
480 | - // Line 8 |
|
481 | - // Line 9 |
|
482 | - // Line 10 |
|
483 | - // Line 11 |
|
484 | - // Line 12 |
|
485 | - // Line 13 |
|
486 | - // Line 14 |
|
487 | - // Line 15 |
|
488 | - // Line 16 |
|
489 | - // Line 17 |
|
490 | - // Line 18 |
|
491 | - // Line 19 |
|
492 | - // Line 20 |
|
473 | + // Line 1 |
|
474 | + // Line 2 |
|
475 | + // Line 3 |
|
476 | + // Line 4 |
|
477 | + // Line 5 |
|
478 | + // Line 6 |
|
479 | + // Line 7 |
|
480 | + // Line 8 |
|
481 | + // Line 9 |
|
482 | + // Line 10 |
|
483 | + // Line 11 |
|
484 | + // Line 12 |
|
485 | + // Line 13 |
|
486 | + // Line 14 |
|
487 | + // Line 15 |
|
488 | + // Line 16 |
|
489 | + // Line 17 |
|
490 | + // Line 18 |
|
491 | + // Line 19 |
|
492 | + // Line 20 |
|
493 | 493 | } |
494 | 494 | |
495 | 495 | switch ($something) { |
496 | - case '1': |
|
497 | - // Line 1 |
|
498 | - // Line 2 |
|
499 | - // Line 3 |
|
500 | - // Line 4 |
|
501 | - // Line 5 |
|
502 | - break; |
|
503 | - case '2': |
|
504 | - // Line 1 |
|
505 | - // Line 2 |
|
506 | - // Line 3 |
|
507 | - // Line 4 |
|
508 | - // Line 5 |
|
509 | - break; |
|
510 | - case '3': |
|
511 | - // Line 1 |
|
512 | - // Line 2 |
|
513 | - // Line 3 |
|
514 | - // Line 4 |
|
515 | - // Line 5 |
|
516 | - break; |
|
517 | - case '4': |
|
518 | - // Line 1 |
|
519 | - // Line 2 |
|
520 | - // Line 3 |
|
521 | - // Line 4 |
|
522 | - // Line 5 |
|
523 | - break; |
|
524 | - case '5': |
|
525 | - // Line 1 |
|
526 | - // Line 2 |
|
527 | - // Line 3 |
|
528 | - // Line 4 |
|
529 | - // Line 5 |
|
530 | - break; |
|
496 | + case '1': |
|
497 | + // Line 1 |
|
498 | + // Line 2 |
|
499 | + // Line 3 |
|
500 | + // Line 4 |
|
501 | + // Line 5 |
|
502 | + break; |
|
503 | + case '2': |
|
504 | + // Line 1 |
|
505 | + // Line 2 |
|
506 | + // Line 3 |
|
507 | + // Line 4 |
|
508 | + // Line 5 |
|
509 | + break; |
|
510 | + case '3': |
|
511 | + // Line 1 |
|
512 | + // Line 2 |
|
513 | + // Line 3 |
|
514 | + // Line 4 |
|
515 | + // Line 5 |
|
516 | + break; |
|
517 | + case '4': |
|
518 | + // Line 1 |
|
519 | + // Line 2 |
|
520 | + // Line 3 |
|
521 | + // Line 4 |
|
522 | + // Line 5 |
|
523 | + break; |
|
524 | + case '5': |
|
525 | + // Line 1 |
|
526 | + // Line 2 |
|
527 | + // Line 3 |
|
528 | + // Line 4 |
|
529 | + // Line 5 |
|
530 | + break; |
|
531 | 531 | } |
532 | 532 | |
533 | 533 | // Wrong comment |
534 | 534 | if ($condition) { |
535 | - echo "true"; |
|
535 | + echo "true"; |
|
536 | 536 | }//end foreach |
537 | 537 | |
538 | 538 | if ($condition) { |
539 | - echo "true"; |
|
539 | + echo "true"; |
|
540 | 540 | } //end if |
541 | 541 | |
542 | 542 | try { |
543 | - // some code here. |
|
544 | - // some code here. |
|
545 | - // some code here. |
|
546 | - // some code here. |
|
547 | - // some code here. |
|
548 | - // some code here. |
|
543 | + // some code here. |
|
544 | + // some code here. |
|
545 | + // some code here. |
|
546 | + // some code here. |
|
547 | + // some code here. |
|
548 | + // some code here. |
|
549 | 549 | } catch (Exception $e) { |
550 | - // some code here. |
|
551 | - // some code here. |
|
552 | - // some code here. |
|
553 | - // some code here. |
|
554 | - // some code here. |
|
555 | - // some code here. |
|
556 | - // some code here. |
|
557 | - // some code here. |
|
558 | - // some code here. |
|
559 | - // some code here. |
|
560 | - // some code here. |
|
561 | - // some code here. |
|
550 | + // some code here. |
|
551 | + // some code here. |
|
552 | + // some code here. |
|
553 | + // some code here. |
|
554 | + // some code here. |
|
555 | + // some code here. |
|
556 | + // some code here. |
|
557 | + // some code here. |
|
558 | + // some code here. |
|
559 | + // some code here. |
|
560 | + // some code here. |
|
561 | + // some code here. |
|
562 | 562 | } |
563 | 563 | |
564 | 564 | try { |
565 | - // some code here. |
|
566 | - // some code here. |
|
567 | - // some code here. |
|
568 | - // some code here. |
|
569 | - // some code here. |
|
570 | - // some code here. |
|
565 | + // some code here. |
|
566 | + // some code here. |
|
567 | + // some code here. |
|
568 | + // some code here. |
|
569 | + // some code here. |
|
570 | + // some code here. |
|
571 | 571 | } catch (Exception $e) { |
572 | - // some code here. |
|
573 | - // some code here. |
|
574 | - // some code here. |
|
575 | - // some code here. |
|
576 | - // some code here. |
|
577 | - // some code here. |
|
578 | - // some code here. |
|
572 | + // some code here. |
|
573 | + // some code here. |
|
574 | + // some code here. |
|
575 | + // some code here. |
|
576 | + // some code here. |
|
577 | + // some code here. |
|
578 | + // some code here. |
|
579 | 579 | } |
580 | 580 | |
581 | 581 | try { |
582 | - // some code here. |
|
583 | - // some code here. |
|
584 | - // some code here. |
|
585 | - // some code here. |
|
586 | - // some code here. |
|
587 | - // some code here. |
|
582 | + // some code here. |
|
583 | + // some code here. |
|
584 | + // some code here. |
|
585 | + // some code here. |
|
586 | + // some code here. |
|
587 | + // some code here. |
|
588 | 588 | } catch (Exception $e) { |
589 | - // some code here. |
|
590 | - // some code here. |
|
591 | - // some code here. |
|
592 | - // some code here. |
|
593 | - // some code here. |
|
594 | - // some code here. |
|
595 | - // some code here. |
|
596 | - // some code here. |
|
597 | - // some code here. |
|
598 | - // some code here. |
|
599 | - // some code here. |
|
600 | - // some code here. |
|
589 | + // some code here. |
|
590 | + // some code here. |
|
591 | + // some code here. |
|
592 | + // some code here. |
|
593 | + // some code here. |
|
594 | + // some code here. |
|
595 | + // some code here. |
|
596 | + // some code here. |
|
597 | + // some code here. |
|
598 | + // some code here. |
|
599 | + // some code here. |
|
600 | + // some code here. |
|
601 | 601 | }//end catch |
602 | 602 | |
603 | 603 | try { |
604 | - // some code here. |
|
605 | - // some code here. |
|
606 | - // some code here. |
|
607 | - // some code here. |
|
608 | - // some code here. |
|
609 | - // some code here. |
|
610 | - // some code here. |
|
611 | - // some code here. |
|
612 | - // some code here. |
|
613 | - // some code here. |
|
614 | - // some code here. |
|
615 | - // some code here. |
|
604 | + // some code here. |
|
605 | + // some code here. |
|
606 | + // some code here. |
|
607 | + // some code here. |
|
608 | + // some code here. |
|
609 | + // some code here. |
|
610 | + // some code here. |
|
611 | + // some code here. |
|
612 | + // some code here. |
|
613 | + // some code here. |
|
614 | + // some code here. |
|
615 | + // some code here. |
|
616 | 616 | } catch (DALException $e) { |
617 | - // some code here. |
|
618 | - // some code here. |
|
619 | - // some code here. |
|
620 | - // some code here. |
|
621 | - // some code here. |
|
622 | - // some code here. |
|
623 | - // some code here. |
|
624 | - // some code here. |
|
617 | + // some code here. |
|
618 | + // some code here. |
|
619 | + // some code here. |
|
620 | + // some code here. |
|
621 | + // some code here. |
|
622 | + // some code here. |
|
623 | + // some code here. |
|
624 | + // some code here. |
|
625 | 625 | } catch (ChannelException $e) { |
626 | - // some code here. |
|
626 | + // some code here. |
|
627 | 627 | } catch (Exception $e) { |
628 | - // some code here. |
|
628 | + // some code here. |
|
629 | 629 | } |
630 | 630 | |
631 | 631 | switch ($foo) { |
632 | - case 'one' : { |
|
633 | - // some code here. |
|
634 | - // some code here. |
|
635 | - // some code here. |
|
636 | - // some code here. |
|
637 | - // some code here. |
|
638 | - // some code here. |
|
639 | - // some code here. |
|
640 | - // some code here. |
|
641 | - // some code here. |
|
642 | - // some code here. |
|
643 | - // some code here. |
|
644 | - // some code here. |
|
645 | - // some code here. |
|
646 | - // some code here. |
|
647 | - // some code here. |
|
648 | - // some code here. |
|
649 | - // some code here. |
|
650 | - // some code here. |
|
651 | - // some code here. |
|
652 | - // some code here. |
|
653 | - // some code here. |
|
654 | - // some code here. |
|
655 | - // some code here. |
|
656 | - // some code here. |
|
657 | - // some code here. |
|
658 | - // some code here. |
|
659 | - // some code here. |
|
660 | - // some code here. |
|
661 | - // some code here. |
|
662 | - break; |
|
663 | - } |
|
664 | - case 'one' : |
|
665 | - // some code here. |
|
666 | - // some code here. |
|
667 | - // some code here. |
|
668 | - // some code here. |
|
669 | - // some code here. |
|
670 | - // some code here. |
|
671 | - // some code here. |
|
672 | - // some code here. |
|
673 | - // some code here. |
|
674 | - // some code here. |
|
675 | - // some code here. |
|
676 | - // some code here. |
|
677 | - // some code here. |
|
678 | - // some code here. |
|
679 | - // some code here. |
|
680 | - // some code here. |
|
681 | - // some code here. |
|
682 | - // some code here. |
|
683 | - // some code here. |
|
684 | - // some code here. |
|
685 | - // some code here. |
|
686 | - // some code here. |
|
687 | - // some code here. |
|
688 | - // some code here. |
|
689 | - // some code here. |
|
690 | - // some code here. |
|
691 | - // some code here. |
|
692 | - // some code here. |
|
693 | - // some code here. |
|
694 | - break; |
|
632 | + case 'one' : { |
|
633 | + // some code here. |
|
634 | + // some code here. |
|
635 | + // some code here. |
|
636 | + // some code here. |
|
637 | + // some code here. |
|
638 | + // some code here. |
|
639 | + // some code here. |
|
640 | + // some code here. |
|
641 | + // some code here. |
|
642 | + // some code here. |
|
643 | + // some code here. |
|
644 | + // some code here. |
|
645 | + // some code here. |
|
646 | + // some code here. |
|
647 | + // some code here. |
|
648 | + // some code here. |
|
649 | + // some code here. |
|
650 | + // some code here. |
|
651 | + // some code here. |
|
652 | + // some code here. |
|
653 | + // some code here. |
|
654 | + // some code here. |
|
655 | + // some code here. |
|
656 | + // some code here. |
|
657 | + // some code here. |
|
658 | + // some code here. |
|
659 | + // some code here. |
|
660 | + // some code here. |
|
661 | + // some code here. |
|
662 | + break; |
|
663 | + } |
|
664 | + case 'one' : |
|
665 | + // some code here. |
|
666 | + // some code here. |
|
667 | + // some code here. |
|
668 | + // some code here. |
|
669 | + // some code here. |
|
670 | + // some code here. |
|
671 | + // some code here. |
|
672 | + // some code here. |
|
673 | + // some code here. |
|
674 | + // some code here. |
|
675 | + // some code here. |
|
676 | + // some code here. |
|
677 | + // some code here. |
|
678 | + // some code here. |
|
679 | + // some code here. |
|
680 | + // some code here. |
|
681 | + // some code here. |
|
682 | + // some code here. |
|
683 | + // some code here. |
|
684 | + // some code here. |
|
685 | + // some code here. |
|
686 | + // some code here. |
|
687 | + // some code here. |
|
688 | + // some code here. |
|
689 | + // some code here. |
|
690 | + // some code here. |
|
691 | + // some code here. |
|
692 | + // some code here. |
|
693 | + // some code here. |
|
694 | + break; |
|
695 | 695 | }//end switch |
696 | 696 | |
697 | 697 | // Yes, code like this does exist. |
698 | 698 | if ($foo) { |
699 | - return $foo; |
|
699 | + return $foo; |
|
700 | 700 | } elseif ($bar) |
701 | - return $bar; |
|
701 | + return $bar; |
|
702 | 702 | |
703 | 703 | switch ($foo) { |
704 | - case 1: |
|
705 | - case 2: |
|
706 | - case 3: |
|
707 | - case 4: |
|
708 | - case 5: |
|
709 | - case 6: |
|
710 | - case 7: |
|
711 | - case 8: |
|
712 | - case 9: |
|
713 | - case 10: |
|
714 | - case 11: |
|
715 | - case 12: |
|
716 | - case 13: |
|
717 | - case 14: |
|
718 | - case 15: |
|
719 | - case 16: |
|
720 | - case 17: |
|
721 | - case 18: |
|
722 | - case 19: |
|
723 | - case 20: |
|
724 | - case 21: |
|
725 | - case 22: |
|
726 | - case 23: |
|
727 | - case 24: |
|
728 | - case 25: |
|
729 | - case 26: |
|
730 | - case 27: |
|
731 | - case 28: |
|
732 | - case 29: |
|
733 | - case 30: |
|
734 | - case 31: |
|
735 | - case 32: |
|
736 | - case 33: |
|
737 | - case 34: |
|
738 | - case 35: |
|
739 | - case 36: |
|
740 | - case 37: |
|
741 | - case 38: |
|
742 | - case 39: |
|
743 | - case 40: |
|
744 | - case 41: |
|
745 | - case 42: |
|
746 | - case 43: |
|
747 | - case 44: |
|
748 | - case 45: |
|
749 | - case 46: |
|
750 | - case 47: |
|
751 | - case 48: |
|
752 | - case 49: |
|
753 | - case 50: |
|
754 | - case 51: |
|
755 | - case 52: |
|
756 | - case 53: |
|
757 | - case 54: |
|
758 | - case 55: |
|
759 | - case 56: |
|
760 | - case 57: |
|
761 | - case 58: |
|
762 | - case 59: |
|
763 | - echo $foo; |
|
764 | - break; |
|
704 | + case 1: |
|
705 | + case 2: |
|
706 | + case 3: |
|
707 | + case 4: |
|
708 | + case 5: |
|
709 | + case 6: |
|
710 | + case 7: |
|
711 | + case 8: |
|
712 | + case 9: |
|
713 | + case 10: |
|
714 | + case 11: |
|
715 | + case 12: |
|
716 | + case 13: |
|
717 | + case 14: |
|
718 | + case 15: |
|
719 | + case 16: |
|
720 | + case 17: |
|
721 | + case 18: |
|
722 | + case 19: |
|
723 | + case 20: |
|
724 | + case 21: |
|
725 | + case 22: |
|
726 | + case 23: |
|
727 | + case 24: |
|
728 | + case 25: |
|
729 | + case 26: |
|
730 | + case 27: |
|
731 | + case 28: |
|
732 | + case 29: |
|
733 | + case 30: |
|
734 | + case 31: |
|
735 | + case 32: |
|
736 | + case 33: |
|
737 | + case 34: |
|
738 | + case 35: |
|
739 | + case 36: |
|
740 | + case 37: |
|
741 | + case 38: |
|
742 | + case 39: |
|
743 | + case 40: |
|
744 | + case 41: |
|
745 | + case 42: |
|
746 | + case 43: |
|
747 | + case 44: |
|
748 | + case 45: |
|
749 | + case 46: |
|
750 | + case 47: |
|
751 | + case 48: |
|
752 | + case 49: |
|
753 | + case 50: |
|
754 | + case 51: |
|
755 | + case 52: |
|
756 | + case 53: |
|
757 | + case 54: |
|
758 | + case 55: |
|
759 | + case 56: |
|
760 | + case 57: |
|
761 | + case 58: |
|
762 | + case 59: |
|
763 | + echo $foo; |
|
764 | + break; |
|
765 | 765 | } |
766 | 766 | |
767 | 767 | // phpcs:set Squiz.Commenting.LongConditionClosingComment lineLimit 5 |
@@ -770,45 +770,45 @@ discard block |
||
770 | 770 | function quite_long_function() |
771 | 771 | { |
772 | 772 | // Ok - below limit |
773 | - if ($longFunction) { |
|
774 | - $variable = 'hello'; |
|
773 | + if ($longFunction) { |
|
774 | + $variable = 'hello'; |
|
775 | 775 | } |
776 | 776 | |
777 | 777 | // Ok - correct comment |
778 | - if ($longFunction) { |
|
779 | - // This is a long |
|
780 | - // IF statement |
|
781 | - // that does |
|
782 | - // not have |
|
783 | - // an ELSE |
|
784 | - // block on it |
|
785 | - }//Dragonbait-if |
|
778 | + if ($longFunction) { |
|
779 | + // This is a long |
|
780 | + // IF statement |
|
781 | + // that does |
|
782 | + // not have |
|
783 | + // an ELSE |
|
784 | + // block on it |
|
785 | + }//Dragonbait-if |
|
786 | 786 | |
787 | 787 | // This should be caught - wrong comment |
788 | - if ($longFunction) { |
|
789 | - // This is a long |
|
790 | - // IF statement |
|
791 | - // that does |
|
792 | - // not have |
|
793 | - // an ELSE |
|
794 | - // block on it |
|
795 | - $variable = 'hello'; |
|
796 | - } else { |
|
797 | - // Short ELSE |
|
798 | - }//end if |
|
788 | + if ($longFunction) { |
|
789 | + // This is a long |
|
790 | + // IF statement |
|
791 | + // that does |
|
792 | + // not have |
|
793 | + // an ELSE |
|
794 | + // block on it |
|
795 | + $variable = 'hello'; |
|
796 | + } else { |
|
797 | + // Short ELSE |
|
798 | + }//end if |
|
799 | 799 | |
800 | 800 | // This should be caught - no comment |
801 | - if ($longFunction) { |
|
802 | - // This is a long |
|
803 | - // IF statement |
|
804 | - // that does |
|
805 | - // not have |
|
806 | - // an ELSE |
|
807 | - // block on it |
|
808 | - $variable = 'hello'; |
|
809 | - } else { |
|
810 | - // Short ELSE |
|
811 | - } |
|
801 | + if ($longFunction) { |
|
802 | + // This is a long |
|
803 | + // IF statement |
|
804 | + // that does |
|
805 | + // not have |
|
806 | + // an ELSE |
|
807 | + // block on it |
|
808 | + $variable = 'hello'; |
|
809 | + } else { |
|
810 | + // Short ELSE |
|
811 | + } |
|
812 | 812 | } |
813 | 813 | |
814 | 814 | // phpcs:set Squiz.Commenting.LongConditionClosingComment lineLimit 30 |
@@ -816,218 +816,218 @@ discard block |
||
816 | 816 | |
817 | 817 | // Ok - below limit |
818 | 818 | foreach ($var as $val) { |
819 | - // Line 1 |
|
820 | - // Line 2 |
|
821 | - // Line 3 |
|
822 | - // Line 4 |
|
823 | - // Line 5 |
|
824 | - // Line 6 |
|
825 | - // Line 7 |
|
826 | - // Line 8 |
|
827 | - // Line 9 |
|
828 | - // Line 10 |
|
819 | + // Line 1 |
|
820 | + // Line 2 |
|
821 | + // Line 3 |
|
822 | + // Line 4 |
|
823 | + // Line 5 |
|
824 | + // Line 6 |
|
825 | + // Line 7 |
|
826 | + // Line 8 |
|
827 | + // Line 9 |
|
828 | + // Line 10 |
|
829 | 829 | } |
830 | 830 | |
831 | 831 | // Ok - has correct comment |
832 | 832 | foreach ($var as $val) { |
833 | - // Line 1 |
|
834 | - // Line 2 |
|
835 | - // Line 3 |
|
836 | - // Line 4 |
|
837 | - // Line 5 |
|
838 | - // Line 6 |
|
839 | - // Line 7 |
|
840 | - // Line 8 |
|
841 | - // Line 9 |
|
842 | - // Line 10 |
|
843 | - // Line 11 |
|
844 | - // Line 12 |
|
845 | - // Line 13 |
|
846 | - // Line 14 |
|
847 | - // Line 15 |
|
848 | - // Line 16 |
|
849 | - // Line 17 |
|
850 | - // Line 18 |
|
851 | - // Line 19 |
|
852 | - // Line 20 |
|
853 | - // Line 21 |
|
854 | - // Line 22 |
|
855 | - // Line 23 |
|
856 | - // Line 24 |
|
857 | - // Line 25 |
|
858 | - // Line 26 |
|
859 | - // Line 27 |
|
860 | - // Line 28 |
|
861 | - // Line 29 |
|
862 | - // Line 30 |
|
833 | + // Line 1 |
|
834 | + // Line 2 |
|
835 | + // Line 3 |
|
836 | + // Line 4 |
|
837 | + // Line 5 |
|
838 | + // Line 6 |
|
839 | + // Line 7 |
|
840 | + // Line 8 |
|
841 | + // Line 9 |
|
842 | + // Line 10 |
|
843 | + // Line 11 |
|
844 | + // Line 12 |
|
845 | + // Line 13 |
|
846 | + // Line 14 |
|
847 | + // Line 15 |
|
848 | + // Line 16 |
|
849 | + // Line 17 |
|
850 | + // Line 18 |
|
851 | + // Line 19 |
|
852 | + // Line 20 |
|
853 | + // Line 21 |
|
854 | + // Line 22 |
|
855 | + // Line 23 |
|
856 | + // Line 24 |
|
857 | + // Line 25 |
|
858 | + // Line 26 |
|
859 | + // Line 27 |
|
860 | + // Line 28 |
|
861 | + // Line 29 |
|
862 | + // Line 30 |
|
863 | 863 | }// Bye-Bye foreach() |
864 | 864 | |
865 | 865 | // This should be caught - wrong comment |
866 | 866 | foreach ($var as $val) { |
867 | - // Line 1 |
|
868 | - // Line 2 |
|
869 | - // Line 3 |
|
870 | - // Line 4 |
|
871 | - // Line 5 |
|
872 | - // Line 6 |
|
873 | - // Line 7 |
|
874 | - // Line 8 |
|
875 | - // Line 9 |
|
876 | - // Line 10 |
|
877 | - // Line 11 |
|
878 | - // Line 12 |
|
879 | - // Line 13 |
|
880 | - // Line 14 |
|
881 | - // Line 15 |
|
882 | - // Line 16 |
|
883 | - // Line 17 |
|
884 | - // Line 18 |
|
885 | - // Line 19 |
|
886 | - // Line 20 |
|
887 | - // Line 21 |
|
888 | - // Line 22 |
|
889 | - // Line 23 |
|
890 | - // Line 24 |
|
891 | - // Line 25 |
|
892 | - // Line 26 |
|
893 | - // Line 27 |
|
894 | - // Line 28 |
|
895 | - // Line 29 |
|
896 | - // Line 30 |
|
867 | + // Line 1 |
|
868 | + // Line 2 |
|
869 | + // Line 3 |
|
870 | + // Line 4 |
|
871 | + // Line 5 |
|
872 | + // Line 6 |
|
873 | + // Line 7 |
|
874 | + // Line 8 |
|
875 | + // Line 9 |
|
876 | + // Line 10 |
|
877 | + // Line 11 |
|
878 | + // Line 12 |
|
879 | + // Line 13 |
|
880 | + // Line 14 |
|
881 | + // Line 15 |
|
882 | + // Line 16 |
|
883 | + // Line 17 |
|
884 | + // Line 18 |
|
885 | + // Line 19 |
|
886 | + // Line 20 |
|
887 | + // Line 21 |
|
888 | + // Line 22 |
|
889 | + // Line 23 |
|
890 | + // Line 24 |
|
891 | + // Line 25 |
|
892 | + // Line 26 |
|
893 | + // Line 27 |
|
894 | + // Line 28 |
|
895 | + // Line 29 |
|
896 | + // Line 30 |
|
897 | 897 | }//end foreach |
898 | 898 | |
899 | 899 | // This should be caught - no comment |
900 | 900 | foreach ($var as $val) { |
901 | - // Line 1 |
|
902 | - // Line 2 |
|
903 | - // Line 3 |
|
904 | - // Line 4 |
|
905 | - // Line 5 |
|
906 | - // Line 6 |
|
907 | - // Line 7 |
|
908 | - // Line 8 |
|
909 | - // Line 9 |
|
910 | - // Line 10 |
|
911 | - // Line 11 |
|
912 | - // Line 12 |
|
913 | - // Line 13 |
|
914 | - // Line 14 |
|
915 | - // Line 15 |
|
916 | - // Line 16 |
|
917 | - // Line 17 |
|
918 | - // Line 18 |
|
919 | - // Line 19 |
|
920 | - // Line 20 |
|
921 | - // Line 21 |
|
922 | - // Line 22 |
|
923 | - // Line 23 |
|
924 | - // Line 24 |
|
925 | - // Line 25 |
|
926 | - // Line 26 |
|
927 | - // Line 27 |
|
928 | - // Line 28 |
|
929 | - // Line 29 |
|
930 | - // Line 30 |
|
901 | + // Line 1 |
|
902 | + // Line 2 |
|
903 | + // Line 3 |
|
904 | + // Line 4 |
|
905 | + // Line 5 |
|
906 | + // Line 6 |
|
907 | + // Line 7 |
|
908 | + // Line 8 |
|
909 | + // Line 9 |
|
910 | + // Line 10 |
|
911 | + // Line 11 |
|
912 | + // Line 12 |
|
913 | + // Line 13 |
|
914 | + // Line 14 |
|
915 | + // Line 15 |
|
916 | + // Line 16 |
|
917 | + // Line 17 |
|
918 | + // Line 18 |
|
919 | + // Line 19 |
|
920 | + // Line 20 |
|
921 | + // Line 21 |
|
922 | + // Line 22 |
|
923 | + // Line 23 |
|
924 | + // Line 24 |
|
925 | + // Line 25 |
|
926 | + // Line 26 |
|
927 | + // Line 27 |
|
928 | + // Line 28 |
|
929 | + // Line 29 |
|
930 | + // Line 30 |
|
931 | 931 | } |
932 | 932 | |
933 | 933 | // phpcs:set Squiz.Commenting.LongConditionClosingComment lineLimit 20 |
934 | 934 | // phpcs:set Squiz.Commenting.LongConditionClosingComment commentFormat //end %s |
935 | 935 | |
936 | 936 | try { |
937 | - // some code here. |
|
938 | - // some code here. |
|
939 | - // some code here. |
|
940 | - // some code here. |
|
941 | - // some code here. |
|
942 | - // some code here. |
|
943 | - // some code here. |
|
944 | - // some code here. |
|
945 | - // some code here. |
|
946 | - // some code here. |
|
947 | - // some code here. |
|
948 | - // some code here. |
|
937 | + // some code here. |
|
938 | + // some code here. |
|
939 | + // some code here. |
|
940 | + // some code here. |
|
941 | + // some code here. |
|
942 | + // some code here. |
|
943 | + // some code here. |
|
944 | + // some code here. |
|
945 | + // some code here. |
|
946 | + // some code here. |
|
947 | + // some code here. |
|
948 | + // some code here. |
|
949 | 949 | } catch (DALException $e) { |
950 | - // some code here. |
|
951 | - // some code here. |
|
952 | - // some code here. |
|
953 | - // some code here. |
|
954 | - // some code here. |
|
955 | - // some code here. |
|
956 | - // some code here. |
|
957 | - // some code here. |
|
950 | + // some code here. |
|
951 | + // some code here. |
|
952 | + // some code here. |
|
953 | + // some code here. |
|
954 | + // some code here. |
|
955 | + // some code here. |
|
956 | + // some code here. |
|
957 | + // some code here. |
|
958 | 958 | } catch (ChannelException $e) { |
959 | - // some code here. |
|
959 | + // some code here. |
|
960 | 960 | } finally { |
961 | - // some code here. |
|
961 | + // some code here. |
|
962 | 962 | } |
963 | 963 | |
964 | 964 | $expr = match ($foo) { |
965 | - // Line 1 |
|
966 | - // Line 2 |
|
967 | - // Line 3 |
|
968 | - // Line 4 |
|
969 | - // Line 5 |
|
970 | - // Line 6 |
|
971 | - // Line 7 |
|
972 | - // Line 8 |
|
973 | - // Line 9 |
|
974 | - // Line 10 |
|
975 | - // Line 11 |
|
976 | - // Line 12 |
|
977 | - // Line 13 |
|
978 | - // Line 14 |
|
979 | - // Line 15 |
|
980 | - // Line 16 |
|
981 | - // Line 17 |
|
982 | - // Line 18 |
|
983 | - // Line 19 |
|
984 | - // Line 20 |
|
965 | + // Line 1 |
|
966 | + // Line 2 |
|
967 | + // Line 3 |
|
968 | + // Line 4 |
|
969 | + // Line 5 |
|
970 | + // Line 6 |
|
971 | + // Line 7 |
|
972 | + // Line 8 |
|
973 | + // Line 9 |
|
974 | + // Line 10 |
|
975 | + // Line 11 |
|
976 | + // Line 12 |
|
977 | + // Line 13 |
|
978 | + // Line 14 |
|
979 | + // Line 15 |
|
980 | + // Line 16 |
|
981 | + // Line 17 |
|
982 | + // Line 18 |
|
983 | + // Line 19 |
|
984 | + // Line 20 |
|
985 | 985 | }; //end switch |
986 | 986 | |
987 | 987 | $expr = match ($foo) { |
988 | - // Line 1 |
|
989 | - // Line 2 |
|
990 | - // Line 3 |
|
991 | - // Line 4 |
|
992 | - // Line 5 |
|
993 | - // Line 6 |
|
994 | - // Line 7 |
|
995 | - // Line 8 |
|
996 | - // Line 9 |
|
997 | - // Line 10 |
|
998 | - // Line 11 |
|
999 | - // Line 12 |
|
1000 | - // Line 13 |
|
1001 | - // Line 14 |
|
1002 | - // Line 15 |
|
1003 | - // Line 16 |
|
1004 | - // Line 17 |
|
1005 | - // Line 18 |
|
1006 | - // Line 19 |
|
1007 | - // Line 20 |
|
988 | + // Line 1 |
|
989 | + // Line 2 |
|
990 | + // Line 3 |
|
991 | + // Line 4 |
|
992 | + // Line 5 |
|
993 | + // Line 6 |
|
994 | + // Line 7 |
|
995 | + // Line 8 |
|
996 | + // Line 9 |
|
997 | + // Line 10 |
|
998 | + // Line 11 |
|
999 | + // Line 12 |
|
1000 | + // Line 13 |
|
1001 | + // Line 14 |
|
1002 | + // Line 15 |
|
1003 | + // Line 16 |
|
1004 | + // Line 17 |
|
1005 | + // Line 18 |
|
1006 | + // Line 19 |
|
1007 | + // Line 20 |
|
1008 | 1008 | }; |
1009 | 1009 | |
1010 | 1010 | $array = [ |
1011 | - 'match' => match ($foo) { |
|
1012 | - // Line 1 |
|
1013 | - // Line 2 |
|
1014 | - // Line 3 |
|
1015 | - // Line 4 |
|
1016 | - // Line 5 |
|
1017 | - // Line 6 |
|
1018 | - // Line 7 |
|
1019 | - // Line 8 |
|
1020 | - // Line 9 |
|
1021 | - // Line 10 |
|
1022 | - // Line 11 |
|
1023 | - // Line 12 |
|
1024 | - // Line 13 |
|
1025 | - // Line 14 |
|
1026 | - // Line 15 |
|
1027 | - // Line 16 |
|
1028 | - // Line 17 |
|
1029 | - // Line 18 |
|
1030 | - // Line 19 |
|
1031 | - // Line 20 |
|
1032 | - }, |
|
1011 | + 'match' => match ($foo) { |
|
1012 | + // Line 1 |
|
1013 | + // Line 2 |
|
1014 | + // Line 3 |
|
1015 | + // Line 4 |
|
1016 | + // Line 5 |
|
1017 | + // Line 6 |
|
1018 | + // Line 7 |
|
1019 | + // Line 8 |
|
1020 | + // Line 9 |
|
1021 | + // Line 10 |
|
1022 | + // Line 11 |
|
1023 | + // Line 12 |
|
1024 | + // Line 13 |
|
1025 | + // Line 14 |
|
1026 | + // Line 15 |
|
1027 | + // Line 16 |
|
1028 | + // Line 17 |
|
1029 | + // Line 18 |
|
1030 | + // Line 19 |
|
1031 | + // Line 20 |
|
1032 | + }, |
|
1033 | 1033 | ]; |
@@ -15,41 +15,41 @@ |
||
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 | - 13 => 1, |
|
30 | - 33 => 1, |
|
31 | - 49 => 1, |
|
32 | - 50 => 1, |
|
33 | - 51 => 1, |
|
34 | - 52 => 1, |
|
35 | - ]; |
|
36 | - |
|
37 | - }//end getErrorList() |
|
38 | - |
|
39 | - |
|
40 | - /** |
|
41 | - * Returns the lines where warnings should occur. |
|
42 | - * |
|
43 | - * The key of the array should represent the line number and the value |
|
44 | - * should represent the number of warnings that should occur on that line. |
|
45 | - * |
|
46 | - * @return array<int, int> |
|
47 | - */ |
|
48 | - public function getWarningList() |
|
49 | - { |
|
50 | - return []; |
|
51 | - |
|
52 | - }//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 | + 13 => 1, |
|
30 | + 33 => 1, |
|
31 | + 49 => 1, |
|
32 | + 50 => 1, |
|
33 | + 51 => 1, |
|
34 | + 52 => 1, |
|
35 | + ]; |
|
36 | + |
|
37 | + }//end getErrorList() |
|
38 | + |
|
39 | + |
|
40 | + /** |
|
41 | + * Returns the lines where warnings should occur. |
|
42 | + * |
|
43 | + * The key of the array should represent the line number and the value |
|
44 | + * should represent the number of warnings that should occur on that line. |
|
45 | + * |
|
46 | + * @return array<int, int> |
|
47 | + */ |
|
48 | + public function getWarningList() |
|
49 | + { |
|
50 | + return []; |
|
51 | + |
|
52 | + }//end getWarningList() |
|
53 | 53 | |
54 | 54 | |
55 | 55 | }//end class |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * |
26 | 26 | * @return array<int, int> |
27 | 27 | */ |
28 | - public function getErrorList($testFile='PostStatementCommentUnitTest.inc') |
|
28 | + public function getErrorList($testFile = 'PostStatementCommentUnitTest.inc') |
|
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | 31 | case 'PostStatementCommentUnitTest.inc': |
@@ -15,55 +15,55 @@ |
||
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='PostStatementCommentUnitTest.inc') |
|
29 | - { |
|
30 | - switch ($testFile) { |
|
31 | - case 'PostStatementCommentUnitTest.inc': |
|
32 | - return [ |
|
33 | - 6 => 1, |
|
34 | - 10 => 1, |
|
35 | - 18 => 1, |
|
36 | - 35 => 1, |
|
37 | - 53 => 1, |
|
38 | - ]; |
|
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='PostStatementCommentUnitTest.inc') |
|
29 | + { |
|
30 | + switch ($testFile) { |
|
31 | + case 'PostStatementCommentUnitTest.inc': |
|
32 | + return [ |
|
33 | + 6 => 1, |
|
34 | + 10 => 1, |
|
35 | + 18 => 1, |
|
36 | + 35 => 1, |
|
37 | + 53 => 1, |
|
38 | + ]; |
|
39 | 39 | |
40 | - case 'PostStatementCommentUnitTest.1.js': |
|
41 | - return [ |
|
42 | - 1 => 1, |
|
43 | - 4 => 1, |
|
44 | - 9 => 1, |
|
45 | - ]; |
|
40 | + case 'PostStatementCommentUnitTest.1.js': |
|
41 | + return [ |
|
42 | + 1 => 1, |
|
43 | + 4 => 1, |
|
44 | + 9 => 1, |
|
45 | + ]; |
|
46 | 46 | |
47 | - default: |
|
48 | - return []; |
|
49 | - }//end switch |
|
47 | + default: |
|
48 | + return []; |
|
49 | + }//end switch |
|
50 | 50 | |
51 | - }//end getErrorList() |
|
51 | + }//end getErrorList() |
|
52 | 52 | |
53 | 53 | |
54 | - /** |
|
55 | - * Returns the lines where warnings should occur. |
|
56 | - * |
|
57 | - * The key of the array should represent the line number and the value |
|
58 | - * should represent the number of warnings that should occur on that line. |
|
59 | - * |
|
60 | - * @return array<int, int> |
|
61 | - */ |
|
62 | - public function getWarningList() |
|
63 | - { |
|
64 | - return []; |
|
54 | + /** |
|
55 | + * Returns the lines where warnings should occur. |
|
56 | + * |
|
57 | + * The key of the array should represent the line number and the value |
|
58 | + * should represent the number of warnings that should occur on that line. |
|
59 | + * |
|
60 | + * @return array<int, int> |
|
61 | + */ |
|
62 | + public function getWarningList() |
|
63 | + { |
|
64 | + return []; |
|
65 | 65 | |
66 | - }//end getWarningList() |
|
66 | + }//end getWarningList() |
|
67 | 67 | |
68 | 68 | |
69 | 69 | }//end class |
@@ -28,24 +28,24 @@ |
||
28 | 28 | public function getErrorList($testFile='PostStatementCommentUnitTest.inc') |
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | - case 'PostStatementCommentUnitTest.inc': |
|
32 | - return [ |
|
33 | - 6 => 1, |
|
34 | - 10 => 1, |
|
35 | - 18 => 1, |
|
36 | - 35 => 1, |
|
37 | - 53 => 1, |
|
38 | - ]; |
|
31 | + case 'PostStatementCommentUnitTest.inc': |
|
32 | + return [ |
|
33 | + 6 => 1, |
|
34 | + 10 => 1, |
|
35 | + 18 => 1, |
|
36 | + 35 => 1, |
|
37 | + 53 => 1, |
|
38 | + ]; |
|
39 | 39 | |
40 | - case 'PostStatementCommentUnitTest.1.js': |
|
41 | - return [ |
|
42 | - 1 => 1, |
|
43 | - 4 => 1, |
|
44 | - 9 => 1, |
|
45 | - ]; |
|
40 | + case 'PostStatementCommentUnitTest.1.js': |
|
41 | + return [ |
|
42 | + 1 => 1, |
|
43 | + 4 => 1, |
|
44 | + 9 => 1, |
|
45 | + ]; |
|
46 | 46 | |
47 | - default: |
|
48 | - return []; |
|
47 | + default: |
|
48 | + return []; |
|
49 | 49 | }//end switch |
50 | 50 | |
51 | 51 | }//end getErrorList() |
@@ -144,26 +144,26 @@ |
||
144 | 144 | } |
145 | 145 | |
146 | 146 | switch ($var) { |
147 | - case 'foo': |
|
148 | - /* |
|
147 | + case 'foo': |
|
148 | + /* |
|
149 | 149 | Foo comment. |
150 | 150 | This is a multiple |
151 | 151 | line comment for Foo. |
152 | 152 | */ |
153 | 153 | |
154 | - echo 'Foo'; |
|
155 | - break; |
|
154 | + echo 'Foo'; |
|
155 | + break; |
|
156 | 156 | |
157 | - default: |
|
157 | + default: |
|
158 | 158 | |
159 | - /* |
|
159 | + /* |
|
160 | 160 | Foo comment. |
161 | 161 | This is a multiple |
162 | 162 | line comment for Foo. |
163 | 163 | */ |
164 | 164 | |
165 | - echo 'Default'; |
|
166 | - break; |
|
165 | + echo 'Default'; |
|
166 | + break; |
|
167 | 167 | }//end switch |
168 | 168 | |
169 | 169 | /** |
@@ -186,7 +186,7 @@ |
||
186 | 186 | /* |
187 | 187 | Comment goes here |
188 | 188 | */ |
189 | -$two = (1 + 1); // I'm not a comment closer! |
|
189 | +$two = (1 + 1); // I'm not a comment closer! |
|
190 | 190 | |
191 | 191 | class Foo |
192 | 192 | { |
@@ -80,27 +80,27 @@ discard block |
||
80 | 80 | |
81 | 81 | function func() |
82 | 82 | { |
83 | - echo 1; |
|
84 | - /** |
|
83 | + echo 1; |
|
84 | + /** |
|
85 | 85 | test |
86 | 86 | here |
87 | - **/ |
|
88 | - echo 'test'; |
|
89 | - /** |
|
87 | + **/ |
|
88 | + echo 'test'; |
|
89 | + /** |
|
90 | 90 | Test |
91 | 91 | here |
92 | - **/ |
|
92 | + **/ |
|
93 | 93 | |
94 | 94 | }//end func() |
95 | 95 | |
96 | 96 | public static function test() |
97 | 97 | { |
98 | - /* |
|
98 | + /* |
|
99 | 99 | Block comments do not require a blank line before them |
100 | 100 | if they are after T_OPEN_CURLY_BRACKET. |
101 | 101 | */ |
102 | 102 | |
103 | - $code = ''; |
|
103 | + $code = ''; |
|
104 | 104 | |
105 | 105 | }//end test() |
106 | 106 | |
@@ -108,25 +108,25 @@ discard block |
||
108 | 108 | public static function test() |
109 | 109 | { |
110 | 110 | |
111 | - /* |
|
111 | + /* |
|
112 | 112 | Block comments do not require a blank line before them |
113 | 113 | if they are after T_OPEN_CURLY_BRACKET. |
114 | 114 | */ |
115 | 115 | |
116 | - $code = ''; |
|
116 | + $code = ''; |
|
117 | 117 | |
118 | 118 | }//end test() |
119 | 119 | |
120 | 120 | class MyClass |
121 | 121 | { |
122 | 122 | |
123 | - /** |
|
124 | - * Comment should be ignored. |
|
125 | - * |
|
126 | - * @var integer |
|
127 | - * @since 4.0.0 |
|
128 | - */ |
|
129 | - const LEFT = 1; |
|
123 | + /** |
|
124 | + * Comment should be ignored. |
|
125 | + * |
|
126 | + * @var integer |
|
127 | + * @since 4.0.0 |
|
128 | + */ |
|
129 | + const LEFT = 1; |
|
130 | 130 | |
131 | 131 | } |
132 | 132 | |
@@ -136,34 +136,34 @@ discard block |
||
136 | 136 | */ |
137 | 137 | final class MyClass |
138 | 138 | { |
139 | - /** |
|
140 | - * Comment should be ignored. |
|
141 | - * |
|
142 | - */ |
|
143 | - final public function test() {} |
|
139 | + /** |
|
140 | + * Comment should be ignored. |
|
141 | + * |
|
142 | + */ |
|
143 | + final public function test() {} |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | switch ($var) { |
147 | - case 'foo': |
|
148 | - /* |
|
147 | + case 'foo': |
|
148 | + /* |
|
149 | 149 | Foo comment. |
150 | 150 | This is a multiple |
151 | 151 | line comment for Foo. |
152 | 152 | */ |
153 | 153 | |
154 | - echo 'Foo'; |
|
155 | - break; |
|
154 | + echo 'Foo'; |
|
155 | + break; |
|
156 | 156 | |
157 | - default: |
|
157 | + default: |
|
158 | 158 | |
159 | - /* |
|
159 | + /* |
|
160 | 160 | Foo comment. |
161 | 161 | This is a multiple |
162 | 162 | line comment for Foo. |
163 | 163 | */ |
164 | 164 | |
165 | - echo 'Default'; |
|
166 | - break; |
|
165 | + echo 'Default'; |
|
166 | + break; |
|
167 | 167 | }//end switch |
168 | 168 | |
169 | 169 | /** |
@@ -191,12 +191,12 @@ discard block |
||
191 | 191 | class Foo |
192 | 192 | { |
193 | 193 | |
194 | - /** |
|
195 | - * Comment here. |
|
196 | - * |
|
197 | - * @var array |
|
198 | - */ |
|
199 | - var $bar = array(); |
|
194 | + /** |
|
195 | + * Comment here. |
|
196 | + * |
|
197 | + * @var array |
|
198 | + */ |
|
199 | + var $bar = array(); |
|
200 | 200 | |
201 | 201 | } |
202 | 202 | |
@@ -281,12 +281,12 @@ discard block |
||
281 | 281 | |
282 | 282 | final class MyClass |
283 | 283 | { |
284 | - /** |
|
285 | - * Comment should be ignored, even though there is an attribute between the docblock and the function declaration |
|
286 | - */ |
|
287 | - #[AttributeA] |
|
288 | - #[AttributeB] |
|
289 | - final public function test() {} |
|
284 | + /** |
|
285 | + * Comment should be ignored, even though there is an attribute between the docblock and the function declaration |
|
286 | + */ |
|
287 | + #[AttributeA] |
|
288 | + #[AttributeB] |
|
289 | + final public function test() {} |
|
290 | 290 | } |
291 | 291 | |
292 | 292 | /** |
@@ -294,10 +294,10 @@ discard block |
||
294 | 294 | */ |
295 | 295 | abstract class MyClass |
296 | 296 | { |
297 | - /** |
|
298 | - * Comment should be ignored. |
|
299 | - */ |
|
300 | - readonly public string $prop; |
|
297 | + /** |
|
298 | + * Comment should be ignored. |
|
299 | + */ |
|
300 | + readonly public string $prop; |
|
301 | 301 | } |
302 | 302 | |
303 | 303 | /** |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | * @return |
15 | 15 | * @throws |
16 | 16 | */ |
17 | - private function _functionCall($stackPtr, $depth=1, $index) |
|
17 | + private function _functionCall($stackPtr, $depth = 1, $index) |
|
18 | 18 | { |
19 | 19 | return $stackPtr; |
20 | 20 | |
@@ -532,13 +532,13 @@ discard block |
||
532 | 532 | // Closures should be ignored. |
533 | 533 | preg_replace_callback( |
534 | 534 | '~-([a-z])~', |
535 | - function ($match) { |
|
535 | + function($match) { |
|
536 | 536 | return strtoupper($match[1]); |
537 | 537 | }, |
538 | 538 | 'hello-world' |
539 | 539 | ); |
540 | 540 | |
541 | -$callback = function ($bar) use ($foo) |
|
541 | +$callback = function($bar) use ($foo) |
|
542 | 542 | { |
543 | 543 | $bar += $foo; |
544 | 544 | }; |
@@ -585,7 +585,7 @@ discard block |
||
585 | 585 | */ |
586 | 586 | public function containsClosure() |
587 | 587 | { |
588 | - function ($e) { |
|
588 | + function($e) { |
|
589 | 589 | return new Event($e); |
590 | 590 | }, |
591 | 591 | |
@@ -726,7 +726,7 @@ discard block |
||
726 | 726 | * |
727 | 727 | * @return void |
728 | 728 | */ |
729 | -public function myFunction (string $name1, int $name2, float $name3, bool $name4) { |
|
729 | +public function myFunction(string $name1, int $name2, float $name3, bool $name4) { |
|
730 | 730 | } |
731 | 731 | |
732 | 732 | /** |
@@ -906,7 +906,7 @@ discard block |
||
906 | 906 | */ |
907 | 907 | function returnArrayWithClosure() |
908 | 908 | { |
909 | - function () { |
|
909 | + function() { |
|
910 | 910 | return; |
911 | 911 | }; |
912 | 912 | |
@@ -937,7 +937,7 @@ discard block |
||
937 | 937 | */ |
938 | 938 | function returnVoidWithClosure() |
939 | 939 | { |
940 | - function () { |
|
940 | + function() { |
|
941 | 941 | return 1; |
942 | 942 | }; |
943 | 943 | } |
@@ -965,7 +965,7 @@ discard block |
||
965 | 965 | */ |
966 | 966 | public function test() |
967 | 967 | { |
968 | - function () { |
|
968 | + function() { |
|
969 | 969 | return 4; |
970 | 970 | }; |
971 | 971 | } |
@@ -2,148 +2,148 @@ discard block |
||
2 | 2 | class PHP_CodeSniffer_File |
3 | 3 | { |
4 | 4 | |
5 | - /** |
|
6 | - * a simple function comment. |
|
7 | - * |
|
8 | - * long desc here |
|
9 | - * |
|
10 | - * @param bool $stackPtr The position in @ @unknown the stack of the token |
|
11 | - * that opened the scope |
|
12 | - * @param int $detph How many scope levels down we are. |
|
13 | - * @param string $index The index |
|
14 | - * @return |
|
15 | - * @throws |
|
16 | - */ |
|
17 | - private function _functionCall($stackPtr, $depth=1, $index) |
|
18 | - { |
|
19 | - return $stackPtr; |
|
20 | - |
|
21 | - }//end _functionCall() |
|
22 | - |
|
23 | - // |
|
24 | - // Sample function comment |
|
25 | - // |
|
26 | - // |
|
27 | - // |
|
28 | - public function invalidCommentStyle() |
|
29 | - { |
|
30 | - |
|
31 | - }//end invalidCommentStyle() |
|
32 | - |
|
33 | - |
|
34 | - /** |
|
35 | - * |
|
36 | - * A simple function comment |
|
37 | - * Span multiple line |
|
38 | - * |
|
39 | - * |
|
40 | - * 0Long description with extra blank line before and after |
|
41 | - * |
|
42 | - * |
|
43 | - * @return void |
|
44 | - */ |
|
45 | - public function extraDescriptionNewlines() |
|
46 | - { |
|
47 | - return true; |
|
48 | - }//end extraDescriptionNewlines() |
|
49 | - |
|
50 | - |
|
51 | - /** |
|
52 | - * -A simple function comment. |
|
53 | - * @return void |
|
54 | - */ |
|
55 | - public function missingNewlinesBeforeTags() |
|
56 | - { |
|
57 | - return; |
|
58 | - }//end missingNewlinesBeforeTags() |
|
59 | - |
|
60 | - |
|
61 | - /** |
|
62 | - * Access tag should not be treated as a long description. |
|
63 | - * |
|
64 | - * @access public |
|
65 | - * @return void |
|
66 | - */ |
|
67 | - public function accessTag() |
|
68 | - { |
|
69 | - |
|
70 | - }//end accessTag() |
|
71 | - |
|
72 | - /** |
|
73 | - * Constructor. |
|
74 | - * |
|
75 | - * No return tag |
|
76 | - */ |
|
77 | - function PHP_CodeSniffer_File() |
|
78 | - { |
|
79 | - return; |
|
80 | - } |
|
81 | - |
|
82 | - |
|
83 | - /** |
|
84 | - * Destructor. |
|
85 | - * |
|
86 | - * No return tag too |
|
87 | - */ |
|
88 | - function _PHP_CodeSniffer_File() |
|
89 | - { |
|
90 | - return; |
|
91 | - } |
|
92 | - |
|
93 | - |
|
94 | - /** |
|
95 | - * Destructor PHP5. |
|
96 | - */ |
|
97 | - function __destruct() |
|
98 | - { |
|
99 | - return; |
|
100 | - } |
|
101 | - |
|
102 | - |
|
103 | - function missingComment() |
|
104 | - { |
|
105 | - return; |
|
106 | - } |
|
107 | - |
|
108 | - |
|
109 | - /** |
|
110 | - * no return tag. |
|
111 | - * |
|
112 | - */ |
|
113 | - public function noReturn($one) |
|
114 | - { |
|
115 | - |
|
116 | - }//end noReturn() |
|
117 | - |
|
118 | - |
|
119 | - /** |
|
120 | - * Param not immediate. |
|
121 | - * |
|
122 | - * @return |
|
123 | - * @param int $threeSpaces |
|
124 | - * @param integer $superfluous |
|
125 | - * @param miss |
|
126 | - * @param |
|
127 | - */ |
|
128 | - public function missingDescription($threeSpaces) |
|
129 | - { |
|
130 | - |
|
131 | - }//end missingDescription() |
|
132 | - |
|
133 | - |
|
134 | - /** |
|
135 | - * Comments not capitalised. |
|
136 | - * |
|
137 | - * @param integer $one comment |
|
138 | - * @param array $two -comment |
|
139 | - * @param MyClas $three 0comment |
|
140 | - * |
|
141 | - * @return void |
|
142 | - */ |
|
143 | - public function oneSpaceAfterLongestVar($one, $two, MyClass $three) |
|
144 | - { |
|
145 | - |
|
146 | - }//end oneSpaceAfterLongestVar() |
|
5 | + /** |
|
6 | + * a simple function comment. |
|
7 | + * |
|
8 | + * long desc here |
|
9 | + * |
|
10 | + * @param bool $stackPtr The position in @ @unknown the stack of the token |
|
11 | + * that opened the scope |
|
12 | + * @param int $detph How many scope levels down we are. |
|
13 | + * @param string $index The index |
|
14 | + * @return |
|
15 | + * @throws |
|
16 | + */ |
|
17 | + private function _functionCall($stackPtr, $depth=1, $index) |
|
18 | + { |
|
19 | + return $stackPtr; |
|
20 | + |
|
21 | + }//end _functionCall() |
|
22 | + |
|
23 | + // |
|
24 | + // Sample function comment |
|
25 | + // |
|
26 | + // |
|
27 | + // |
|
28 | + public function invalidCommentStyle() |
|
29 | + { |
|
30 | + |
|
31 | + }//end invalidCommentStyle() |
|
32 | + |
|
33 | + |
|
34 | + /** |
|
35 | + * |
|
36 | + * A simple function comment |
|
37 | + * Span multiple line |
|
38 | + * |
|
39 | + * |
|
40 | + * 0Long description with extra blank line before and after |
|
41 | + * |
|
42 | + * |
|
43 | + * @return void |
|
44 | + */ |
|
45 | + public function extraDescriptionNewlines() |
|
46 | + { |
|
47 | + return true; |
|
48 | + }//end extraDescriptionNewlines() |
|
49 | + |
|
50 | + |
|
51 | + /** |
|
52 | + * -A simple function comment. |
|
53 | + * @return void |
|
54 | + */ |
|
55 | + public function missingNewlinesBeforeTags() |
|
56 | + { |
|
57 | + return; |
|
58 | + }//end missingNewlinesBeforeTags() |
|
59 | + |
|
60 | + |
|
61 | + /** |
|
62 | + * Access tag should not be treated as a long description. |
|
63 | + * |
|
64 | + * @access public |
|
65 | + * @return void |
|
66 | + */ |
|
67 | + public function accessTag() |
|
68 | + { |
|
69 | + |
|
70 | + }//end accessTag() |
|
71 | + |
|
72 | + /** |
|
73 | + * Constructor. |
|
74 | + * |
|
75 | + * No return tag |
|
76 | + */ |
|
77 | + function PHP_CodeSniffer_File() |
|
78 | + { |
|
79 | + return; |
|
80 | + } |
|
81 | + |
|
82 | + |
|
83 | + /** |
|
84 | + * Destructor. |
|
85 | + * |
|
86 | + * No return tag too |
|
87 | + */ |
|
88 | + function _PHP_CodeSniffer_File() |
|
89 | + { |
|
90 | + return; |
|
91 | + } |
|
92 | + |
|
93 | + |
|
94 | + /** |
|
95 | + * Destructor PHP5. |
|
96 | + */ |
|
97 | + function __destruct() |
|
98 | + { |
|
99 | + return; |
|
100 | + } |
|
101 | + |
|
102 | + |
|
103 | + function missingComment() |
|
104 | + { |
|
105 | + return; |
|
106 | + } |
|
107 | + |
|
108 | + |
|
109 | + /** |
|
110 | + * no return tag. |
|
111 | + * |
|
112 | + */ |
|
113 | + public function noReturn($one) |
|
114 | + { |
|
115 | + |
|
116 | + }//end noReturn() |
|
117 | + |
|
118 | + |
|
119 | + /** |
|
120 | + * Param not immediate. |
|
121 | + * |
|
122 | + * @return |
|
123 | + * @param int $threeSpaces |
|
124 | + * @param integer $superfluous |
|
125 | + * @param miss |
|
126 | + * @param |
|
127 | + */ |
|
128 | + public function missingDescription($threeSpaces) |
|
129 | + { |
|
130 | + |
|
131 | + }//end missingDescription() |
|
132 | + |
|
133 | + |
|
134 | + /** |
|
135 | + * Comments not capitalised. |
|
136 | + * |
|
137 | + * @param integer $one comment |
|
138 | + * @param array $two -comment |
|
139 | + * @param MyClas $three 0comment |
|
140 | + * |
|
141 | + * @return void |
|
142 | + */ |
|
143 | + public function oneSpaceAfterLongestVar($one, $two, MyClass $three) |
|
144 | + { |
|
145 | + |
|
146 | + }//end oneSpaceAfterLongestVar() |
|
147 | 147 | |
148 | 148 | |
149 | 149 | }//end class |
@@ -160,19 +160,19 @@ discard block |
||
160 | 160 | */ |
161 | 161 | public function functionOutsideClass(&$str, &$foo) |
162 | 162 | { |
163 | - return; |
|
163 | + return; |
|
164 | 164 | }//end functionOutsideClass() |
165 | 165 | |
166 | 166 | function missingCommentOutsideClass() |
167 | 167 | { |
168 | - return; |
|
168 | + return; |
|
169 | 169 | }//end missingCommentOutsideClass() |
170 | 170 | |
171 | 171 | |
172 | 172 | ?><?php |
173 | 173 | function tagBeforeComment() |
174 | 174 | { |
175 | - return; |
|
175 | + return; |
|
176 | 176 | }//end tagBeforeComment() |
177 | 177 | |
178 | 178 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | */ |
248 | 248 | public function typeHint(MyClass $a1, $a2, myclass $a3, $a4) |
249 | 249 | { |
250 | - return (3 => 'myclass obj'); |
|
250 | + return (3 => 'myclass obj'); |
|
251 | 251 | |
252 | 252 | }//end typeHint() |
253 | 253 | |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | */ |
265 | 265 | public function mixedType($a1, $a2, $a3, $a4) |
266 | 266 | { |
267 | - return true; |
|
267 | + return true; |
|
268 | 268 | |
269 | 269 | }//end mixedType() |
270 | 270 | |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | */ |
286 | 286 | public function mixedArrayType($a1, $a2, array $a3, $a4, $a5, $a6, $a7, unknownTypeHint $a8) |
287 | 287 | { |
288 | - return 1; |
|
288 | + return 1; |
|
289 | 289 | |
290 | 290 | }//end mixedArrayType() |
291 | 291 | |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | */ |
321 | 321 | public function missingShortDescriptionInFunctionComment() |
322 | 322 | { |
323 | - return true; |
|
323 | + return true; |
|
324 | 324 | |
325 | 325 | }//end missingShortDescriptionInFunctionComment() |
326 | 326 | |
@@ -328,25 +328,25 @@ discard block |
||
328 | 328 | class Another_Class |
329 | 329 | { |
330 | 330 | |
331 | - /** |
|
332 | - * Destructor should not include a return tag. |
|
333 | - * |
|
334 | - * @return void |
|
335 | - */ |
|
336 | - function __destruct() |
|
337 | - { |
|
338 | - return; |
|
339 | - } |
|
340 | - |
|
341 | - /** |
|
342 | - * Constructor should not include a return tag. |
|
343 | - * |
|
344 | - * @return void |
|
345 | - */ |
|
346 | - function __construct() |
|
347 | - { |
|
348 | - return; |
|
349 | - } |
|
331 | + /** |
|
332 | + * Destructor should not include a return tag. |
|
333 | + * |
|
334 | + * @return void |
|
335 | + */ |
|
336 | + function __destruct() |
|
337 | + { |
|
338 | + return; |
|
339 | + } |
|
340 | + |
|
341 | + /** |
|
342 | + * Constructor should not include a return tag. |
|
343 | + * |
|
344 | + * @return void |
|
345 | + */ |
|
346 | + function __construct() |
|
347 | + { |
|
348 | + return; |
|
349 | + } |
|
350 | 350 | |
351 | 351 | }//end class |
352 | 352 | |
@@ -388,9 +388,9 @@ discard block |
||
388 | 388 | */ |
389 | 389 | public function myFunction() |
390 | 390 | { |
391 | - if ($condition === FALSE) { |
|
392 | - echo 'hi'; |
|
393 | - } |
|
391 | + if ($condition === FALSE) { |
|
392 | + echo 'hi'; |
|
393 | + } |
|
394 | 394 | |
395 | 395 | }//end myFunction() |
396 | 396 | |
@@ -402,12 +402,12 @@ discard block |
||
402 | 402 | */ |
403 | 403 | public function myFunction() |
404 | 404 | { |
405 | - if ($condition === FALSE) { |
|
406 | - echo 'hi'; |
|
407 | - return; |
|
408 | - } |
|
405 | + if ($condition === FALSE) { |
|
406 | + echo 'hi'; |
|
407 | + return; |
|
408 | + } |
|
409 | 409 | |
410 | - return 'blah'; |
|
410 | + return 'blah'; |
|
411 | 411 | |
412 | 412 | }//end myFunction() |
413 | 413 | |
@@ -419,11 +419,11 @@ discard block |
||
419 | 419 | */ |
420 | 420 | public function myFunction() |
421 | 421 | { |
422 | - if ($condition === FALSE) { |
|
423 | - echo 'hi'; |
|
424 | - } |
|
422 | + if ($condition === FALSE) { |
|
423 | + echo 'hi'; |
|
424 | + } |
|
425 | 425 | |
426 | - return 'blah'; |
|
426 | + return 'blah'; |
|
427 | 427 | |
428 | 428 | }//end myFunction() |
429 | 429 | |
@@ -441,12 +441,12 @@ discard block |
||
441 | 441 | function myFunction($arg1) {} |
442 | 442 | |
443 | 443 | class MyClass() { |
444 | - /** |
|
445 | - * An abstract function. |
|
446 | - * |
|
447 | - * @return string[] |
|
448 | - */ |
|
449 | - abstract final protected function myFunction(); |
|
444 | + /** |
|
445 | + * An abstract function. |
|
446 | + * |
|
447 | + * @return string[] |
|
448 | + */ |
|
449 | + abstract final protected function myFunction(); |
|
450 | 450 | } |
451 | 451 | |
452 | 452 | /** |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | function test($test) |
460 | 460 | { |
461 | 461 | if ($test === TRUE) { |
462 | - return; |
|
462 | + return; |
|
463 | 463 | } |
464 | 464 | |
465 | 465 | return $test; |
@@ -531,17 +531,17 @@ discard block |
||
531 | 531 | |
532 | 532 | // Closures should be ignored. |
533 | 533 | preg_replace_callback( |
534 | - '~-([a-z])~', |
|
535 | - function ($match) { |
|
536 | - return strtoupper($match[1]); |
|
537 | - }, |
|
538 | - 'hello-world' |
|
534 | + '~-([a-z])~', |
|
535 | + function ($match) { |
|
536 | + return strtoupper($match[1]); |
|
537 | + }, |
|
538 | + 'hello-world' |
|
539 | 539 | ); |
540 | 540 | |
541 | 541 | $callback = function ($bar) use ($foo) |
542 | - { |
|
543 | - $bar += $foo; |
|
544 | - }; |
|
542 | + { |
|
543 | + $bar += $foo; |
|
544 | + }; |
|
545 | 545 | |
546 | 546 | /** |
547 | 547 | * Comment should end with '*', not '**' before the slash. |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | */ |
575 | 575 | public function variableArgs($a1, $a2) |
576 | 576 | { |
577 | - return true; |
|
577 | + return true; |
|
578 | 578 | |
579 | 579 | }//end variableArgs() |
580 | 580 | |
@@ -585,9 +585,9 @@ discard block |
||
585 | 585 | */ |
586 | 586 | public function containsClosure() |
587 | 587 | { |
588 | - function ($e) { |
|
589 | - return new Event($e); |
|
590 | - }, |
|
588 | + function ($e) { |
|
589 | + return new Event($e); |
|
590 | + }, |
|
591 | 591 | |
592 | 592 | }//end containsClosure() |
593 | 593 | |
@@ -609,7 +609,7 @@ discard block |
||
609 | 609 | * @return void |
610 | 610 | */ |
611 | 611 | public function usesCallable(callable $cb) { |
612 | - $cb(); |
|
612 | + $cb(); |
|
613 | 613 | }//end usesCallable() |
614 | 614 | |
615 | 615 | /** |
@@ -648,18 +648,18 @@ discard block |
||
648 | 648 | * @return string |
649 | 649 | */ |
650 | 650 | public function _() { |
651 | - return $foo; |
|
651 | + return $foo; |
|
652 | 652 | } |
653 | 653 | |
654 | 654 | class Baz { |
655 | - /** |
|
656 | - * The PHP5 constructor |
|
657 | - * |
|
658 | - * No return tag |
|
659 | - */ |
|
660 | - public function __construct() { |
|
661 | - |
|
662 | - } |
|
655 | + /** |
|
656 | + * The PHP5 constructor |
|
657 | + * |
|
658 | + * No return tag |
|
659 | + */ |
|
660 | + public function __construct() { |
|
661 | + |
|
662 | + } |
|
663 | 663 | } |
664 | 664 | |
665 | 665 | /** |
@@ -677,9 +677,9 @@ discard block |
||
677 | 677 | */ |
678 | 678 | function yieldTest() |
679 | 679 | { |
680 | - for ($i = 0; $i < 5; $i++) { |
|
681 | - yield $i; |
|
682 | - } |
|
680 | + for ($i = 0; $i < 5; $i++) { |
|
681 | + yield $i; |
|
682 | + } |
|
683 | 683 | } |
684 | 684 | |
685 | 685 | /** |
@@ -689,9 +689,9 @@ discard block |
||
689 | 689 | */ |
690 | 690 | function yieldTest() |
691 | 691 | { |
692 | - for ($i = 0; $i < 5; $i++) { |
|
693 | - yield $i; |
|
694 | - } |
|
692 | + for ($i = 0; $i < 5; $i++) { |
|
693 | + yield $i; |
|
694 | + } |
|
695 | 695 | } |
696 | 696 | |
697 | 697 | /** |
@@ -758,7 +758,7 @@ discard block |
||
758 | 758 | * @return integer This is a description. |
759 | 759 | */ |
760 | 760 | public function myFunction() { |
761 | - return 5; |
|
761 | + return 5; |
|
762 | 762 | } |
763 | 763 | |
764 | 764 | /** |
@@ -767,7 +767,7 @@ discard block |
||
767 | 767 | * @return int This is a description. |
768 | 768 | */ |
769 | 769 | public function myFunction() { |
770 | - return 5; |
|
770 | + return 5; |
|
771 | 771 | } |
772 | 772 | |
773 | 773 | /** |
@@ -808,18 +808,18 @@ discard block |
||
808 | 808 | */ |
809 | 809 | public function someFunc(): void |
810 | 810 | { |
811 | - $class = new class |
|
812 | - { |
|
813 | - /** |
|
814 | - * Do something. |
|
815 | - * |
|
816 | - * @return string |
|
817 | - */ |
|
818 | - public function getString(): string |
|
819 | - { |
|
820 | - return 'some string'; |
|
821 | - } |
|
822 | - }; |
|
811 | + $class = new class |
|
812 | + { |
|
813 | + /** |
|
814 | + * Do something. |
|
815 | + * |
|
816 | + * @return string |
|
817 | + */ |
|
818 | + public function getString(): string |
|
819 | + { |
|
820 | + return 'some string'; |
|
821 | + } |
|
822 | + }; |
|
823 | 823 | } |
824 | 824 | |
825 | 825 | /** |
@@ -829,7 +829,7 @@ discard block |
||
829 | 829 | */ |
830 | 830 | function returnTypeWithDescriptionA() |
831 | 831 | { |
832 | - return 5; |
|
832 | + return 5; |
|
833 | 833 | |
834 | 834 | }//end returnTypeWithDescriptionA() |
835 | 835 | |
@@ -841,7 +841,7 @@ discard block |
||
841 | 841 | */ |
842 | 842 | function returnTypeWithDescriptionB() |
843 | 843 | { |
844 | - return 5; |
|
844 | + return 5; |
|
845 | 845 | |
846 | 846 | }//end returnTypeWithDescriptionB() |
847 | 847 | |
@@ -853,7 +853,7 @@ discard block |
||
853 | 853 | */ |
854 | 854 | function returnTypeWithDescriptionC() |
855 | 855 | { |
856 | - return 5; |
|
856 | + return 5; |
|
857 | 857 | |
858 | 858 | }//end returnTypeWithDescriptionC() |
859 | 859 | |
@@ -875,7 +875,7 @@ discard block |
||
875 | 875 | */ |
876 | 876 | function yieldFromTest() |
877 | 877 | { |
878 | - yield from foo(); |
|
878 | + yield from foo(); |
|
879 | 879 | } |
880 | 880 | |
881 | 881 | /** |
@@ -891,12 +891,12 @@ discard block |
||
891 | 891 | * @return string |
892 | 892 | */ |
893 | 893 | function audio( |
894 | - $src, |
|
895 | - $unsupportedMessage = '', |
|
896 | - $attributes = '', |
|
894 | + $src, |
|
895 | + $unsupportedMessage = '', |
|
896 | + $attributes = '', |
|
897 | 897 | ) |
898 | 898 | { |
899 | - return 'test'; |
|
899 | + return 'test'; |
|
900 | 900 | } |
901 | 901 | |
902 | 902 | /** |
@@ -906,11 +906,11 @@ discard block |
||
906 | 906 | */ |
907 | 907 | function returnArrayWithClosure() |
908 | 908 | { |
909 | - function () { |
|
910 | - return; |
|
911 | - }; |
|
909 | + function () { |
|
910 | + return; |
|
911 | + }; |
|
912 | 912 | |
913 | - return []; |
|
913 | + return []; |
|
914 | 914 | } |
915 | 915 | |
916 | 916 | /** |
@@ -920,16 +920,16 @@ discard block |
||
920 | 920 | */ |
921 | 921 | function returnArrayWithAnonymousClass() |
922 | 922 | { |
923 | - new class { |
|
924 | - /** |
|
925 | - * @return void |
|
926 | - */ |
|
927 | - public function test() { |
|
928 | - return; |
|
929 | - } |
|
930 | - }; |
|
931 | - |
|
932 | - return []; |
|
923 | + new class { |
|
924 | + /** |
|
925 | + * @return void |
|
926 | + */ |
|
927 | + public function test() { |
|
928 | + return; |
|
929 | + } |
|
930 | + }; |
|
931 | + |
|
932 | + return []; |
|
933 | 933 | } |
934 | 934 | |
935 | 935 | /** |
@@ -937,9 +937,9 @@ discard block |
||
937 | 937 | */ |
938 | 938 | function returnVoidWithClosure() |
939 | 939 | { |
940 | - function () { |
|
941 | - return 1; |
|
942 | - }; |
|
940 | + function () { |
|
941 | + return 1; |
|
942 | + }; |
|
943 | 943 | } |
944 | 944 | |
945 | 945 | /** |
@@ -947,28 +947,28 @@ discard block |
||
947 | 947 | */ |
948 | 948 | function returnVoidWithAnonymousClass() |
949 | 949 | { |
950 | - new class { |
|
951 | - /** |
|
952 | - * @return integer |
|
953 | - */ |
|
954 | - public function test() |
|
955 | - { |
|
956 | - return 1; |
|
957 | - } |
|
958 | - }; |
|
950 | + new class { |
|
951 | + /** |
|
952 | + * @return integer |
|
953 | + */ |
|
954 | + public function test() |
|
955 | + { |
|
956 | + return 1; |
|
957 | + } |
|
958 | + }; |
|
959 | 959 | } |
960 | 960 | |
961 | 961 | class TestReturnVoid |
962 | 962 | { |
963 | - /** |
|
964 | - * @return void |
|
965 | - */ |
|
966 | - public function test() |
|
967 | - { |
|
968 | - function () { |
|
969 | - return 4; |
|
970 | - }; |
|
971 | - } |
|
963 | + /** |
|
964 | + * @return void |
|
965 | + */ |
|
966 | + public function test() |
|
967 | + { |
|
968 | + function () { |
|
969 | + return 4; |
|
970 | + }; |
|
971 | + } |
|
972 | 972 | } |
973 | 973 | |
974 | 974 | /** |
@@ -1024,12 +1024,12 @@ discard block |
||
1024 | 1024 | |
1025 | 1025 | // phpcs:set Squiz.Commenting.FunctionComment specialMethods[] |
1026 | 1026 | class Bar { |
1027 | - /** |
|
1028 | - * The PHP5 constructor |
|
1029 | - */ |
|
1030 | - public function __construct() { |
|
1027 | + /** |
|
1028 | + * The PHP5 constructor |
|
1029 | + */ |
|
1030 | + public function __construct() { |
|
1031 | 1031 | |
1032 | - } |
|
1032 | + } |
|
1033 | 1033 | } |
1034 | 1034 | |
1035 | 1035 | // phpcs:set Squiz.Commenting.FunctionComment specialMethods[] ignored |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * |
26 | 26 | * @return array<int, int> |
27 | 27 | */ |
28 | - public function getErrorList($testFile='FileCommentUnitTest.inc') |
|
28 | + public function getErrorList($testFile = 'FileCommentUnitTest.inc') |
|
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | 31 | case 'FileCommentUnitTest.1.inc': |
@@ -15,62 +15,62 @@ |
||
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='FileCommentUnitTest.inc') |
|
29 | - { |
|
30 | - switch ($testFile) { |
|
31 | - case 'FileCommentUnitTest.1.inc': |
|
32 | - case 'FileCommentUnitTest.1.js': |
|
33 | - return [ |
|
34 | - 1 => 1, |
|
35 | - 22 => 2, |
|
36 | - 23 => 1, |
|
37 | - 24 => 2, |
|
38 | - 25 => 2, |
|
39 | - 26 => 1, |
|
40 | - 27 => 2, |
|
41 | - 28 => 2, |
|
42 | - 32 => 2, |
|
43 | - ]; |
|
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='FileCommentUnitTest.inc') |
|
29 | + { |
|
30 | + switch ($testFile) { |
|
31 | + case 'FileCommentUnitTest.1.inc': |
|
32 | + case 'FileCommentUnitTest.1.js': |
|
33 | + return [ |
|
34 | + 1 => 1, |
|
35 | + 22 => 2, |
|
36 | + 23 => 1, |
|
37 | + 24 => 2, |
|
38 | + 25 => 2, |
|
39 | + 26 => 1, |
|
40 | + 27 => 2, |
|
41 | + 28 => 2, |
|
42 | + 32 => 2, |
|
43 | + ]; |
|
44 | 44 | |
45 | - case 'FileCommentUnitTest.4.inc': |
|
46 | - case 'FileCommentUnitTest.6.inc': |
|
47 | - case 'FileCommentUnitTest.7.inc': |
|
48 | - case 'FileCommentUnitTest.9.inc': |
|
49 | - return [1 => 1]; |
|
45 | + case 'FileCommentUnitTest.4.inc': |
|
46 | + case 'FileCommentUnitTest.6.inc': |
|
47 | + case 'FileCommentUnitTest.7.inc': |
|
48 | + case 'FileCommentUnitTest.9.inc': |
|
49 | + return [1 => 1]; |
|
50 | 50 | |
51 | - case 'FileCommentUnitTest.5.inc': |
|
52 | - return [2 => 1]; |
|
51 | + case 'FileCommentUnitTest.5.inc': |
|
52 | + return [2 => 1]; |
|
53 | 53 | |
54 | - default: |
|
55 | - return []; |
|
56 | - }//end switch |
|
54 | + default: |
|
55 | + return []; |
|
56 | + }//end switch |
|
57 | 57 | |
58 | - }//end getErrorList() |
|
58 | + }//end getErrorList() |
|
59 | 59 | |
60 | 60 | |
61 | - /** |
|
62 | - * Returns the lines where warnings should occur. |
|
63 | - * |
|
64 | - * The key of the array should represent the line number and the value |
|
65 | - * should represent the number of warnings that should occur on that line. |
|
66 | - * |
|
67 | - * @return array<int, int> |
|
68 | - */ |
|
69 | - public function getWarningList() |
|
70 | - { |
|
71 | - return []; |
|
61 | + /** |
|
62 | + * Returns the lines where warnings should occur. |
|
63 | + * |
|
64 | + * The key of the array should represent the line number and the value |
|
65 | + * should represent the number of warnings that should occur on that line. |
|
66 | + * |
|
67 | + * @return array<int, int> |
|
68 | + */ |
|
69 | + public function getWarningList() |
|
70 | + { |
|
71 | + return []; |
|
72 | 72 | |
73 | - }//end getWarningList() |
|
73 | + }//end getWarningList() |
|
74 | 74 | |
75 | 75 | |
76 | 76 | }//end class |
@@ -28,31 +28,31 @@ |
||
28 | 28 | public function getErrorList($testFile='FileCommentUnitTest.inc') |
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | - case 'FileCommentUnitTest.1.inc': |
|
32 | - case 'FileCommentUnitTest.1.js': |
|
33 | - return [ |
|
34 | - 1 => 1, |
|
35 | - 22 => 2, |
|
36 | - 23 => 1, |
|
37 | - 24 => 2, |
|
38 | - 25 => 2, |
|
39 | - 26 => 1, |
|
40 | - 27 => 2, |
|
41 | - 28 => 2, |
|
42 | - 32 => 2, |
|
43 | - ]; |
|
31 | + case 'FileCommentUnitTest.1.inc': |
|
32 | + case 'FileCommentUnitTest.1.js': |
|
33 | + return [ |
|
34 | + 1 => 1, |
|
35 | + 22 => 2, |
|
36 | + 23 => 1, |
|
37 | + 24 => 2, |
|
38 | + 25 => 2, |
|
39 | + 26 => 1, |
|
40 | + 27 => 2, |
|
41 | + 28 => 2, |
|
42 | + 32 => 2, |
|
43 | + ]; |
|
44 | 44 | |
45 | - case 'FileCommentUnitTest.4.inc': |
|
46 | - case 'FileCommentUnitTest.6.inc': |
|
47 | - case 'FileCommentUnitTest.7.inc': |
|
48 | - case 'FileCommentUnitTest.9.inc': |
|
49 | - return [1 => 1]; |
|
45 | + case 'FileCommentUnitTest.4.inc': |
|
46 | + case 'FileCommentUnitTest.6.inc': |
|
47 | + case 'FileCommentUnitTest.7.inc': |
|
48 | + case 'FileCommentUnitTest.9.inc': |
|
49 | + return [1 => 1]; |
|
50 | 50 | |
51 | - case 'FileCommentUnitTest.5.inc': |
|
52 | - return [2 => 1]; |
|
51 | + case 'FileCommentUnitTest.5.inc': |
|
52 | + return [2 => 1]; |
|
53 | 53 | |
54 | - default: |
|
55 | - return []; |
|
54 | + default: |
|
55 | + return []; |
|
56 | 56 | }//end switch |
57 | 57 | |
58 | 58 | }//end getErrorList() |