@@ -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); |
@@ -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 | /** |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | public function __call($method, $arguments) |
405 | 405 | { |
406 | 406 | if (!in_array($method = strtoupper($method), ['AVG', 'MIN', 'MAX', 'SUM'])) { |
407 | - throw new BuilderException("Unknown method '{$method}' in '" . get_class($this) . "'"); |
|
407 | + throw new BuilderException("Unknown method '{$method}' in '".get_class($this)."'"); |
|
408 | 408 | } |
409 | 409 | |
410 | 410 | if (!isset($arguments[0]) || count($arguments) > 1) { |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | */ |
454 | 454 | private function havingWrapper() |
455 | 455 | { |
456 | - return function ($parameter) { |
|
456 | + return function($parameter) { |
|
457 | 457 | if ($parameter instanceof FragmentInterface) { |
458 | 458 | //We are only not creating bindings for plan fragments |
459 | 459 | if (!$parameter instanceof ParameterInterface && !$parameter instanceof QueryBuilder) { |
@@ -84,7 +84,7 @@ |
||
84 | 84 | ); |
85 | 85 | } |
86 | 86 | |
87 | - if ($this->foreignTable != $this->table && !$outerSchema->hasColumn($this->foreignKey)) { |
|
87 | + if ($this->foreignTable != $this->table && !$outerSchema->hasColumn($this->foreignKey)) { |
|
88 | 88 | throw new ReferenceException( |
89 | 89 | "Unable to alter foreign key '{$schema->getName()}'.'{$this->column}'," |
90 | 90 | . " foreign column '{$this->foreignTable}'.'{$this->foreignKey}' does not exists" |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | } |
123 | 123 | |
124 | 124 | //Executing migration inside global transaction |
125 | - $this->execute(function () use ($migration) { |
|
125 | + $this->execute(function() use ($migration) { |
|
126 | 126 | $migration->up(); |
127 | 127 | }); |
128 | 128 | |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | } |
153 | 153 | |
154 | 154 | //Executing migration inside global transaction |
155 | - $this->execute(function () use ($migration) { |
|
155 | + $this->execute(function() use ($migration) { |
|
156 | 156 | $migration->down(); |
157 | 157 | }); |
158 | 158 |
@@ -61,14 +61,14 @@ |
||
61 | 61 | */ |
62 | 62 | public function getSchema($database, $table) |
63 | 63 | { |
64 | - if (!isset($this->schemas[$database . '.' . $table])) { |
|
64 | + if (!isset($this->schemas[$database.'.'.$table])) { |
|
65 | 65 | $schema = $this->getTable($database, $table)->getSchema(); |
66 | 66 | |
67 | 67 | //We have to declare existed to prevent dropping existed schema |
68 | - $this->schemas[$database . '.' . $table] = $schema->declareExisted(); |
|
68 | + $this->schemas[$database.'.'.$table] = $schema->declareExisted(); |
|
69 | 69 | } |
70 | 70 | |
71 | - return $this->schemas[$database . '.' . $table]; |
|
71 | + return $this->schemas[$database.'.'.$table]; |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | /** |
@@ -187,7 +187,7 @@ |
||
187 | 187 | ]); |
188 | 188 | |
189 | 189 | return $this->files->normalizePath( |
190 | - $this->config->getDirectory() . FilesInterface::SEPARATOR . $filename |
|
190 | + $this->config->getDirectory().FilesInterface::SEPARATOR.$filename |
|
191 | 191 | ); |
192 | 192 | } |
193 | 193 | } |
194 | 194 | \ No newline at end of file |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | |
137 | 137 | if ($this->isEmbedded()) { |
138 | 138 | throw new DocumentException( |
139 | - "Embedded document '" . get_class($this) . "' can not be saved into collection" |
|
139 | + "Embedded document '".get_class($this)."' can not be saved into collection" |
|
140 | 140 | ); |
141 | 141 | } |
142 | 142 | |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | { |
181 | 181 | if ($this->isEmbedded()) { |
182 | 182 | throw new DocumentException( |
183 | - "Embedded document '" . get_class($this) . "' can not be deleted from collection" |
|
183 | + "Embedded document '".get_class($this)."' can not be deleted from collection" |
|
184 | 184 | ); |
185 | 185 | } |
186 | 186 |