@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | if ($this->isCloseTag($token)) { |
| 72 | 72 | $blockID = $this->uniqueID(); |
| 73 | 73 | |
| 74 | - $this->phpBlocks[$blockID] = $phpBlock . $token[1]; |
|
| 74 | + $this->phpBlocks[$blockID] = $phpBlock.$token[1]; |
|
| 75 | 75 | $isolated .= $this->placeholder($blockID); |
| 76 | 76 | |
| 77 | 77 | $phpBlock = ''; |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | { |
| 145 | 145 | return preg_replace_callback( |
| 146 | 146 | $this->blockRegex(), |
| 147 | - function ($match) { |
|
| 147 | + function($match) { |
|
| 148 | 148 | if (!isset($this->phpBlocks[$match['id']])) { |
| 149 | 149 | return $match[0]; |
| 150 | 150 | } |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | */ |
| 181 | 181 | private function blockRegex() |
| 182 | 182 | { |
| 183 | - return '/' . |
|
| 183 | + return '/'. |
|
| 184 | 184 | preg_quote($this->prefix) |
| 185 | 185 | . '(?P<id>[0-9a-z]+)' |
| 186 | 186 | . preg_quote($this->postfix) |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | */ |
| 193 | 193 | private function uniqueID() |
| 194 | 194 | { |
| 195 | - return md5(count($this->phpBlocks) . uniqid(true)); |
|
| 195 | + return md5(count($this->phpBlocks).uniqid(true)); |
|
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | /** |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | */ |
| 202 | 202 | private function placeholder($blockID) |
| 203 | 203 | { |
| 204 | - return $this->prefix . $blockID . $this->postfix; |
|
| 204 | + return $this->prefix.$blockID.$this->postfix; |
|
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | /** |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | |
| 402 | 402 | $name = $this->tokens[$localID][self::TOKEN_CODE]; |
| 403 | 403 | if (!empty($namespace = $this->activeNamespace($tokenID))) { |
| 404 | - $name = $namespace . self::NS_SEPARATOR . $name; |
|
| 404 | + $name = $namespace.self::NS_SEPARATOR.$name; |
|
| 405 | 405 | } |
| 406 | 406 | |
| 407 | 407 | $this->functions[$name] = [ |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | |
| 427 | 427 | $name = $this->tokens[$localID][self::TOKEN_CODE]; |
| 428 | 428 | if (!empty($namespace = $this->activeNamespace($tokenID))) { |
| 429 | - $name = $namespace . self::NS_SEPARATOR . $name; |
|
| 429 | + $name = $namespace.self::NS_SEPARATOR.$name; |
|
| 430 | 430 | } |
| 431 | 431 | |
| 432 | 432 | $this->declarations[token_name($tokenType)][$name] = [ |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | |
| 40 | 40 | $name = $context->getName(); |
| 41 | 41 | if ($context instanceof \ReflectionMethod) { |
| 42 | - $name = $context->class . '::' . $name; |
|
| 42 | + $name = $context->class.'::'.$name; |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | parent::__construct("Unable to resolve '{$parameter->name}' argument in '{$name}'."); |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | { |
| 325 | 325 | $statement = ''; |
| 326 | 326 | foreach ($joinTokens as $table => $join) { |
| 327 | - $statement .= "\n" . $join['type'] . ' JOIN ' . $this->quote($table, true); |
|
| 327 | + $statement .= "\n".$join['type'].' JOIN '.$this->quote($table, true); |
|
| 328 | 328 | $statement .= $this->optional("\n ON", $this->compileWhere($join['on'])); |
| 329 | 329 | } |
| 330 | 330 | |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | { |
| 364 | 364 | $result = []; |
| 365 | 365 | foreach ($ordering as $order) { |
| 366 | - $result[] = $this->quote($order[0]) . ' ' . strtoupper($order[1]); |
|
| 366 | + $result[] = $this->quote($order[0]).' '.strtoupper($order[1]); |
|
| 367 | 367 | } |
| 368 | 368 | |
| 369 | 369 | return join(', ', $result); |
@@ -525,7 +525,7 @@ discard block |
||
| 525 | 525 | $prefix .= ' '; |
| 526 | 526 | } |
| 527 | 527 | |
| 528 | - return $prefix . $expression . $postfix; |
|
| 528 | + return $prefix.$expression.$postfix; |
|
| 529 | 529 | } |
| 530 | 530 | |
| 531 | 531 | /** |
@@ -581,7 +581,7 @@ discard block |
||
| 581 | 581 | { |
| 582 | 582 | if ($context instanceof QueryBuilder) { |
| 583 | 583 | //Nested queries has to be wrapped with braces |
| 584 | - return '(' . $context->sqlStatement($this) . ')'; |
|
| 584 | + return '('.$context->sqlStatement($this).')'; |
|
| 585 | 585 | } |
| 586 | 586 | |
| 587 | 587 | if ($context instanceof ExpressionInterface) { |
@@ -290,7 +290,7 @@ |
||
| 290 | 290 | /** |
| 291 | 291 | * Compile DISTINCT statement. |
| 292 | 292 | * |
| 293 | - * @param mixed $distinct Not every DBMS support distinct expression, only Postgres does. |
|
| 293 | + * @param boolean|string $distinct Not every DBMS support distinct expression, only Postgres does. |
|
| 294 | 294 | * |
| 295 | 295 | * @return string |
| 296 | 296 | */ |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | */ |
| 94 | 94 | public function realName() |
| 95 | 95 | { |
| 96 | - return $this->database->getPrefix() . $this->name; |
|
| 96 | + return $this->database->getPrefix().$this->name; |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | /** |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | */ |
| 58 | 58 | public function identifier($identifier) |
| 59 | 59 | { |
| 60 | - return $identifier == '*' ? '*' : '`' . str_replace('`', '``', $identifier) . '`'; |
|
| 60 | + return $identifier == '*' ? '*' : '`'.str_replace('`', '``', $identifier).'`'; |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
@@ -108,7 +108,7 @@ |
||
| 108 | 108 | { |
| 109 | 109 | if (is_array($this->value)) { |
| 110 | 110 | //Array were mocked |
| 111 | - return '(' . trim(str_repeat('?, ', count($this->value)), ', ') . ')'; |
|
| 111 | + return '('.trim(str_repeat('?, ', count($this->value)), ', ').')'; |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | return '?'; |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | |
| 410 | 410 | if (!$injector instanceof InjectorInterface) { |
| 411 | 411 | throw new InjectionException( |
| 412 | - "Class '" . get_class($injector) . "' must be an instance of InjectorInterface for '{$reflection->getName()}'" |
|
| 412 | + "Class '".get_class($injector)."' must be an instance of InjectorInterface for '{$reflection->getName()}'" |
|
| 413 | 413 | ); |
| 414 | 414 | } |
| 415 | 415 | |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | $class, |
| 434 | 434 | array $parameters, |
| 435 | 435 | $context = null, |
| 436 | - \ReflectionClass &$reflection = null |
|
| 436 | + \ReflectionClass & $reflection = null |
|
| 437 | 437 | ) { |
| 438 | 438 | try { |
| 439 | 439 | $reflection = new \ReflectionClass($class); |
@@ -174,7 +174,7 @@ |
||
| 174 | 174 | { |
| 175 | 175 | //We do support 3 mutators: getter, setter and accessor, all of them can be |
| 176 | 176 | //referenced to valid field name by adding "s" at the end |
| 177 | - $mutator = $mutator . 's'; |
|
| 177 | + $mutator = $mutator.'s'; |
|
| 178 | 178 | |
| 179 | 179 | if (isset($this->{$mutator}[$field])) { |
| 180 | 180 | return $this->{$mutator}[$field]; |