@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | if (strpos($key, '.') !== false) { |
| 183 | 183 | return $query->addSelect($key); |
| 184 | 184 | } elseif ($this->hasColumn($key)) { |
| 185 | - return $query->addSelect($this->getTable() . '.' . $key); |
|
| 185 | + return $query->addSelect($this->getTable().'.'.$key); |
|
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | $alias = $this->joinMeta($query, $key); |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | |
| 220 | 220 | $table = (new Attribute)->getTable(); |
| 221 | 221 | |
| 222 | - $query->leftJoin("{$table} as {$alias}", function ($join) use ($alias, $column) { |
|
| 222 | + $query->leftJoin("{$table} as {$alias}", function($join) use ($alias, $column) { |
|
| 223 | 223 | $join->on("{$alias}.metable_id", '=', $this->getQualifiedKeyName()) |
| 224 | 224 | ->where("{$alias}.metable_type", '=', $this->getMorphClass()) |
| 225 | 225 | ->where("{$alias}.meta_key", '=', $column); |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | */ |
| 236 | 236 | protected function generateMetaAlias() |
| 237 | 237 | { |
| 238 | - return md5(microtime(true)) . '_meta_alias'; |
|
| 238 | + return md5(microtime(true)).'_meta_alias'; |
|
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | /** |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | return $this->getMetaBetweenConstraint($column, $args->get('values')); |
| 332 | 332 | } |
| 333 | 333 | |
| 334 | - return function ($query) use ($column, $method, $args) { |
|
| 334 | + return function($query) use ($column, $method, $args) { |
|
| 335 | 335 | $query->where('meta_key', $column); |
| 336 | 336 | |
| 337 | 337 | if ($args->get('value') || $args->get('values')) { |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | $min = $values[0]; |
| 353 | 353 | $max = $values[1]; |
| 354 | 354 | |
| 355 | - return function ($query) use ($column, $min, $max) { |
|
| 355 | + return function($query) use ($column, $min, $max) { |
|
| 356 | 356 | $query->where('meta_key', $column) |
| 357 | 357 | ->where('meta_value', '>=', $min) |
| 358 | 358 | ->where('meta_value', '<=', $max); |
@@ -112,13 +112,13 @@ discard block |
||
| 112 | 112 | $groupByColumns = $this->model->getConnection()->getSchemaBuilder()->getColumnListing($modelTableName); |
| 113 | 113 | // Force column names to be fully-qualified |
| 114 | 114 | foreach ($groupByColumns as &$column) { |
| 115 | - $column = $modelTableName . '.' . $column; |
|
| 115 | + $column = $modelTableName.'.'.$column; |
|
| 116 | 116 | } |
| 117 | 117 | } else { |
| 118 | 118 | $groupByColumns = $this->model->getQualifiedKeyName(); |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | - $subquery->select($this->model->getTable() . '.*') |
|
| 121 | + $subquery->select($this->model->getTable().'.*') |
|
| 122 | 122 | ->from($this->model->getTable()) |
| 123 | 123 | ->groupBy($groupByColumns); |
| 124 | 124 | |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | if (in_array($type, $typesToMove) && $this->model->hasColumn($where['column'])) { |
| 250 | 250 | unset($this->query->wheres[$key]); |
| 251 | 251 | |
| 252 | - $where['column'] = $this->model->getTable() . '.' . $where['column']; |
|
| 252 | + $where['column'] = $this->model->getTable().'.'.$where['column']; |
|
| 253 | 253 | |
| 254 | 254 | $subquery->getQuery()->wheres[] = $where; |
| 255 | 255 | |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | protected function countBindings(array $where, $type) |
| 281 | 281 | { |
| 282 | 282 | if ($this->isHasWhere($where, $type)) { |
| 283 | - return substr_count($where['column'] . $where['value'], '?'); |
|
| 283 | + return substr_count($where['column'].$where['value'], '?'); |
|
| 284 | 284 | } elseif ($type === 'basic') { |
| 285 | 285 | return (int) !$where['value'] instanceof Expression; |
| 286 | 286 | } elseif (in_array($type, ['basic', 'date', 'year', 'month', 'day'])) { |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | |
| 327 | 327 | $operator = $this->getLikeOperator(); |
| 328 | 328 | |
| 329 | - $bindings['select'] = $bindings['where'] = array_map(function ($word) { |
|
| 329 | + $bindings['select'] = $bindings['where'] = array_map(function($word) { |
|
| 330 | 330 | return $this->caseBinding($word); |
| 331 | 331 | }, $words); |
| 332 | 332 | |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | foreach ($words as $key => $word) { |
| 339 | 339 | if ($this->isLeftMatching($word)) { |
| 340 | 340 | $leftMatching[] = sprintf('%s %s ?', $column->getWrapped(), $operator); |
| 341 | - $bindings['select'][] = $bindings['where'][$key] = $this->caseBinding($word) . '%'; |
|
| 341 | + $bindings['select'][] = $bindings['where'][$key] = $this->caseBinding($word).'%'; |
|
| 342 | 342 | } |
| 343 | 343 | } |
| 344 | 344 | |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | foreach ($words as $key => $word) { |
| 354 | 354 | if ($this->isWildcard($word)) { |
| 355 | 355 | $wildcards[] = sprintf('%s %s ?', $column->getWrapped(), $operator); |
| 356 | - $bindings['select'][] = $bindings['where'][$key] = '%'.$this->caseBinding($word) . '%'; |
|
| 356 | + $bindings['select'][] = $bindings['where'][$key] = '%'.$this->caseBinding($word).'%'; |
|
| 357 | 357 | } |
| 358 | 358 | } |
| 359 | 359 | |
@@ -481,12 +481,12 @@ discard block |
||
| 481 | 481 | public function prefixColumnsForJoin() |
| 482 | 482 | { |
| 483 | 483 | if (!$columns = $this->query->columns) { |
| 484 | - return $this->select($this->model->getTable() . '.*'); |
|
| 484 | + return $this->select($this->model->getTable().'.*'); |
|
| 485 | 485 | } |
| 486 | 486 | |
| 487 | 487 | foreach ($columns as $key => $column) { |
| 488 | 488 | if ($this->model->hasColumn($column)) { |
| 489 | - $columns[$key] = $this->model->getTable() . '.' . $column; |
|
| 489 | + $columns[$key] = $this->model->getTable().'.'.$column; |
|
| 490 | 490 | } |
| 491 | 491 | } |
| 492 | 492 | |