@@ -24,14 +24,14 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | class MyClass |
| 26 | 26 | { |
| 27 | - function func1() |
|
| 28 | - { |
|
| 27 | + function func1() |
|
| 28 | + { |
|
| 29 | 29 | function func2() |
| 30 | 30 | { |
| 31 | - return $a; |
|
| 31 | + return $a; |
|
| 32 | 32 | } |
| 33 | 33 | return $data; |
| 34 | - } |
|
| 34 | + } |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | class MyClass |
@@ -59,17 +59,17 @@ discard block |
||
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | class mpgResponse{ |
| 62 | - var $term_id; |
|
| 63 | - var $currentTag; |
|
| 64 | - function characterHandler($parser,$data){ |
|
| 65 | - switch($this->currentTag) |
|
| 66 | - { |
|
| 67 | - case "term_id": { |
|
| 68 | - $this->term_id=$data; |
|
| 69 | - break; |
|
| 70 | - } |
|
| 71 | - } |
|
| 72 | - }//end characterHandler |
|
| 62 | + var $term_id; |
|
| 63 | + var $currentTag; |
|
| 64 | + function characterHandler($parser,$data){ |
|
| 65 | + switch($this->currentTag) |
|
| 66 | + { |
|
| 67 | + case "term_id": { |
|
| 68 | + $this->term_id=$data; |
|
| 69 | + break; |
|
| 70 | + } |
|
| 71 | + } |
|
| 72 | + }//end characterHandler |
|
| 73 | 73 | }//end class mpgResponse |
| 74 | 74 | |
| 75 | 75 | class foo |
@@ -58,14 +58,14 @@ |
||
| 58 | 58 | } |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | -class mpgResponse{ |
|
| 61 | +class mpgResponse { |
|
| 62 | 62 | var $term_id; |
| 63 | 63 | var $currentTag; |
| 64 | - function characterHandler($parser,$data){ |
|
| 65 | - switch($this->currentTag) |
|
| 64 | + function characterHandler($parser, $data) { |
|
| 65 | + switch ($this->currentTag) |
|
| 66 | 66 | { |
| 67 | 67 | case "term_id": { |
| 68 | - $this->term_id=$data; |
|
| 68 | + $this->term_id = $data; |
|
| 69 | 69 | break; |
| 70 | 70 | } |
| 71 | 71 | } |
@@ -43,116 +43,116 @@ |
||
| 43 | 43 | public function getErrorList() |
| 44 | 44 | { |
| 45 | 45 | $errors = array( |
| 46 | - 11 => 1, |
|
| 47 | - 12 => 1, |
|
| 48 | - 13 => 1, |
|
| 49 | - 14 => 1, |
|
| 50 | - 15 => 1, |
|
| 51 | - 16 => 1, |
|
| 52 | - 17 => 1, |
|
| 53 | - 18 => 1, |
|
| 54 | - 19 => 1, |
|
| 55 | - 20 => 1, |
|
| 56 | - 24 => 1, |
|
| 57 | - 25 => 1, |
|
| 58 | - 26 => 1, |
|
| 59 | - 27 => 1, |
|
| 60 | - 28 => 1, |
|
| 61 | - 29 => 1, |
|
| 62 | - 30 => 1, |
|
| 63 | - 31 => 1, |
|
| 64 | - 32 => 1, |
|
| 65 | - 33 => 1, |
|
| 66 | - 35 => 1, |
|
| 67 | - 36 => 1, |
|
| 68 | - 37 => 1, |
|
| 69 | - 38 => 1, |
|
| 70 | - 39 => 1, |
|
| 71 | - 40 => 1, |
|
| 72 | - 43 => 1, |
|
| 73 | - 44 => 1, |
|
| 74 | - 45 => 1, |
|
| 75 | - 46 => 1, |
|
| 76 | - 50 => 1, |
|
| 77 | - 51 => 1, |
|
| 78 | - 52 => 1, |
|
| 79 | - 53 => 1, |
|
| 80 | - 56 => 1, |
|
| 81 | - 57 => 1, |
|
| 82 | - 58 => 1, |
|
| 83 | - 59 => 1, |
|
| 84 | - 67 => 1, |
|
| 85 | - 68 => 1, |
|
| 86 | - 69 => 1, |
|
| 87 | - 70 => 1, |
|
| 88 | - 71 => 1, |
|
| 89 | - 72 => 1, |
|
| 90 | - 73 => 1, |
|
| 91 | - 74 => 1, |
|
| 92 | - 75 => 1, |
|
| 93 | - 76 => 1, |
|
| 94 | - 80 => 1, |
|
| 95 | - 81 => 1, |
|
| 96 | - 82 => 1, |
|
| 97 | - 83 => 1, |
|
| 98 | - 84 => 1, |
|
| 99 | - 85 => 1, |
|
| 100 | - 86 => 1, |
|
| 101 | - 87 => 1, |
|
| 102 | - 88 => 1, |
|
| 103 | - 89 => 1, |
|
| 104 | - 91 => 1, |
|
| 105 | - 92 => 1, |
|
| 106 | - 93 => 1, |
|
| 107 | - 94 => 1, |
|
| 108 | - 95 => 1, |
|
| 109 | - 96 => 1, |
|
| 110 | - 99 => 1, |
|
| 111 | - 100 => 1, |
|
| 112 | - 101 => 1, |
|
| 113 | - 102 => 1, |
|
| 114 | - 106 => 1, |
|
| 115 | - 107 => 1, |
|
| 116 | - 108 => 1, |
|
| 117 | - 109 => 1, |
|
| 118 | - 112 => 1, |
|
| 119 | - 113 => 1, |
|
| 120 | - 114 => 1, |
|
| 121 | - 115 => 1, |
|
| 122 | - 121 => 1, |
|
| 123 | - 122 => 1, |
|
| 124 | - 123 => 1, |
|
| 125 | - 124 => 1, |
|
| 126 | - 125 => 1, |
|
| 127 | - 126 => 1, |
|
| 128 | - 127 => 1, |
|
| 129 | - 128 => 1, |
|
| 130 | - 129 => 1, |
|
| 131 | - 130 => 1, |
|
| 132 | - 149 => 1, |
|
| 133 | - 151 => 1, |
|
| 134 | - 152 => 1, |
|
| 135 | - 155 => 1, |
|
| 136 | - 156 => 1, |
|
| 137 | - 157 => 1, |
|
| 138 | - 158 => 1, |
|
| 139 | - 159 => 1, |
|
| 140 | - 160 => 1, |
|
| 141 | - 161 => 1, |
|
| 142 | - 162 => 1, |
|
| 143 | - 163 => 1, |
|
| 144 | - 164 => 1, |
|
| 145 | - 165 => 1, |
|
| 146 | - 166 => 1, |
|
| 147 | - 167 => 1, |
|
| 148 | - 169 => 1, |
|
| 149 | - 170 => 1, |
|
| 150 | - 171 => 1, |
|
| 151 | - 173 => 1, |
|
| 152 | - 174 => 1, |
|
| 153 | - 175 => 1, |
|
| 154 | - 207 => 1, |
|
| 155 | - ); |
|
| 46 | + 11 => 1, |
|
| 47 | + 12 => 1, |
|
| 48 | + 13 => 1, |
|
| 49 | + 14 => 1, |
|
| 50 | + 15 => 1, |
|
| 51 | + 16 => 1, |
|
| 52 | + 17 => 1, |
|
| 53 | + 18 => 1, |
|
| 54 | + 19 => 1, |
|
| 55 | + 20 => 1, |
|
| 56 | + 24 => 1, |
|
| 57 | + 25 => 1, |
|
| 58 | + 26 => 1, |
|
| 59 | + 27 => 1, |
|
| 60 | + 28 => 1, |
|
| 61 | + 29 => 1, |
|
| 62 | + 30 => 1, |
|
| 63 | + 31 => 1, |
|
| 64 | + 32 => 1, |
|
| 65 | + 33 => 1, |
|
| 66 | + 35 => 1, |
|
| 67 | + 36 => 1, |
|
| 68 | + 37 => 1, |
|
| 69 | + 38 => 1, |
|
| 70 | + 39 => 1, |
|
| 71 | + 40 => 1, |
|
| 72 | + 43 => 1, |
|
| 73 | + 44 => 1, |
|
| 74 | + 45 => 1, |
|
| 75 | + 46 => 1, |
|
| 76 | + 50 => 1, |
|
| 77 | + 51 => 1, |
|
| 78 | + 52 => 1, |
|
| 79 | + 53 => 1, |
|
| 80 | + 56 => 1, |
|
| 81 | + 57 => 1, |
|
| 82 | + 58 => 1, |
|
| 83 | + 59 => 1, |
|
| 84 | + 67 => 1, |
|
| 85 | + 68 => 1, |
|
| 86 | + 69 => 1, |
|
| 87 | + 70 => 1, |
|
| 88 | + 71 => 1, |
|
| 89 | + 72 => 1, |
|
| 90 | + 73 => 1, |
|
| 91 | + 74 => 1, |
|
| 92 | + 75 => 1, |
|
| 93 | + 76 => 1, |
|
| 94 | + 80 => 1, |
|
| 95 | + 81 => 1, |
|
| 96 | + 82 => 1, |
|
| 97 | + 83 => 1, |
|
| 98 | + 84 => 1, |
|
| 99 | + 85 => 1, |
|
| 100 | + 86 => 1, |
|
| 101 | + 87 => 1, |
|
| 102 | + 88 => 1, |
|
| 103 | + 89 => 1, |
|
| 104 | + 91 => 1, |
|
| 105 | + 92 => 1, |
|
| 106 | + 93 => 1, |
|
| 107 | + 94 => 1, |
|
| 108 | + 95 => 1, |
|
| 109 | + 96 => 1, |
|
| 110 | + 99 => 1, |
|
| 111 | + 100 => 1, |
|
| 112 | + 101 => 1, |
|
| 113 | + 102 => 1, |
|
| 114 | + 106 => 1, |
|
| 115 | + 107 => 1, |
|
| 116 | + 108 => 1, |
|
| 117 | + 109 => 1, |
|
| 118 | + 112 => 1, |
|
| 119 | + 113 => 1, |
|
| 120 | + 114 => 1, |
|
| 121 | + 115 => 1, |
|
| 122 | + 121 => 1, |
|
| 123 | + 122 => 1, |
|
| 124 | + 123 => 1, |
|
| 125 | + 124 => 1, |
|
| 126 | + 125 => 1, |
|
| 127 | + 126 => 1, |
|
| 128 | + 127 => 1, |
|
| 129 | + 128 => 1, |
|
| 130 | + 129 => 1, |
|
| 131 | + 130 => 1, |
|
| 132 | + 149 => 1, |
|
| 133 | + 151 => 1, |
|
| 134 | + 152 => 1, |
|
| 135 | + 155 => 1, |
|
| 136 | + 156 => 1, |
|
| 137 | + 157 => 1, |
|
| 138 | + 158 => 1, |
|
| 139 | + 159 => 1, |
|
| 140 | + 160 => 1, |
|
| 141 | + 161 => 1, |
|
| 142 | + 162 => 1, |
|
| 143 | + 163 => 1, |
|
| 144 | + 164 => 1, |
|
| 145 | + 165 => 1, |
|
| 146 | + 166 => 1, |
|
| 147 | + 167 => 1, |
|
| 148 | + 169 => 1, |
|
| 149 | + 170 => 1, |
|
| 150 | + 171 => 1, |
|
| 151 | + 173 => 1, |
|
| 152 | + 174 => 1, |
|
| 153 | + 175 => 1, |
|
| 154 | + 207 => 1, |
|
| 155 | + ); |
|
| 156 | 156 | |
| 157 | 157 | return $errors; |
| 158 | 158 | |
@@ -3,7 +3,7 @@ discard block |
||
| 3 | 3 | ->someOtherFunc(23, 42)-> |
| 4 | 4 | someOtherFunc2($one, $two) |
| 5 | 5 | |
| 6 | - ->someOtherFunc3(23, 42) |
|
| 6 | + ->someOtherFunc3(23, 42) |
|
| 7 | 7 | ->andAThirdFunction(); |
| 8 | 8 | |
| 9 | 9 | $someObject->someFunction("some", "parameter") |
@@ -45,6 +45,6 @@ discard block |
||
| 45 | 45 | -> Events; |
| 46 | 46 | |
| 47 | 47 | $response |
| 48 | - -> CompletedTrackDetails |
|
| 48 | + -> CompletedTrackDetails |
|
| 49 | 49 | -> TrackDetails |
| 50 | - -> Events; |
|
| 50 | + -> Events; |
|
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | |
| 9 | 9 | function test1() |
| 10 | 10 | { |
| 11 | - } |
|
| 11 | + } |
|
| 12 | 12 | |
| 13 | 13 | function test2() {} |
| 14 | 14 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | class Test2 |
| 23 | 23 | { |
| 24 | - } |
|
| 24 | + } |
|
| 25 | 25 | |
| 26 | 26 | |
| 27 | 27 | public function test2() |
@@ -48,18 +48,18 @@ discard block |
||
| 48 | 48 | switch ($foo) { |
| 49 | 49 | case 1: |
| 50 | 50 | switch ($bar) { |
| 51 | - default: |
|
| 52 | - if ($something) { |
|
| 53 | - echo $string{1}; |
|
| 54 | - } else if ($else) { |
|
| 55 | - switch ($else) { |
|
| 56 | - case 1: |
|
| 57 | - // Do something. |
|
| 58 | - break; |
|
| 59 | - default: |
|
| 60 | - // Do something. |
|
| 61 | - break; |
|
| 62 | - } |
|
| 51 | + default: |
|
| 52 | + if ($something) { |
|
| 53 | + echo $string{1}; |
|
| 54 | + } else if ($else) { |
|
| 55 | + switch ($else) { |
|
| 56 | + case 1: |
|
| 57 | + // Do something. |
|
| 58 | + break; |
|
| 59 | + default: |
|
| 60 | + // Do something. |
|
| 61 | + break; |
|
| 62 | + } |
|
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | break; |
@@ -69,11 +69,11 @@ discard block |
||
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | switch ($httpResponseCode) { |
| 72 | - case 100: |
|
| 73 | - case 101: |
|
| 74 | - case 102: |
|
| 75 | - default: |
|
| 76 | - return 'Unknown'; |
|
| 72 | + case 100: |
|
| 73 | + case 101: |
|
| 74 | + case 102: |
|
| 75 | + default: |
|
| 76 | + return 'Unknown'; |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | switch ($httpResponseCode) { |
@@ -33,8 +33,8 @@ discard block |
||
| 33 | 33 | if (!class_exists($class_name)) { |
| 34 | 34 | echo $error; |
| 35 | 35 | } |
| 36 | - $this->{$property} =& new $class_name($this->db_index); |
|
| 37 | - $this->modules[$module] =& $this->{$property}; |
|
| 36 | + $this->{$property} = & new $class_name($this->db_index); |
|
| 37 | + $this->modules[$module] = & $this->{$property}; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | foreach ($elements as $element) { |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | return 'Unknown'; |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | -switch($i) { |
|
| 88 | +switch ($i) { |
|
| 89 | 89 | case 1: {} |
| 90 | 90 | } |
| 91 | 91 | |
@@ -127,15 +127,15 @@ discard block |
||
| 127 | 127 | <?php endforeach ?> |
| 128 | 128 | </ul> |
| 129 | 129 | <?php |
| 130 | -switch ( $a ) { |
|
| 130 | +switch ($a) { |
|
| 131 | 131 | case 'foo': |
| 132 | 132 | do { |
| 133 | 133 | $a = 'b'; |
| 134 | - } while ( $a ); |
|
| 134 | + } while ($a); |
|
| 135 | 135 | return 5; |
| 136 | 136 | |
| 137 | 137 | case 'bar': |
| 138 | - foreach ( $a as $b ) { |
|
| 138 | + foreach ($a as $b) { |
|
| 139 | 139 | $e = 'b'; |
| 140 | 140 | } |
| 141 | 141 | return 5; |
@@ -4,30 +4,30 @@ discard block |
||
| 4 | 4 | { |
| 5 | 5 | function __construct() |
| 6 | 6 | { |
| 7 | - $this->hello(); // error here |
|
| 7 | + $this->hello(); // error here |
|
| 8 | 8 | } |
| 9 | 9 | |
| 10 | - function hello() // error here |
|
| 10 | + function hello() // error here |
|
| 11 | 11 | { // no error here as brackets can be put anywhere in the pear standard |
| 12 | 12 | echo 'hello'; |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | function hello2() |
| 16 | 16 | { |
| 17 | - if (TRUE) { // error here |
|
| 17 | + if (TRUE) { // error here |
|
| 18 | 18 | echo 'hello'; // no error here as its more than 4 spaces. |
| 19 | 19 | } else { |
| 20 | 20 | echo 'bye'; // error here |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | while (TRUE) { |
| 24 | - echo 'hello'; // error here |
|
| 25 | - } |
|
| 24 | + echo 'hello'; // error here |
|
| 25 | + } |
|
| 26 | 26 | |
| 27 | - do { // error here |
|
| 28 | - echo 'hello'; // error here |
|
| 29 | - } while (TRUE); |
|
| 30 | - } |
|
| 27 | + do { // error here |
|
| 28 | + echo 'hello'; // error here |
|
| 29 | + } while (TRUE); |
|
| 30 | + } |
|
| 31 | 31 | |
| 32 | 32 | function hello3() |
| 33 | 33 | { |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | */ |
| 124 | 124 | |
| 125 | 125 | /** |
| 126 | - */ |
|
| 126 | + */ |
|
| 127 | 127 | |
| 128 | 128 | /* |
| 129 | 129 | This 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) { |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | array_map( |
| 309 | 309 | function($x) |
| 310 | 310 | { |
| 311 | - return trim($x); |
|
| 311 | + return trim($x); |
|
| 312 | 312 | }, |
| 313 | 313 | $array |
| 314 | 314 | ); |
| 315 | 315 | \ No newline at end of file |
@@ -32,8 +32,8 @@ discard block |
||
| 32 | 32 | function hello3() |
| 33 | 33 | { |
| 34 | 34 | switch ($hello) { |
| 35 | - case 'hello': |
|
| 36 | - break; |
|
| 35 | + case 'hello': |
|
| 36 | + break; |
|
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | |
@@ -79,20 +79,20 @@ discard block |
||
| 79 | 79 | } else if (FALSE) { |
| 80 | 80 | foreach ($tokens as $token) { |
| 81 | 81 | switch ($token) { |
| 82 | - case '1': |
|
| 83 | - case '2': |
|
| 84 | - if (true) { |
|
| 85 | - if (false) { |
|
| 82 | + case '1': |
|
| 83 | + case '2': |
|
| 84 | + if (true) { |
|
| 86 | 85 | if (false) { |
| 87 | 86 | if (false) { |
| 88 | - echo 'hello'; |
|
| 87 | + if (false) { |
|
| 88 | + echo 'hello'; |
|
| 89 | + } |
|
| 89 | 90 | } |
| 90 | 91 | } |
| 91 | 92 | } |
| 92 | - } |
|
| 93 | - break; |
|
| 94 | - case '5': |
|
| 95 | 93 | break; |
| 94 | + case '5': |
|
| 95 | + break; |
|
| 96 | 96 | } |
| 97 | 97 | do { |
| 98 | 98 | while (true) { |
@@ -161,20 +161,20 @@ discard block |
||
| 161 | 161 | $last = count($ts) - 1; |
| 162 | 162 | |
| 163 | 163 | switch ($token) { |
| 164 | - case '(': |
|
| 164 | + case '(': |
|
| 165 | 165 | |
| 166 | - if ($last >= 3 && |
|
| 167 | - $ts[0]['token'] != T_CLASS && |
|
| 168 | - $ts[$last - 2]['token'] == T_OBJECT_OPERATOR && |
|
| 169 | - $ts[$last - 3]['token'] == T_VARIABLE ) { |
|
| 166 | + if ($last >= 3 && |
|
| 167 | + $ts[0]['token'] != T_CLASS && |
|
| 168 | + $ts[$last - 2]['token'] == T_OBJECT_OPERATOR && |
|
| 169 | + $ts[$last - 3]['token'] == T_VARIABLE ) { |
|
| 170 | 170 | |
| 171 | 171 | |
| 172 | - if (true) { |
|
| 173 | - echo 'hello'; |
|
| 172 | + if (true) { |
|
| 173 | + echo 'hello'; |
|
| 174 | + } |
|
| 174 | 175 | } |
| 175 | - } |
|
| 176 | - array_push($braces, $token); |
|
| 177 | - break; |
|
| 176 | + array_push($braces, $token); |
|
| 177 | + break; |
|
| 178 | 178 | } |
| 179 | 179 | } |
| 180 | 180 | } |
@@ -256,19 +256,19 @@ discard block |
||
| 256 | 256 | switch ($foo) { |
| 257 | 257 | case 1: |
| 258 | 258 | switch ($bar) { |
| 259 | - default: |
|
| 260 | - echo $string{1}; |
|
| 259 | + default: |
|
| 260 | + echo $string{1}; |
|
| 261 | 261 | } |
| 262 | 262 | break; |
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | function temp($foo, $bar) { |
| 266 | 266 | switch ($foo) { |
| 267 | - case 1: |
|
| 268 | - switch ($bar) { |
|
| 269 | - default: |
|
| 270 | - return $foo; |
|
| 271 | - } |
|
| 267 | + case 1: |
|
| 268 | + switch ($bar) { |
|
| 269 | + default: |
|
| 270 | + return $foo; |
|
| 271 | + } |
|
| 272 | 272 | break; |
| 273 | 273 | } |
| 274 | 274 | } |
@@ -166,7 +166,7 @@ |
||
| 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) { |
@@ -61,8 +61,12 @@ |
||
| 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 | /** |
@@ -79,10 +79,10 @@ discard block |
||
| 79 | 79 | ); |
| 80 | 80 | |
| 81 | 81 | array_map( |
| 82 | - function($x) |
|
| 83 | - { |
|
| 84 | - return trim($x); |
|
| 85 | - }, |
|
| 82 | + function($x) |
|
| 83 | + { |
|
| 84 | + return trim($x); |
|
| 85 | + }, |
|
| 86 | 86 | $array |
| 87 | 87 | ); |
| 88 | 88 | |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | 'is', |
| 174 | 174 | 'an', |
| 175 | 175 | 'array' |
| 176 | - ], |
|
| 176 | + ], |
|
| 177 | 177 | array( |
| 178 | 178 | 'this', |
| 179 | 179 | 'is', |
@@ -185,13 +185,13 @@ discard block |
||
| 185 | 185 | 'is', |
| 186 | 186 | 'an', |
| 187 | 187 | 'array' |
| 188 | - ), |
|
| 188 | + ), |
|
| 189 | 189 | function($x) |
| 190 | 190 | { |
| 191 | 191 | echo 'wee'; |
| 192 | 192 | |
| 193 | 193 | return trim($x); |
| 194 | - } |
|
| 194 | + } |
|
| 195 | 195 | ); |
| 196 | 196 | |
| 197 | 197 | function foo() |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | $test = ' |
| 273 | 273 | ' . function_0( |
| 274 | 274 | $argument_0, |
| 275 | - $argument_1 |
|
| 275 | + $argument_1 |
|
| 276 | 276 | ); |
| 277 | 277 | } |
| 278 | 278 | |
@@ -4,18 +4,18 @@ discard block |
||
| 4 | 4 | test($arg, $arg2); |
| 5 | 5 | isset (); |
| 6 | 6 | test( ); |
| 7 | -test() ; |
|
| 8 | -test( $arg); |
|
| 9 | -empty( $arg ); |
|
| 10 | -eval ( $arg ); |
|
| 7 | +test(); |
|
| 8 | +test($arg); |
|
| 9 | +empty($arg); |
|
| 10 | +eval ($arg); |
|
| 11 | 11 | |
| 12 | 12 | if (is_array($arg) === true) { |
| 13 | 13 | |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | $something = get($arg1, $arg2); |
| 17 | -$something = get($arg1, $arg2) ; |
|
| 18 | -$something = get($arg1, $arg2) ; |
|
| 17 | +$something = get($arg1, $arg2); |
|
| 18 | +$something = get($arg1, $arg2); |
|
| 19 | 19 | |
| 20 | 20 | // No errors as this test only checks for function calls. |
| 21 | 21 | class TestClass extends MyClass |
@@ -24,11 +24,11 @@ discard block |
||
| 24 | 24 | const const1 = 'hello'; |
| 25 | 25 | const CONST2 = 'hello'; |
| 26 | 26 | |
| 27 | - public function test () { } |
|
| 27 | + public function test() { } |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | make_foo($string/*the string*/, true/*test*/); |
| 31 | -make_foo($string/*the string*/, true/*test*/ ); |
|
| 31 | +make_foo($string/*the string*/, true/*test*/); |
|
| 32 | 32 | make_foo($string /*the string*/, true /*test*/); |
| 33 | 33 | make_foo(/*the string*/$string, /*test*/true); |
| 34 | 34 | make_foo( /*the string*/$string, /*test*/true); |
@@ -211,8 +211,8 @@ discard block |
||
| 211 | 211 | // @codingStandardsChangeSetting PEAR.Functions.FunctionCallSignature requiredSpacesAfterOpen 1 |
| 212 | 212 | // @codingStandardsChangeSetting PEAR.Functions.FunctionCallSignature requiredSpacesBeforeClose 1 |
| 213 | 213 | test($arg, $arg2); |
| 214 | -test( $arg, $arg2 ); |
|
| 215 | -test( $arg, $arg2 ); |
|
| 214 | +test($arg, $arg2); |
|
| 215 | +test($arg, $arg2); |
|
| 216 | 216 | // @codingStandardsChangeSetting PEAR.Functions.FunctionCallSignature requiredSpacesAfterOpen 0 |
| 217 | 217 | // @codingStandardsChangeSetting PEAR.Functions.FunctionCallSignature requiredSpacesBeforeClose 0 |
| 218 | 218 | |
@@ -231,10 +231,10 @@ discard block |
||
| 231 | 231 | |
| 232 | 232 | array_walk( |
| 233 | 233 | $types, |
| 234 | - function ($title, $type) { |
|
| 234 | + function($title, $type) { |
|
| 235 | 235 | $plural = 'all' !== $type ? 's' : ''; |
| 236 | 236 | ?> |
| 237 | - <li><a href="<?php esc_url('#tabs-documents-' . $type . $plural); ?>"><?php echo esc_html($title); ?></a></li> |
|
| 237 | + <li><a href="<?php esc_url('#tabs-documents-'.$type.$plural); ?>"><?php echo esc_html($title); ?></a></li> |
|
| 238 | 238 | <?php |
| 239 | 239 | } |
| 240 | 240 | ); |
@@ -278,27 +278,27 @@ discard block |
||
| 278 | 278 | |
| 279 | 279 | myFunction( |
| 280 | 280 | 'foo', (object) array( |
| 281 | - 'bar' => function ($x) { |
|
| 281 | + 'bar' => function($x) { |
|
| 282 | 282 | return true; |
| 283 | 283 | }, |
| 284 | 284 | 'baz' => false |
| 285 | 285 | ) |
| 286 | 286 | ); |
| 287 | 287 | $qux = array_filter( |
| 288 | - $quux, function ($x) { |
|
| 288 | + $quux, function($x) { |
|
| 289 | 289 | return $x; |
| 290 | 290 | } |
| 291 | 291 | ); |
| 292 | 292 | |
| 293 | 293 | array_filter( |
| 294 | 294 | [1, 2], |
| 295 | - function ($i) : bool { |
|
| 295 | + function($i) : bool { |
|
| 296 | 296 | return $i === 0; |
| 297 | 297 | } |
| 298 | 298 | ); |
| 299 | 299 | |
| 300 | 300 | foo(array( |
| 301 | - 'callback' => function () { |
|
| 301 | + 'callback' => function() { |
|
| 302 | 302 | $foo = 'foo'; |
| 303 | 303 | return; |
| 304 | 304 | }, |
@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | public function someFunctionWithAVeryLongName($firstParameter='something', |
| 3 | - $secondParameter='booooo', $third=null, $fourthParameter=false, |
|
| 4 | - $fifthParameter=123.12, $sixthParam=true |
|
| 3 | + $secondParameter='booooo', $third=null, $fourthParameter=false, |
|
| 4 | + $fifthParameter=123.12, $sixthParam=true |
|
| 5 | 5 | ){ |
| 6 | 6 | } |
| 7 | 7 | |
@@ -65,9 +65,9 @@ discard block |
||
| 65 | 65 | $url, |
| 66 | 66 | $requireScheme=TRUE, |
| 67 | 67 | array $allowedSchemes=array( |
| 68 | - 'http', |
|
| 69 | - 'https', |
|
| 70 | - ), |
|
| 68 | + 'http', |
|
| 69 | + 'https', |
|
| 70 | + ), |
|
| 71 | 71 | array $notAllowedSchemes=array('ftp', 'sftp') |
| 72 | 72 | ) { |
| 73 | 73 | } |
@@ -1,14 +1,14 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -public function someFunctionWithAVeryLongName($firstParameter='something', |
|
| 3 | - $secondParameter='booooo', $third=null, $fourthParameter=false, |
|
| 4 | - $fifthParameter=123.12, $sixthParam=true |
|
| 5 | -){ |
|
| 2 | +public function someFunctionWithAVeryLongName($firstParameter = 'something', |
|
| 3 | + $secondParameter = 'booooo', $third = null, $fourthParameter = false, |
|
| 4 | + $fifthParameter = 123.12, $sixthParam = true |
|
| 5 | +) { |
|
| 6 | 6 | } |
| 7 | 7 | |
| 8 | -function someFunctionWithAVeryLongName2($firstParameter='something', |
|
| 9 | -$secondParameter='booooo', $third=null, $fourthParameter=false, |
|
| 10 | -$fifthParameter=123.12, $sixthParam=true |
|
| 11 | -) { |
|
| 8 | +function someFunctionWithAVeryLongName2($firstParameter = 'something', |
|
| 9 | +$secondParameter = 'booooo', $third = null, $fourthParameter = false, |
|
| 10 | +$fifthParameter = 123.12, $sixthParam = true |
|
| 11 | +) { |
|
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | function blah() { |
@@ -21,14 +21,14 @@ discard block |
||
| 21 | 21 | class MyClass |
| 22 | 22 | { |
| 23 | 23 | |
| 24 | - public function someFunctionWithAVeryLongName($firstParameter='something', |
|
| 25 | - $secondParameter='booooo', $third=null, $fourthParameter=false, |
|
| 26 | - $fifthParameter=123.12, $sixthParam=true |
|
| 24 | + public function someFunctionWithAVeryLongName($firstParameter = 'something', |
|
| 25 | + $secondParameter = 'booooo', $third = null, $fourthParameter = false, |
|
| 26 | + $fifthParameter = 123.12, $sixthParam = true |
|
| 27 | 27 | ) /** w00t */ { |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | public function someFunctionWithAVeryLongName2( |
| 31 | - $firstParameter='something', $secondParameter='booooo', $third=null |
|
| 31 | + $firstParameter = 'something', $secondParameter = 'booooo', $third = null |
|
| 32 | 32 | ) { |
| 33 | 33 | } |
| 34 | 34 | |
@@ -46,8 +46,8 @@ discard block |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | function getInstalledStandards( |
| 49 | - $includeGeneric=false, |
|
| 50 | - $standardsDir='' |
|
| 49 | + $includeGeneric = false, |
|
| 50 | + $standardsDir = '' |
|
| 51 | 51 | ) |
| 52 | 52 | { |
| 53 | 53 | } |
@@ -63,27 +63,27 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | function validateUrl( |
| 65 | 65 | $url, |
| 66 | - $requireScheme=TRUE, |
|
| 67 | - array $allowedSchemes=array( |
|
| 66 | + $requireScheme = TRUE, |
|
| 67 | + array $allowedSchemes = array( |
|
| 68 | 68 | 'http', |
| 69 | 69 | 'https', |
| 70 | 70 | ), |
| 71 | - array $notAllowedSchemes=array('ftp', 'sftp') |
|
| 71 | + array $notAllowedSchemes = array('ftp', 'sftp') |
|
| 72 | 72 | ) { |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | function validateUrlShort( |
| 76 | 76 | $url, |
| 77 | - $requireScheme=TRUE, |
|
| 78 | - array $allowedSchemes=[ |
|
| 77 | + $requireScheme = TRUE, |
|
| 78 | + array $allowedSchemes = [ |
|
| 79 | 79 | 'http', |
| 80 | 80 | 'https', |
| 81 | 81 | ], |
| 82 | - array $notAllowedSchemes=['ftp', 'sftp'] |
|
| 82 | + array $notAllowedSchemes = ['ftp', 'sftp'] |
|
| 83 | 83 | ) { |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | -$noArgs_longVars = function () use ( |
|
| 86 | +$noArgs_longVars = function() use ( |
|
| 87 | 87 | $longVar1, |
| 88 | 88 | $longerVar2, |
| 89 | 89 | $muchLongerVar3 |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | // body |
| 92 | 92 | }; |
| 93 | 93 | |
| 94 | -$longArgs_longVars = function ( |
|
| 94 | +$longArgs_longVars = function( |
|
| 95 | 95 | $longArgument, |
| 96 | 96 | $longerArgument, |
| 97 | 97 | $muchLongerArgument |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | // body |
| 104 | 104 | }; |
| 105 | 105 | |
| 106 | -$longArgs_longVars = function ( |
|
| 106 | +$longArgs_longVars = function( |
|
| 107 | 107 | $longArgument, |
| 108 | 108 | $longerArgument, |
| 109 | 109 | $muchLongerArgument |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | // body |
| 116 | 116 | }; |
| 117 | 117 | |
| 118 | -$longArgs_longVars = function ( |
|
| 118 | +$longArgs_longVars = function( |
|
| 119 | 119 | $longArgument, |
| 120 | 120 | $muchLongerArgument)use( |
| 121 | 121 | $muchLongerVar3) { |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | |
| 125 | 125 | function test() |
| 126 | 126 | { |
| 127 | - $longArgs_longVars = function ( |
|
| 127 | + $longArgs_longVars = function( |
|
| 128 | 128 | $longArgument, |
| 129 | 129 | $longerArgument, |
| 130 | 130 | $muchLongerArgument |
@@ -158,10 +158,10 @@ discard block |
||
| 158 | 158 | f(); |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | -$var = function() {return true;}; |
|
| 161 | +$var = function() {return true; }; |
|
| 162 | 162 | $var = function() {return true; |
| 163 | 163 | }; |
| 164 | -function blah(){return true; |
|
| 164 | +function blah() {return true; |
|
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | $closureWithArgsAndVars = function($arg1, $arg2) use ($var1, $var2){ |
@@ -169,8 +169,7 @@ discard block |
||
| 169 | 169 | }; |
| 170 | 170 | |
| 171 | 171 | function |
| 172 | -blah |
|
| 173 | -() |
|
| 172 | +blah() |
|
| 174 | 173 | { |
| 175 | 174 | // body |
| 176 | 175 | } |
@@ -11,32 +11,32 @@ discard block |
||
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | // Valid |
| 14 | -function myFunction($arg1, $arg2='hello') |
|
| 14 | +function myFunction($arg1, $arg2 = 'hello') |
|
| 15 | 15 | { |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | // Valid with lots of args |
| 19 | -function myFunction($arg1, $arg2, $arg3, $arg4='hello', $arg5=array(), $arg6='hello') |
|
| 19 | +function myFunction($arg1, $arg2, $arg3, $arg4 = 'hello', $arg5 = array(), $arg6 = 'hello') |
|
| 20 | 20 | { |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | // Valid type hints |
| 24 | -function myFunction(array $arg1, array $arg2=array()) |
|
| 24 | +function myFunction(array $arg1, array $arg2 = array()) |
|
| 25 | 25 | { |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | // Invalid |
| 29 | -function myFunction($arg2='hello', $arg1) |
|
| 29 | +function myFunction($arg2 = 'hello', $arg1) |
|
| 30 | 30 | { |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | // Invalid with lots of args |
| 34 | -function myFunction($arg1, $arg2, $arg3, $arg4='hello', $arg5, $arg6='hello') |
|
| 34 | +function myFunction($arg1, $arg2, $arg3, $arg4 = 'hello', $arg5, $arg6 = 'hello') |
|
| 35 | 35 | { |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | // Invalid type hints |
| 39 | -function myFunction(array $arg2=array(), array $arg1) |
|
| 39 | +function myFunction(array $arg2 = array(), array $arg1) |
|
| 40 | 40 | { |
| 41 | 41 | } |
| 42 | 42 | |
@@ -53,34 +53,34 @@ discard block |
||
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | // Valid |
| 56 | - function myFunction($arg1, $arg2='hello') |
|
| 56 | + function myFunction($arg1, $arg2 = 'hello') |
|
| 57 | 57 | { |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | // Valid with lots of args |
| 61 | - function myFunction($arg1, $arg2, $arg3, $arg4='hello', $arg5=array(), $arg6='hello') |
|
| 61 | + function myFunction($arg1, $arg2, $arg3, $arg4 = 'hello', $arg5 = array(), $arg6 = 'hello') |
|
| 62 | 62 | { |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | // Valid type hints |
| 66 | - function myFunction(array $arg1, array $arg2=array()) |
|
| 66 | + function myFunction(array $arg1, array $arg2 = array()) |
|
| 67 | 67 | { |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | // Invalid |
| 71 | - function myFunction($arg2='hello', $arg1) |
|
| 71 | + function myFunction($arg2 = 'hello', $arg1) |
|
| 72 | 72 | { |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | // Invalid with lots of args |
| 76 | - function myFunction($arg1, $arg2, $arg3, $arg4='hello', $arg5, $arg6='hello') |
|
| 76 | + function myFunction($arg1, $arg2, $arg3, $arg4 = 'hello', $arg5, $arg6 = 'hello') |
|
| 77 | 77 | { |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | // Invalid type hints |
| 81 | - function myFunction(array $arg2=array(), array $arg1) |
|
| 81 | + function myFunction(array $arg2 = array(), array $arg1) |
|
| 82 | 82 | { |
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | -function myFunc($req, $opt=null, ...$params) {} |
|
| 86 | +function myFunc($req, $opt = null, ...$params) {} |
|
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | 54 => 1, |
| 65 | 65 | 70 => 1, |
| 66 | 66 | 71 => 1, |
| 67 | - ); |
|
| 67 | + ); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | return array( |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | 275 => 1, |
| 103 | 103 | 300 => 1, |
| 104 | 104 | 305 => 1, |
| 105 | - ); |
|
| 105 | + ); |
|
| 106 | 106 | |
| 107 | 107 | }//end getErrorList() |
| 108 | 108 | |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | * |
| 43 | 43 | * @return array<int, int> |
| 44 | 44 | */ |
| 45 | - public function getErrorList($testFile='FunctionCallSignatureUnitTest.inc') |
|
| 45 | + public function getErrorList($testFile = 'FunctionCallSignatureUnitTest.inc') |
|
| 46 | 46 | { |
| 47 | 47 | if ($testFile === 'FunctionCallSignatureUnitTest.js') { |
| 48 | 48 | return array( |