@@ -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) { |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | */ |
| 92 | 92 | protected function expression($identifier) |
| 93 | 93 | { |
| 94 | - return preg_replace_callback('/([a-z][0-9_a-z\.]*\(?)/i', function ($match) { |
|
| 94 | + return preg_replace_callback('/([a-z][0-9_a-z\.]*\(?)/i', function($match) { |
|
| 95 | 95 | $identifier = $match[1]; |
| 96 | 96 | |
| 97 | 97 | //Function name |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | */ |
| 114 | 114 | protected function aliasing($identifier, $alias, $table) |
| 115 | 115 | { |
| 116 | - $quoted = $this->quote($identifier, $table) . ' AS ' . $this->driver->identifier($alias); |
|
| 116 | + $quoted = $this->quote($identifier, $table).' AS '.$this->driver->identifier($alias); |
|
| 117 | 117 | |
| 118 | 118 | if ($table && strpos($identifier, '.') === false) { |
| 119 | 119 | //We have to apply operation post factum to prevent self aliasing (name AS name) |
@@ -148,12 +148,12 @@ discard block |
||
| 148 | 148 | protected function unpaired($identifier, $table) |
| 149 | 149 | { |
| 150 | 150 | if ($table && !isset($this->aliases[$identifier])) { |
| 151 | - if (!isset($this->aliases[$this->prefix . $identifier])) { |
|
| 151 | + if (!isset($this->aliases[$this->prefix.$identifier])) { |
|
| 152 | 152 | //Generating our alias |
| 153 | - $this->aliases[$this->prefix . $identifier] = $identifier; |
|
| 153 | + $this->aliases[$this->prefix.$identifier] = $identifier; |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | - $identifier = $this->prefix . $identifier; |
|
| 156 | + $identifier = $this->prefix.$identifier; |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | return $this->driver->identifier($identifier); |
@@ -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 | /** |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | $key = md5(serialize([$query, $parameters, $this->name, $this->prefix])); |
| 263 | 263 | } |
| 264 | 264 | |
| 265 | - $data = $store->remember($key, $lifetime, function () use ($query, $parameters) { |
|
| 265 | + $data = $store->remember($key, $lifetime, function() use ($query, $parameters) { |
|
| 266 | 266 | return $this->query($query, $parameters)->fetchAll(); |
| 267 | 267 | }); |
| 268 | 268 | |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | */ |
| 379 | 379 | public function hasTable($name) |
| 380 | 380 | { |
| 381 | - return $this->driver->hasTable($this->prefix . $name); |
|
| 381 | + return $this->driver->hasTable($this->prefix.$name); |
|
| 382 | 382 | } |
| 383 | 383 | |
| 384 | 384 | /** |
@@ -164,7 +164,7 @@ |
||
| 164 | 164 | */ |
| 165 | 165 | public function setName($name) |
| 166 | 166 | { |
| 167 | - parent::setName($this->prefix . $name); |
|
| 167 | + parent::setName($this->prefix.$name); |
|
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | /** |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | */ |
| 163 | 163 | public function references($table, $column = 'id') |
| 164 | 164 | { |
| 165 | - $this->foreignTable = $this->table->getPrefix() . $table; |
|
| 165 | + $this->foreignTable = $this->table->getPrefix().$table; |
|
| 166 | 166 | $this->foreignKey = $column; |
| 167 | 167 | |
| 168 | 168 | return $this; |
@@ -206,10 +206,10 @@ discard block |
||
| 206 | 206 | $statement[] = 'CONSTRAINT'; |
| 207 | 207 | $statement[] = $this->getName(true); |
| 208 | 208 | $statement[] = 'FOREIGN KEY'; |
| 209 | - $statement[] = '(' . $this->table->driver()->identifier($this->column) . ')'; |
|
| 209 | + $statement[] = '('.$this->table->driver()->identifier($this->column).')'; |
|
| 210 | 210 | |
| 211 | - $statement[] = 'REFERENCES ' . $this->table->driver()->identifier($this->foreignTable); |
|
| 212 | - $statement[] = '(' . $this->table->driver()->identifier($this->foreignKey) . ')'; |
|
| 211 | + $statement[] = 'REFERENCES '.$this->table->driver()->identifier($this->foreignTable); |
|
| 212 | + $statement[] = '('.$this->table->driver()->identifier($this->foreignKey).')'; |
|
| 213 | 213 | |
| 214 | 214 | $statement[] = "ON DELETE {$this->deleteRule}"; |
| 215 | 215 | $statement[] = "ON UPDATE {$this->updateRule}"; |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | */ |
| 239 | 239 | protected function generateName() |
| 240 | 240 | { |
| 241 | - $name = $this->table->getName() . '_foreign_' . $this->column . '_' . uniqid(); |
|
| 241 | + $name = $this->table->getName().'_foreign_'.$this->column.'_'.uniqid(); |
|
| 242 | 242 | |
| 243 | 243 | if (strlen($name) > 64) { |
| 244 | 244 | //Many dbs has limitations on identifier length |
@@ -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 | /** |