@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * |
| 45 | 45 | * @return array<int, int> |
| 46 | 46 | */ |
| 47 | - public function getErrorList($testFile='FixmeUnitTest.inc') |
|
| 47 | + public function getErrorList($testFile = 'FixmeUnitTest.inc') |
|
| 48 | 48 | { |
| 49 | 49 | return array( |
| 50 | 50 | 3 => 1, |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | * |
| 71 | 71 | * @return array<int, int> |
| 72 | 72 | */ |
| 73 | - public function getWarningList($testFile='FixmeUnitTest.inc') |
|
| 73 | + public function getWarningList($testFile = 'FixmeUnitTest.inc') |
|
| 74 | 74 | { |
| 75 | 75 | return array(); |
| 76 | 76 | |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | 48 => 1, |
| 58 | 58 | 70 => 1, |
| 59 | 59 | 71 => 1, |
| 60 | - ); |
|
| 60 | + ); |
|
| 61 | 61 | |
| 62 | 62 | }//end getErrorList() |
| 63 | 63 | |
@@ -5,10 +5,10 @@ |
||
| 5 | 5 | } |
| 6 | 6 | |
| 7 | 7 | switch ($foo) { |
| 8 | - case 'bar': |
|
| 9 | - break; |
|
| 10 | - default: |
|
| 11 | - break; |
|
| 8 | + case 'bar': |
|
| 9 | + break; |
|
| 10 | + default: |
|
| 11 | + break; |
|
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | $it->next(); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | -for (;(($it1->valid() && $foo) || (!$it2->value && ($bar || false)));/*Could be ingored*/) { |
|
| 10 | +for (;(($it1->valid() && $foo) || (!$it2->value && ($bar || false))); /*Could be ingored*/) { |
|
| 11 | 11 | $it1->next(); |
| 12 | 12 | $it2->next(); |
| 13 | 13 | } |
| 14 | 14 | \ No newline at end of file |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | function bar($a, $b) { |
| 12 | 12 | $x = $b; |
| 13 | - for ($i = 0; $i <$a; $i++) { |
|
| 13 | + for ($i = 0; $i < $a; $i++) { |
|
| 14 | 14 | $x += $a * $i; |
| 15 | 15 | } |
| 16 | 16 | return $x; |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | BAZ |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | -function foo( $parameter ) { |
|
| 40 | +function foo($parameter) { |
|
| 41 | 41 | $wango = <<<HERE |
| 42 | 42 | 1 Must be a HEREdoc of at least one line |
| 43 | 43 | HERE; |
@@ -55,14 +55,14 @@ discard block |
||
| 55 | 55 | HERE; |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | -function foo( $parameter ) { |
|
| 58 | +function foo($parameter) { |
|
| 59 | 59 | return <<<HTML |
| 60 | 60 | <?xml version="1.0"?> |
| 61 | 61 | <value>$parameter</value> |
| 62 | 62 | HTML; |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | -print foo( 'PARAMETER' ); |
|
| 65 | +print foo('PARAMETER'); |
|
| 66 | 66 | print "\n"; |
| 67 | 67 | |
| 68 | 68 | function foo($bar) |
@@ -45,39 +45,39 @@ |
||
| 45 | 45 | public function getErrorList($testFile='LowerCaseConstantUnitTest.inc') |
| 46 | 46 | { |
| 47 | 47 | switch ($testFile) { |
| 48 | - case 'LowerCaseConstantUnitTest.inc': |
|
| 49 | - return array( |
|
| 50 | - 7 => 1, |
|
| 51 | - 10 => 1, |
|
| 52 | - 15 => 1, |
|
| 53 | - 16 => 1, |
|
| 54 | - 23 => 1, |
|
| 55 | - 26 => 1, |
|
| 56 | - 31 => 1, |
|
| 57 | - 32 => 1, |
|
| 58 | - 39 => 1, |
|
| 59 | - 42 => 1, |
|
| 60 | - 47 => 1, |
|
| 61 | - 48 => 1, |
|
| 62 | - 70 => 1, |
|
| 63 | - 71 => 1, |
|
| 64 | - ); |
|
| 65 | - break; |
|
| 66 | - case 'LowerCaseConstantUnitTest.js': |
|
| 67 | - return array( |
|
| 68 | - 2 => 1, |
|
| 69 | - 3 => 1, |
|
| 70 | - 4 => 1, |
|
| 71 | - 7 => 1, |
|
| 72 | - 8 => 1, |
|
| 73 | - 12 => 1, |
|
| 74 | - 13 => 1, |
|
| 75 | - 14 => 1, |
|
| 76 | - ); |
|
| 77 | - break; |
|
| 78 | - default: |
|
| 79 | - return array(); |
|
| 48 | + case 'LowerCaseConstantUnitTest.inc': |
|
| 49 | + return array( |
|
| 50 | + 7 => 1, |
|
| 51 | + 10 => 1, |
|
| 52 | + 15 => 1, |
|
| 53 | + 16 => 1, |
|
| 54 | + 23 => 1, |
|
| 55 | + 26 => 1, |
|
| 56 | + 31 => 1, |
|
| 57 | + 32 => 1, |
|
| 58 | + 39 => 1, |
|
| 59 | + 42 => 1, |
|
| 60 | + 47 => 1, |
|
| 61 | + 48 => 1, |
|
| 62 | + 70 => 1, |
|
| 63 | + 71 => 1, |
|
| 64 | + ); |
|
| 80 | 65 | break; |
| 66 | + case 'LowerCaseConstantUnitTest.js': |
|
| 67 | + return array( |
|
| 68 | + 2 => 1, |
|
| 69 | + 3 => 1, |
|
| 70 | + 4 => 1, |
|
| 71 | + 7 => 1, |
|
| 72 | + 8 => 1, |
|
| 73 | + 12 => 1, |
|
| 74 | + 13 => 1, |
|
| 75 | + 14 => 1, |
|
| 76 | + ); |
|
| 77 | + break; |
|
| 78 | + default: |
|
| 79 | + return array(); |
|
| 80 | + break; |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | }//end getErrorList() |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | * |
| 43 | 43 | * @return array<int, int> |
| 44 | 44 | */ |
| 45 | - public function getErrorList($testFile='LowerCaseConstantUnitTest.inc') |
|
| 45 | + public function getErrorList($testFile = 'LowerCaseConstantUnitTest.inc') |
|
| 46 | 46 | { |
| 47 | 47 | switch ($testFile) { |
| 48 | 48 | case 'LowerCaseConstantUnitTest.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(); |
@@ -43,10 +43,10 @@ |
||
| 43 | 43 | public function getErrorList() |
| 44 | 44 | { |
| 45 | 45 | $errors = array( |
| 46 | - 2 => 1, |
|
| 47 | - 4 => 1, |
|
| 48 | - 6 => 1, |
|
| 49 | - ); |
|
| 46 | + 2 => 1, |
|
| 47 | + 4 => 1, |
|
| 48 | + 6 => 1, |
|
| 49 | + ); |
|
| 50 | 50 | |
| 51 | 51 | return $errors; |
| 52 | 52 | |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | For ($var As $var) { Exit; } |
| 14 | 14 | If ($a AND $b OR $c XOR $d) { Die; } ElseIf { } Else |
| 15 | 15 | GOTO a; |
| 16 | -function (Array $a) {} |
|
| 16 | +function(Array $a) {} |
|
| 17 | 17 | const PRIVATE; |
| 18 | 18 | HttpStatus::CONTINUE; |
| 19 | 19 | function |
@@ -4,15 +4,17 @@ |
||
| 4 | 4 | abstract public private protected function whatever() {} |
| 5 | 5 | const array() |
| 6 | 6 | for ($var as $var) { exit; } |
| 7 | -if ($a and $b or $c xor $d) { die; } elseif { } else |
|
| 8 | -goto a; |
|
| 7 | +if ($a and $b or $c xor $d) { die; } elseif { } else { |
|
| 8 | + goto a; |
|
| 9 | +} |
|
| 9 | 10 | |
| 10 | 11 | Class Something EXTENDS SomethingElse implementS Whatever |
| 11 | 12 | Abstract Public Private Protected function whatever() {} |
| 12 | 13 | CONST array() |
| 13 | 14 | For ($var As $var) { Exit; } |
| 14 | -If ($a AND $b OR $c XOR $d) { Die; } ElseIf { } Else |
|
| 15 | -GOTO a; |
|
| 15 | +If ($a AND $b OR $c XOR $d) { Die; } ElseIf { } Else { |
|
| 16 | + GOTO a; |
|
| 17 | +} |
|
| 16 | 18 | function (Array $a) {} |
| 17 | 19 | const PRIVATE; |
| 18 | 20 | HttpStatus::CONTINUE; |
@@ -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(); |
@@ -43,14 +43,14 @@ |
||
| 43 | 43 | public function getErrorList($testFile='') |
| 44 | 44 | { |
| 45 | 45 | switch ($testFile) { |
| 46 | - case 'CharacterBeforePHPOpeningTagUnitTest.1.inc': |
|
| 47 | - return array( |
|
| 48 | - 2 => 1, |
|
| 49 | - ); |
|
| 50 | - break; |
|
| 51 | - default: |
|
| 52 | - return array(); |
|
| 53 | - break; |
|
| 46 | + case 'CharacterBeforePHPOpeningTagUnitTest.1.inc': |
|
| 47 | + return array( |
|
| 48 | + 2 => 1, |
|
| 49 | + ); |
|
| 50 | + break; |
|
| 51 | + default: |
|
| 52 | + return array(); |
|
| 53 | + break; |
|
| 54 | 54 | }//end switch |
| 55 | 55 | |
| 56 | 56 | }//end getErrorList() |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | * |
| 41 | 41 | * @return array<int, int> |
| 42 | 42 | */ |
| 43 | - public function getErrorList($testFile='') |
|
| 43 | + public function getErrorList($testFile = '') |
|
| 44 | 44 | { |
| 45 | 45 | switch ($testFile) { |
| 46 | 46 | case 'CharacterBeforePHPOpeningTagUnitTest.1.inc': |
@@ -23,9 +23,9 @@ |
||
| 23 | 23 | function count() {} |
| 24 | 24 | |
| 25 | 25 | trait DelProvider { |
| 26 | - public function delete() { |
|
| 26 | + public function delete() { |
|
| 27 | 27 | //irrelevant |
| 28 | - } |
|
| 28 | + } |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | class LeftSideTest { |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | delete($filepath); |
| 5 | 5 | unset($filepath); |
| 6 | 6 | $size = \sizeof($array); |
| 7 | -$size = \my\ns\sizeof('abc');($array); |
|
| 7 | +$size = \my\ns\sizeof('abc'); ($array); |
|
| 8 | 8 | |
| 9 | 9 | // No errors thrown for class methods. |
| 10 | 10 | $size = MyClass::sizeof($array); |