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