@@ -5,7 +5,7 @@ |
||
| 5 | 5 | public function even($numbers) |
| 6 | 6 | { |
| 7 | 7 | $numbers = array_filter($numbers, function($number) { |
| 8 | - return $number % 2 === 0; |
|
| 8 | + return $number%2 === 0; |
|
| 9 | 9 | }); |
| 10 | 10 | |
| 11 | 11 | return array_merge($numbers); |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | break; |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | - return (string) $tokens[$i]; |
|
| 123 | + return (string)$tokens[$i]; |
|
| 124 | 124 | } |
| 125 | 125 | } |
| 126 | 126 | |
@@ -327,9 +327,9 @@ discard block |
||
| 327 | 327 | |
| 328 | 328 | while (!$tokens[$i] instanceof PHP_Token_CLOSE_BRACKET) { |
| 329 | 329 | if ($tokens[$i] instanceof PHP_Token_STRING) { |
| 330 | - $typeDeclaration = (string) $tokens[$i]; |
|
| 330 | + $typeDeclaration = (string)$tokens[$i]; |
|
| 331 | 331 | } elseif ($tokens[$i] instanceof PHP_Token_VARIABLE) { |
| 332 | - $this->arguments[(string) $tokens[$i]] = $typeDeclaration; |
|
| 332 | + $this->arguments[(string)$tokens[$i]] = $typeDeclaration; |
|
| 333 | 333 | $typeDeclaration = null; |
| 334 | 334 | } |
| 335 | 335 | |
@@ -361,9 +361,9 @@ discard block |
||
| 361 | 361 | } |
| 362 | 362 | |
| 363 | 363 | if ($tokens[$i + 1] instanceof PHP_Token_OPEN_BRACKET) { |
| 364 | - $this->name = (string) $tokens[$i]; |
|
| 364 | + $this->name = (string)$tokens[$i]; |
|
| 365 | 365 | } elseif ($tokens[$i + 1] instanceof PHP_Token_WHITESPACE && $tokens[$i + 2] instanceof PHP_Token_OPEN_BRACKET) { |
| 366 | - $this->name = (string) $tokens[$i]; |
|
| 366 | + $this->name = (string)$tokens[$i]; |
|
| 367 | 367 | } else { |
| 368 | 368 | $this->anonymous = true; |
| 369 | 369 | |
@@ -477,7 +477,7 @@ discard block |
||
| 477 | 477 | */ |
| 478 | 478 | public function getName() |
| 479 | 479 | { |
| 480 | - return (string) $this->tokenStream[$this->id + 2]; |
|
| 480 | + return (string)$this->tokenStream[$this->id + 2]; |
|
| 481 | 481 | } |
| 482 | 482 | |
| 483 | 483 | /** |
@@ -565,11 +565,11 @@ discard block |
||
| 565 | 565 | |
| 566 | 566 | $i = $this->id + 6; |
| 567 | 567 | $tokens = $this->tokenStream->tokens(); |
| 568 | - $className = (string) $tokens[$i]; |
|
| 568 | + $className = (string)$tokens[$i]; |
|
| 569 | 569 | |
| 570 | 570 | while (isset($tokens[$i + 1]) && |
| 571 | 571 | !$tokens[$i + 1] instanceof PHP_Token_WHITESPACE) { |
| 572 | - $className .= (string) $tokens[++$i]; |
|
| 572 | + $className .= (string)$tokens[++$i]; |
|
| 573 | 573 | } |
| 574 | 574 | |
| 575 | 575 | return $className; |
@@ -611,7 +611,7 @@ discard block |
||
| 611 | 611 | $i++; |
| 612 | 612 | |
| 613 | 613 | if ($tokens[$i] instanceof PHP_Token_STRING) { |
| 614 | - $this->interfaces[] = (string) $tokens[$i]; |
|
| 614 | + $this->interfaces[] = (string)$tokens[$i]; |
|
| 615 | 615 | } |
| 616 | 616 | } |
| 617 | 617 | |
@@ -715,7 +715,7 @@ discard block |
||
| 715 | 715 | } |
| 716 | 716 | |
| 717 | 717 | if ($next instanceof PHP_Token_STRING) { |
| 718 | - $this->name =(string) $next; |
|
| 718 | + $this->name = (string)$next; |
|
| 719 | 719 | |
| 720 | 720 | return $this->name; |
| 721 | 721 | } |
@@ -1276,9 +1276,9 @@ discard block |
||
| 1276 | 1276 | public function getName() |
| 1277 | 1277 | { |
| 1278 | 1278 | $tokens = $this->tokenStream->tokens(); |
| 1279 | - $namespace = (string) $tokens[$this->id + 2]; |
|
| 1279 | + $namespace = (string)$tokens[$this->id + 2]; |
|
| 1280 | 1280 | |
| 1281 | - for ($i = $this->id + 3;; $i += 2) { |
|
| 1281 | + for ($i = $this->id + 3; ; $i += 2) { |
|
| 1282 | 1282 | if (isset($tokens[$i]) && |
| 1283 | 1283 | $tokens[$i] instanceof PHP_Token_NS_SEPARATOR) { |
| 1284 | 1284 | $namespace .= '\\' . $tokens[$i + 1]; |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | foreach ($subStrings as $string) { |
| 101 | 101 | if (($type === self::PREFIX && \strpos($filename, $string) === 0) || |
| 102 | 102 | ($type === self::SUFFIX && |
| 103 | - \substr($filename, -1 * \strlen($string)) === $string)) { |
|
| 103 | + \substr($filename, -1*\strlen($string)) === $string)) { |
|
| 104 | 104 | $matched = true; |
| 105 | 105 | |
| 106 | 106 | break; |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | $html = HTMLPurifier_Encoder::convertFromUTF8($html, $config, $context); |
| 227 | - $this->context =& $context; |
|
| 227 | + $this->context = & $context; |
|
| 228 | 228 | return $html; |
| 229 | 229 | } |
| 230 | 230 | |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | { |
| 242 | 242 | $context_array = array(); |
| 243 | 243 | $array = array(); |
| 244 | - foreach($array_of_html as $key=>$value){ |
|
| 244 | + foreach ($array_of_html as $key=>$value) { |
|
| 245 | 245 | if (is_array($value)) { |
| 246 | 246 | $array[$key] = $this->purifyArray($value, $config); |
| 247 | 247 | } else { |
@@ -79,8 +79,8 @@ |
||
| 79 | 79 | // Based off of RFC 1738, but amended so that |
| 80 | 80 | // as per RFC 3696, the top label need only not be all numeric. |
| 81 | 81 | // The productions describing this are: |
| 82 | - $a = '[a-z]'; // alpha |
|
| 83 | - $an = '[a-z0-9]'; // alphanum |
|
| 82 | + $a = '[a-z]'; // alpha |
|
| 83 | + $an = '[a-z0-9]'; // alphanum |
|
| 84 | 84 | $and = "[a-z0-9-$underscore]"; // alphanum | "-" |
| 85 | 85 | // domainlabel = alphanum | alphanum *( alphanum | "-" ) alphanum |
| 86 | 86 | $domainlabel = "$an(?:$and*$an)?"; |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | if (!$this->selector) { |
| 67 | - $id_accumulator =& $context->get('IDAccumulator'); |
|
| 67 | + $id_accumulator = & $context->get('IDAccumulator'); |
|
| 68 | 68 | if (isset($id_accumulator->ids[$id])) { |
| 69 | 69 | return false; |
| 70 | 70 | } |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | if ($this->bcmath) { |
| 233 | 233 | return bcmul($s1, $s2, $scale); |
| 234 | 234 | } else { |
| 235 | - return $this->scale((float)$s1 * (float)$s2, $scale); |
|
| 235 | + return $this->scale((float)$s1*(float)$s2, $scale); |
|
| 236 | 236 | } |
| 237 | 237 | } |
| 238 | 238 | |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | if ($this->bcmath) { |
| 249 | 249 | return bcdiv($s1, $s2, $scale); |
| 250 | 250 | } else { |
| 251 | - return $this->scale((float)$s1 / (float)$s2, $scale); |
|
| 251 | + return $this->scale((float)$s1/(float)$s2, $scale); |
|
| 252 | 252 | } |
| 253 | 253 | } |
| 254 | 254 | |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | $context->register('IsInline', $is_inline); |
| 62 | 62 | |
| 63 | 63 | // setup error collector |
| 64 | - $e =& $context->get('ErrorCollector', true); |
|
| 64 | + $e = & $context->get('ErrorCollector', true); |
|
| 65 | 65 | |
| 66 | 66 | //####################################################################// |
| 67 | 67 | // Loop initialization |
@@ -82,10 +82,10 @@ |
||
| 82 | 82 | $stack = array(); |
| 83 | 83 | |
| 84 | 84 | // member variables |
| 85 | - $this->stack =& $stack; |
|
| 86 | - $this->tokens =& $tokens; |
|
| 87 | - $this->token =& $token; |
|
| 88 | - $this->zipper =& $zipper; |
|
| 85 | + $this->stack = & $stack; |
|
| 86 | + $this->tokens = & $tokens; |
|
| 87 | + $this->token = & $token; |
|
| 88 | + $this->zipper = & $zipper; |
|
| 89 | 89 | $this->config = $config; |
| 90 | 90 | $this->context = $context; |
| 91 | 91 | |