@@ -43,35 +43,35 @@ |
||
| 43 | 43 | public function getErrorList() |
| 44 | 44 | { |
| 45 | 45 | $errors = array( |
| 46 | - 8 => 1, |
|
| 47 | - 20 => 1, |
|
| 48 | - 24 => 1, |
|
| 49 | - 30 => 1, |
|
| 50 | - 31 => 1, |
|
| 51 | - 34 => 1, |
|
| 52 | - 40 => 1, |
|
| 53 | - 45 => 1, |
|
| 54 | - 49 => 1, |
|
| 55 | - 51 => 1, |
|
| 56 | - 53 => 1, |
|
| 57 | - 57 => 1, |
|
| 58 | - 60 => 1, |
|
| 59 | - 61 => 1, |
|
| 60 | - 63 => 1, |
|
| 61 | - 65 => 1, |
|
| 62 | - 68 => 1, |
|
| 63 | - 70 => 1, |
|
| 64 | - 72 => 1, |
|
| 65 | - 75 => 1, |
|
| 66 | - 84 => 1, |
|
| 67 | - 87 => 1, |
|
| 68 | - 89 => 1, |
|
| 69 | - 92 => 1, |
|
| 70 | - 111 => 1, |
|
| 71 | - 159 => 1, |
|
| 72 | - 181 => 1, |
|
| 73 | - 188 => 1, |
|
| 74 | - ); |
|
| 46 | + 8 => 1, |
|
| 47 | + 20 => 1, |
|
| 48 | + 24 => 1, |
|
| 49 | + 30 => 1, |
|
| 50 | + 31 => 1, |
|
| 51 | + 34 => 1, |
|
| 52 | + 40 => 1, |
|
| 53 | + 45 => 1, |
|
| 54 | + 49 => 1, |
|
| 55 | + 51 => 1, |
|
| 56 | + 53 => 1, |
|
| 57 | + 57 => 1, |
|
| 58 | + 60 => 1, |
|
| 59 | + 61 => 1, |
|
| 60 | + 63 => 1, |
|
| 61 | + 65 => 1, |
|
| 62 | + 68 => 1, |
|
| 63 | + 70 => 1, |
|
| 64 | + 72 => 1, |
|
| 65 | + 75 => 1, |
|
| 66 | + 84 => 1, |
|
| 67 | + 87 => 1, |
|
| 68 | + 89 => 1, |
|
| 69 | + 92 => 1, |
|
| 70 | + 111 => 1, |
|
| 71 | + 159 => 1, |
|
| 72 | + 181 => 1, |
|
| 73 | + 188 => 1, |
|
| 74 | + ); |
|
| 75 | 75 | |
| 76 | 76 | return $errors; |
| 77 | 77 | |
@@ -12,16 +12,16 @@ discard block |
||
| 12 | 12 | * @see otherFunctions() |
| 13 | 13 | * @see anotherFunctions() |
| 14 | 14 | */ |
| 15 | - public $variableName = array(); |
|
| 15 | + public $variableName = array(); |
|
| 16 | 16 | |
| 17 | 17 | |
| 18 | - // Not "/**" style comment. |
|
| 19 | - // |
|
| 20 | - // @var string |
|
| 21 | - private $_incorrectCommentStyle = ''; |
|
| 18 | + // Not "/**" style comment. |
|
| 19 | + // |
|
| 20 | + // @var string |
|
| 21 | + private $_incorrectCommentStyle = ''; |
|
| 22 | 22 | |
| 23 | 23 | |
| 24 | - protected $noComment = ''; |
|
| 24 | + protected $noComment = ''; |
|
| 25 | 25 | |
| 26 | 26 | |
| 27 | 27 | /** |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | * |
| 31 | 31 | * @var string |
| 32 | 32 | */ |
| 33 | - public $extraNewlineBeforeShort = ''; |
|
| 33 | + public $extraNewlineBeforeShort = ''; |
|
| 34 | 34 | |
| 35 | 35 | |
| 36 | 36 | /** |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * |
| 43 | 43 | * @var string |
| 44 | 44 | */ |
| 45 | - private $_extraNewlineBetween = ''; |
|
| 45 | + private $_extraNewlineBetween = ''; |
|
| 46 | 46 | |
| 47 | 47 | |
| 48 | 48 | /** |
@@ -55,14 +55,14 @@ discard block |
||
| 55 | 55 | * @var string |
| 56 | 56 | * @var array |
| 57 | 57 | */ |
| 58 | - protected $extraNewlineBeforeTags = ''; |
|
| 58 | + protected $extraNewlineBeforeTags = ''; |
|
| 59 | 59 | |
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | 62 | * No newline before tags, var tag missing. |
| 63 | 63 | * @see otherFunctions() |
| 64 | 64 | */ |
| 65 | - protected $noNewlineBeforeTags = ''; |
|
| 65 | + protected $noNewlineBeforeTags = ''; |
|
| 66 | 66 | |
| 67 | 67 | |
| 68 | 68 | /** |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | * |
| 73 | 73 | * @var |
| 74 | 74 | */ |
| 75 | - public $singleLineFullStopShortComment = ''; |
|
| 75 | + public $singleLineFullStopShortComment = ''; |
|
| 76 | 76 | |
| 77 | 77 | |
| 78 | 78 | /** |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | * @see anotherFunctions() |
| 84 | 84 | * @see |
| 85 | 85 | */ |
| 86 | - public $singleLineFullStopShortComment = ''; |
|
| 86 | + public $singleLineFullStopShortComment = ''; |
|
| 87 | 87 | |
| 88 | 88 | |
| 89 | 89 | /** |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | * @var string |
| 93 | 93 | * @summary unknown tag |
| 94 | 94 | */ |
| 95 | - public $missingSinceTag = ''; |
|
| 95 | + public $missingSinceTag = ''; |
|
| 96 | 96 | |
| 97 | 97 | |
| 98 | 98 | /** |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * |
| 101 | 101 | * @var string |
| 102 | 102 | */ |
| 103 | - $variableCheck = ''; |
|
| 103 | + $variableCheck = ''; |
|
| 104 | 104 | |
| 105 | 105 | |
| 106 | 106 | /** |
@@ -129,38 +129,38 @@ discard block |
||
| 129 | 129 | * |
| 130 | 130 | * |
| 131 | 131 | */ |
| 132 | - $emptyVarDoc = ''; |
|
| 132 | + $emptyVarDoc = ''; |
|
| 133 | 133 | |
| 134 | - /** |
|
| 135 | - * Var type checking (int v.s. integer). |
|
| 136 | - * |
|
| 137 | - * @var int |
|
| 138 | - */ |
|
| 139 | - private $_varSimpleTypeCheck; |
|
| 134 | + /** |
|
| 135 | + * Var type checking (int v.s. integer). |
|
| 136 | + * |
|
| 137 | + * @var int |
|
| 138 | + */ |
|
| 139 | + private $_varSimpleTypeCheck; |
|
| 140 | 140 | |
| 141 | 141 | |
| 142 | - /** |
|
| 143 | - * Var type checking (array(int => string) v.s. array(int => string)). |
|
| 144 | - * |
|
| 145 | - * @var array(int => string) |
|
| 146 | - */ |
|
| 147 | - private $_varArrayTypeCheck; |
|
| 142 | + /** |
|
| 143 | + * Var type checking (array(int => string) v.s. array(int => string)). |
|
| 144 | + * |
|
| 145 | + * @var array(int => string) |
|
| 146 | + */ |
|
| 147 | + private $_varArrayTypeCheck; |
|
| 148 | 148 | |
| 149 | 149 | |
| 150 | - /** |
|
| 151 | - * Var type checking (STRING v.s. string). |
|
| 152 | - * |
|
| 153 | - * @var STRING |
|
| 154 | - */ |
|
| 155 | - private $_varCaseTypeCheck; |
|
| 150 | + /** |
|
| 151 | + * Var type checking (STRING v.s. string). |
|
| 152 | + * |
|
| 153 | + * @var STRING |
|
| 154 | + */ |
|
| 155 | + private $_varCaseTypeCheck; |
|
| 156 | 156 | |
| 157 | 157 | |
| 158 | 158 | /** |
| 159 | 159 | * @var integer |
| 160 | 160 | */ |
| 161 | - private $_varWithNoShortComment; |
|
| 161 | + private $_varWithNoShortComment; |
|
| 162 | 162 | |
| 163 | - protected $noComment2 = ''; |
|
| 163 | + protected $noComment2 = ''; |
|
| 164 | 164 | |
| 165 | 165 | |
| 166 | 166 | }//end class |
@@ -175,21 +175,21 @@ discard block |
||
| 175 | 175 | class VariableCommentUnitTest2 |
| 176 | 176 | { |
| 177 | 177 | |
| 178 | - public $hello; |
|
| 178 | + public $hello; |
|
| 179 | 179 | |
| 180 | 180 | /** Comment starts here. |
| 181 | 181 | * |
| 182 | 182 | * @var string |
| 183 | 183 | * |
| 184 | 184 | */ |
| 185 | - private $_varCaseTypeCheck; |
|
| 186 | - |
|
| 187 | - /** |
|
| 188 | - * 这是一条测试评论. |
|
| 189 | - * |
|
| 190 | - * @var string |
|
| 191 | - */ |
|
| 192 | - public $foo; |
|
| 185 | + private $_varCaseTypeCheck; |
|
| 186 | + |
|
| 187 | + /** |
|
| 188 | + * 这是一条测试评论. |
|
| 189 | + * |
|
| 190 | + * @var string |
|
| 191 | + */ |
|
| 192 | + public $foo; |
|
| 193 | 193 | |
| 194 | 194 | }//end class |
| 195 | 195 | |
@@ -45,50 +45,50 @@ |
||
| 45 | 45 | public function getErrorList($testFile='LongConditionClosingCommentUnitTest.inc') |
| 46 | 46 | { |
| 47 | 47 | switch ($testFile) { |
| 48 | - case 'LongConditionClosingCommentUnitTest.inc': |
|
| 49 | - return array( |
|
| 50 | - 49 => 1, |
|
| 51 | - 99 => 1, |
|
| 52 | - 146 => 1, |
|
| 53 | - 192 => 1, |
|
| 54 | - 215 => 1, |
|
| 55 | - 238 => 1, |
|
| 56 | - 261 => 1, |
|
| 57 | - 286 => 1, |
|
| 58 | - 309 => 1, |
|
| 59 | - 332 => 1, |
|
| 60 | - 355 => 1, |
|
| 61 | - 378 => 1, |
|
| 62 | - 493 => 1, |
|
| 63 | - 531 => 1, |
|
| 64 | - 536 => 1, |
|
| 65 | - 540 => 1, |
|
| 66 | - 562 => 1, |
|
| 67 | - 601 => 1, |
|
| 68 | - 629 => 1, |
|
| 69 | - 663 => 1, |
|
| 70 | - 765 => 1, |
|
| 71 | - ); |
|
| 72 | - break; |
|
| 73 | - case 'LongConditionClosingCommentUnitTest.js': |
|
| 74 | - return array( |
|
| 75 | - 47 => 1, |
|
| 76 | - 97 => 1, |
|
| 77 | - 144 => 1, |
|
| 78 | - 190 => 1, |
|
| 79 | - 213 => 1, |
|
| 80 | - 238 => 1, |
|
| 81 | - 261 => 1, |
|
| 82 | - 284 => 1, |
|
| 83 | - 307 => 1, |
|
| 84 | - 401 => 1, |
|
| 85 | - 439 => 1, |
|
| 86 | - 444 => 1, |
|
| 87 | - ); |
|
| 88 | - break; |
|
| 89 | - default: |
|
| 90 | - return array(); |
|
| 91 | - break; |
|
| 48 | + case 'LongConditionClosingCommentUnitTest.inc': |
|
| 49 | + return array( |
|
| 50 | + 49 => 1, |
|
| 51 | + 99 => 1, |
|
| 52 | + 146 => 1, |
|
| 53 | + 192 => 1, |
|
| 54 | + 215 => 1, |
|
| 55 | + 238 => 1, |
|
| 56 | + 261 => 1, |
|
| 57 | + 286 => 1, |
|
| 58 | + 309 => 1, |
|
| 59 | + 332 => 1, |
|
| 60 | + 355 => 1, |
|
| 61 | + 378 => 1, |
|
| 62 | + 493 => 1, |
|
| 63 | + 531 => 1, |
|
| 64 | + 536 => 1, |
|
| 65 | + 540 => 1, |
|
| 66 | + 562 => 1, |
|
| 67 | + 601 => 1, |
|
| 68 | + 629 => 1, |
|
| 69 | + 663 => 1, |
|
| 70 | + 765 => 1, |
|
| 71 | + ); |
|
| 72 | + break; |
|
| 73 | + case 'LongConditionClosingCommentUnitTest.js': |
|
| 74 | + return array( |
|
| 75 | + 47 => 1, |
|
| 76 | + 97 => 1, |
|
| 77 | + 144 => 1, |
|
| 78 | + 190 => 1, |
|
| 79 | + 213 => 1, |
|
| 80 | + 238 => 1, |
|
| 81 | + 261 => 1, |
|
| 82 | + 284 => 1, |
|
| 83 | + 307 => 1, |
|
| 84 | + 401 => 1, |
|
| 85 | + 439 => 1, |
|
| 86 | + 444 => 1, |
|
| 87 | + ); |
|
| 88 | + break; |
|
| 89 | + default: |
|
| 90 | + return array(); |
|
| 91 | + break; |
|
| 92 | 92 | }//end switch |
| 93 | 93 | |
| 94 | 94 | }//end getErrorList() |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | * |
| 43 | 43 | * @return array<int, int> |
| 44 | 44 | */ |
| 45 | - public function getErrorList($testFile='LongConditionClosingCommentUnitTest.inc') |
|
| 45 | + public function getErrorList($testFile = 'LongConditionClosingCommentUnitTest.inc') |
|
| 46 | 46 | { |
| 47 | 47 | switch ($testFile) { |
| 48 | 48 | case 'LongConditionClosingCommentUnitTest.inc': |
@@ -47,13 +47,13 @@ |
||
| 47 | 47 | return array( |
| 48 | 48 | 4 => 1, |
| 49 | 49 | 5 => 1, |
| 50 | - ); |
|
| 50 | + ); |
|
| 51 | 51 | } else if (version_compare(PHP_VERSION, '5.4.0RC1') >= 0) { |
| 52 | 52 | // Shorthand echo is always available from PHP 5.4.0 but needed the |
| 53 | 53 | // short_open_tag ini var to be set for versions before this. |
| 54 | 54 | return array( |
| 55 | 55 | 4 => 1, |
| 56 | - ); |
|
| 56 | + ); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | return array(); |
@@ -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. |
|
| 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. |
|
| 662 | 694 | 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,65 +701,65 @@ 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 | \ No newline at end of file |
@@ -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: |
@@ -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 | { |
@@ -53,21 +53,21 @@ |
||
| 53 | 53 | public function getErrorList($testFile='FileCommentUnitTest.inc') |
| 54 | 54 | { |
| 55 | 55 | switch ($testFile) { |
| 56 | - case 'FileCommentUnitTest.inc': |
|
| 57 | - case 'FileCommentUnitTest.js': |
|
| 58 | - return array( |
|
| 59 | - 1 => 1, |
|
| 60 | - 22 => 2, |
|
| 61 | - 23 => 1, |
|
| 62 | - 24 => 2, |
|
| 63 | - 25 => 2, |
|
| 64 | - 26 => 1, |
|
| 65 | - 27 => 2, |
|
| 66 | - 28 => 2, |
|
| 67 | - 32 => 2, |
|
| 68 | - ); |
|
| 69 | - default: |
|
| 70 | - return array(); |
|
| 56 | + case 'FileCommentUnitTest.inc': |
|
| 57 | + case 'FileCommentUnitTest.js': |
|
| 58 | + return array( |
|
| 59 | + 1 => 1, |
|
| 60 | + 22 => 2, |
|
| 61 | + 23 => 1, |
|
| 62 | + 24 => 2, |
|
| 63 | + 25 => 2, |
|
| 64 | + 26 => 1, |
|
| 65 | + 27 => 2, |
|
| 66 | + 28 => 2, |
|
| 67 | + 32 => 2, |
|
| 68 | + ); |
|
| 69 | + default: |
|
| 70 | + return array(); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | }//end getErrorList() |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | * |
| 51 | 51 | * @return array<int, int> |
| 52 | 52 | */ |
| 53 | - public function getErrorList($testFile='FileCommentUnitTest.inc') |
|
| 53 | + public function getErrorList($testFile = 'FileCommentUnitTest.inc') |
|
| 54 | 54 | { |
| 55 | 55 | switch ($testFile) { |
| 56 | 56 | case 'FileCommentUnitTest.inc': |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | case 'CharacterBeforePHPOpeningTagUnitTest.1.inc': |
| 47 | 47 | return array( |
| 48 | 48 | 2 => 1, |
| 49 | - ); |
|
| 49 | + ); |
|
| 50 | 50 | break; |
| 51 | 51 | default: |
| 52 | 52 | return array(); |
@@ -40,78 +40,78 @@ |
||
| 40 | 40 | public function getErrorList() |
| 41 | 41 | { |
| 42 | 42 | $errors = array( |
| 43 | - 5 => 1, |
|
| 44 | - 10 => 3, |
|
| 45 | - 12 => 2, |
|
| 46 | - 13 => 2, |
|
| 47 | - 14 => 1, |
|
| 48 | - 15 => 1, |
|
| 49 | - 28 => 1, |
|
| 50 | - 43 => 1, |
|
| 51 | - 76 => 1, |
|
| 52 | - 87 => 1, |
|
| 53 | - 103 => 1, |
|
| 54 | - 109 => 1, |
|
| 55 | - 112 => 1, |
|
| 56 | - 122 => 1, |
|
| 57 | - 123 => 3, |
|
| 58 | - 124 => 2, |
|
| 59 | - 125 => 1, |
|
| 60 | - 126 => 1, |
|
| 61 | - 137 => 4, |
|
| 62 | - 138 => 4, |
|
| 63 | - 139 => 4, |
|
| 64 | - 143 => 2, |
|
| 65 | - 152 => 1, |
|
| 66 | - 155 => 2, |
|
| 67 | - 159 => 1, |
|
| 68 | - 166 => 1, |
|
| 69 | - 173 => 1, |
|
| 70 | - 183 => 1, |
|
| 71 | - 190 => 2, |
|
| 72 | - 193 => 2, |
|
| 73 | - 196 => 1, |
|
| 74 | - 199 => 2, |
|
| 75 | - 210 => 1, |
|
| 76 | - 211 => 1, |
|
| 77 | - 222 => 1, |
|
| 78 | - 223 => 1, |
|
| 79 | - 224 => 1, |
|
| 80 | - 225 => 1, |
|
| 81 | - 226 => 1, |
|
| 82 | - 227 => 1, |
|
| 83 | - 230 => 2, |
|
| 84 | - 232 => 1, |
|
| 85 | - 246 => 1, |
|
| 86 | - 248 => 4, |
|
| 87 | - 261 => 1, |
|
| 88 | - 263 => 1, |
|
| 89 | - 276 => 1, |
|
| 90 | - 277 => 1, |
|
| 91 | - 278 => 1, |
|
| 92 | - 279 => 1, |
|
| 93 | - 280 => 1, |
|
| 94 | - 281 => 1, |
|
| 95 | - 284 => 1, |
|
| 96 | - 286 => 2, |
|
| 97 | - 294 => 1, |
|
| 98 | - 302 => 1, |
|
| 99 | - 312 => 1, |
|
| 100 | - 358 => 1, |
|
| 101 | - 359 => 2, |
|
| 102 | - 372 => 1, |
|
| 103 | - 373 => 1, |
|
| 104 | - 387 => 1, |
|
| 105 | - 407 => 1, |
|
| 106 | - 441 => 1, |
|
| 107 | - 500 => 1, |
|
| 108 | - 526 => 1, |
|
| 109 | - 548 => 1, |
|
| 110 | - 641 => 1, |
|
| 111 | - 669 => 1, |
|
| 112 | - 744 => 1, |
|
| 113 | - 748 => 1, |
|
| 114 | - ); |
|
| 43 | + 5 => 1, |
|
| 44 | + 10 => 3, |
|
| 45 | + 12 => 2, |
|
| 46 | + 13 => 2, |
|
| 47 | + 14 => 1, |
|
| 48 | + 15 => 1, |
|
| 49 | + 28 => 1, |
|
| 50 | + 43 => 1, |
|
| 51 | + 76 => 1, |
|
| 52 | + 87 => 1, |
|
| 53 | + 103 => 1, |
|
| 54 | + 109 => 1, |
|
| 55 | + 112 => 1, |
|
| 56 | + 122 => 1, |
|
| 57 | + 123 => 3, |
|
| 58 | + 124 => 2, |
|
| 59 | + 125 => 1, |
|
| 60 | + 126 => 1, |
|
| 61 | + 137 => 4, |
|
| 62 | + 138 => 4, |
|
| 63 | + 139 => 4, |
|
| 64 | + 143 => 2, |
|
| 65 | + 152 => 1, |
|
| 66 | + 155 => 2, |
|
| 67 | + 159 => 1, |
|
| 68 | + 166 => 1, |
|
| 69 | + 173 => 1, |
|
| 70 | + 183 => 1, |
|
| 71 | + 190 => 2, |
|
| 72 | + 193 => 2, |
|
| 73 | + 196 => 1, |
|
| 74 | + 199 => 2, |
|
| 75 | + 210 => 1, |
|
| 76 | + 211 => 1, |
|
| 77 | + 222 => 1, |
|
| 78 | + 223 => 1, |
|
| 79 | + 224 => 1, |
|
| 80 | + 225 => 1, |
|
| 81 | + 226 => 1, |
|
| 82 | + 227 => 1, |
|
| 83 | + 230 => 2, |
|
| 84 | + 232 => 1, |
|
| 85 | + 246 => 1, |
|
| 86 | + 248 => 4, |
|
| 87 | + 261 => 1, |
|
| 88 | + 263 => 1, |
|
| 89 | + 276 => 1, |
|
| 90 | + 277 => 1, |
|
| 91 | + 278 => 1, |
|
| 92 | + 279 => 1, |
|
| 93 | + 280 => 1, |
|
| 94 | + 281 => 1, |
|
| 95 | + 284 => 1, |
|
| 96 | + 286 => 2, |
|
| 97 | + 294 => 1, |
|
| 98 | + 302 => 1, |
|
| 99 | + 312 => 1, |
|
| 100 | + 358 => 1, |
|
| 101 | + 359 => 2, |
|
| 102 | + 372 => 1, |
|
| 103 | + 373 => 1, |
|
| 104 | + 387 => 1, |
|
| 105 | + 407 => 1, |
|
| 106 | + 441 => 1, |
|
| 107 | + 500 => 1, |
|
| 108 | + 526 => 1, |
|
| 109 | + 548 => 1, |
|
| 110 | + 641 => 1, |
|
| 111 | + 669 => 1, |
|
| 112 | + 744 => 1, |
|
| 113 | + 748 => 1, |
|
| 114 | + ); |
|
| 115 | 115 | |
| 116 | 116 | // The yield tests will only work in PHP versions where yield exists and |
| 117 | 117 | // will throw errors in earlier versions. |
@@ -458,11 +458,11 @@ discard block |
||
| 458 | 458 | */ |
| 459 | 459 | function test($test) |
| 460 | 460 | { |
| 461 | - if ($test === TRUE) { |
|
| 462 | - return; |
|
| 463 | - } |
|
| 461 | + if ($test === TRUE) { |
|
| 462 | + return; |
|
| 463 | + } |
|
| 464 | 464 | |
| 465 | - return $test; |
|
| 465 | + return $test; |
|
| 466 | 466 | |
| 467 | 467 | }//end test() |
| 468 | 468 | |
@@ -486,7 +486,7 @@ discard block |
||
| 486 | 486 | */ |
| 487 | 487 | function test(\other\ns\item $test) |
| 488 | 488 | { |
| 489 | - return $test; |
|
| 489 | + return $test; |
|
| 490 | 490 | |
| 491 | 491 | }//end test() |
| 492 | 492 | |
@@ -499,7 +499,7 @@ discard block |
||
| 499 | 499 | */ |
| 500 | 500 | function test(\other\ns\item $test) |
| 501 | 501 | { |
| 502 | - return $test; |
|
| 502 | + return $test; |
|
| 503 | 503 | |
| 504 | 504 | }//end test() |
| 505 | 505 | |
@@ -512,7 +512,7 @@ discard block |
||
| 512 | 512 | */ |
| 513 | 513 | function test(\first\ns\item $test = \second\ns::CONSTANT) |
| 514 | 514 | { |
| 515 | - return $test; |
|
| 515 | + return $test; |
|
| 516 | 516 | |
| 517 | 517 | }//end test() |
| 518 | 518 | |
@@ -525,7 +525,7 @@ discard block |
||
| 525 | 525 | */ |
| 526 | 526 | function test(\first\ns\item $test = \second\ns::CONSTANT) |
| 527 | 527 | { |
| 528 | - return $test; |
|
| 528 | + return $test; |
|
| 529 | 529 | |
| 530 | 530 | }//end test() |
| 531 | 531 | |
@@ -559,7 +559,7 @@ discard block |
||
| 559 | 559 | */ |
| 560 | 560 | function test($test) |
| 561 | 561 | { |
| 562 | - return $test; |
|
| 562 | + return $test; |
|
| 563 | 563 | |
| 564 | 564 | }//end test() |
| 565 | 565 | |
@@ -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 | /** |
@@ -47,21 +47,21 @@ discard block |
||
| 47 | 47 | switch ($testFile) { |
| 48 | 48 | case 'InlineCommentUnitTest.inc': |
| 49 | 49 | $errors = array( |
| 50 | - 17 => 1, |
|
| 51 | - 27 => 1, |
|
| 52 | - 28 => 1, |
|
| 53 | - 32 => 2, |
|
| 54 | - 36 => 1, |
|
| 55 | - 44 => 2, |
|
| 56 | - 58 => 1, |
|
| 57 | - 61 => 1, |
|
| 58 | - 64 => 1, |
|
| 59 | - 67 => 1, |
|
| 60 | - 95 => 1, |
|
| 61 | - 96 => 1, |
|
| 62 | - 97 => 3, |
|
| 63 | - 118 => 1, |
|
| 64 | - ); |
|
| 50 | + 17 => 1, |
|
| 51 | + 27 => 1, |
|
| 52 | + 28 => 1, |
|
| 53 | + 32 => 2, |
|
| 54 | + 36 => 1, |
|
| 55 | + 44 => 2, |
|
| 56 | + 58 => 1, |
|
| 57 | + 61 => 1, |
|
| 58 | + 64 => 1, |
|
| 59 | + 67 => 1, |
|
| 60 | + 95 => 1, |
|
| 61 | + 96 => 1, |
|
| 62 | + 97 => 3, |
|
| 63 | + 118 => 1, |
|
| 64 | + ); |
|
| 65 | 65 | |
| 66 | 66 | return $errors; |
| 67 | 67 | case 'InlineCommentUnitTest.js': |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | 103 => 1, |
| 77 | 77 | 104 => 3, |
| 78 | 78 | 118 => 1, |
| 79 | - ); |
|
| 79 | + ); |
|
| 80 | 80 | default: |
| 81 | 81 | return array(); |
| 82 | 82 | }//end switch |
@@ -45,40 +45,40 @@ |
||
| 45 | 45 | public function getErrorList($testFile='InlineCommentUnitTest.inc') |
| 46 | 46 | { |
| 47 | 47 | switch ($testFile) { |
| 48 | - case 'InlineCommentUnitTest.inc': |
|
| 49 | - $errors = array( |
|
| 50 | - 17 => 1, |
|
| 51 | - 27 => 1, |
|
| 52 | - 28 => 1, |
|
| 53 | - 32 => 2, |
|
| 54 | - 36 => 1, |
|
| 55 | - 44 => 2, |
|
| 56 | - 58 => 1, |
|
| 57 | - 61 => 1, |
|
| 58 | - 64 => 1, |
|
| 59 | - 67 => 1, |
|
| 60 | - 95 => 1, |
|
| 61 | - 96 => 1, |
|
| 62 | - 97 => 3, |
|
| 63 | - 118 => 1, |
|
| 64 | - ); |
|
| 48 | + case 'InlineCommentUnitTest.inc': |
|
| 49 | + $errors = array( |
|
| 50 | + 17 => 1, |
|
| 51 | + 27 => 1, |
|
| 52 | + 28 => 1, |
|
| 53 | + 32 => 2, |
|
| 54 | + 36 => 1, |
|
| 55 | + 44 => 2, |
|
| 56 | + 58 => 1, |
|
| 57 | + 61 => 1, |
|
| 58 | + 64 => 1, |
|
| 59 | + 67 => 1, |
|
| 60 | + 95 => 1, |
|
| 61 | + 96 => 1, |
|
| 62 | + 97 => 3, |
|
| 63 | + 118 => 1, |
|
| 64 | + ); |
|
| 65 | 65 | |
| 66 | - return $errors; |
|
| 67 | - case 'InlineCommentUnitTest.js': |
|
| 68 | - return array( |
|
| 69 | - 31 => 1, |
|
| 70 | - 36 => 2, |
|
| 71 | - 48 => 1, |
|
| 72 | - 51 => 1, |
|
| 73 | - 54 => 1, |
|
| 74 | - 57 => 1, |
|
| 75 | - 102 => 1, |
|
| 76 | - 103 => 1, |
|
| 77 | - 104 => 3, |
|
| 78 | - 118 => 1, |
|
| 79 | - ); |
|
| 80 | - default: |
|
| 81 | - return array(); |
|
| 66 | + return $errors; |
|
| 67 | + case 'InlineCommentUnitTest.js': |
|
| 68 | + return array( |
|
| 69 | + 31 => 1, |
|
| 70 | + 36 => 2, |
|
| 71 | + 48 => 1, |
|
| 72 | + 51 => 1, |
|
| 73 | + 54 => 1, |
|
| 74 | + 57 => 1, |
|
| 75 | + 102 => 1, |
|
| 76 | + 103 => 1, |
|
| 77 | + 104 => 3, |
|
| 78 | + 118 => 1, |
|
| 79 | + ); |
|
| 80 | + default: |
|
| 81 | + return array(); |
|
| 82 | 82 | }//end switch |
| 83 | 83 | |
| 84 | 84 | }//end getErrorList() |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | * |
| 43 | 43 | * @return array<int, int> |
| 44 | 44 | */ |
| 45 | - public function getErrorList($testFile='InlineCommentUnitTest.inc') |
|
| 45 | + public function getErrorList($testFile = 'InlineCommentUnitTest.inc') |
|
| 46 | 46 | { |
| 47 | 47 | switch ($testFile) { |
| 48 | 48 | case 'InlineCommentUnitTest.inc': |