@@ -26,7 +26,7 @@ |
||
26 | 26 | */ |
27 | 27 | public function up() |
28 | 28 | { |
29 | - \Schema::create($this->table, function (Blueprint $table) { |
|
29 | + \Schema::create($this->table, function(Blueprint $table) { |
|
30 | 30 | $table->increments('meta_id'); |
31 | 31 | $table->string('meta_key'); |
32 | 32 | $table->longText('meta_value'); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | */ |
16 | 16 | public function getAttribute() |
17 | 17 | { |
18 | - return function ($next, $value, $args) { |
|
18 | + return function($next, $value, $args) { |
|
19 | 19 | $key = $args->get('key'); |
20 | 20 | |
21 | 21 | if ($this->hasGetterMutator($key)) { |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | public function setAttribute() |
35 | 35 | { |
36 | - return function ($next, $value, $args) { |
|
36 | + return function($next, $value, $args) { |
|
37 | 37 | $key = $args->get('key'); |
38 | 38 | |
39 | 39 | if ($this->hasSetterMutator($key)) { |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function toArray() |
53 | 53 | { |
54 | - return function ($next, $attributes) { |
|
54 | + return function($next, $attributes) { |
|
55 | 55 | $attributes = $this->mutableAttributesToArray($attributes); |
56 | 56 | |
57 | 57 | return $next($attributes); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public function getQualifiedNames() |
52 | 52 | { |
53 | - return array_map(function ($column) { |
|
53 | + return array_map(function($column) { |
|
54 | 54 | return $column->getQualifiedName(); |
55 | 55 | }, $this->columns); |
56 | 56 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function getTables() |
64 | 64 | { |
65 | - return array_unique(array_map(function ($column) { |
|
65 | + return array_unique(array_map(function($column) { |
|
66 | 66 | return $column->getTable(); |
67 | 67 | }, $this->columns)); |
68 | 68 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | public function getMappings() |
92 | 92 | { |
93 | - return array_map(function ($column) { |
|
93 | + return array_map(function($column) { |
|
94 | 94 | return $column->getMapping(); |
95 | 95 | }, $this->columns); |
96 | 96 | } |
@@ -117,7 +117,7 @@ |
||
117 | 117 | { |
118 | 118 | $token = $this->wildcard; |
119 | 119 | |
120 | - return array_map(function ($word) use ($token) { |
|
120 | + return array_map(function($word) use ($token) { |
|
121 | 121 | return preg_replace('/\*+/', '*', "{$token}{$word}{$token}"); |
122 | 122 | }, $words); |
123 | 123 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | protected function registerMutator() |
41 | 41 | { |
42 | - $this->app->singleton('eloquence.mutator', function () { |
|
42 | + $this->app->singleton('eloquence.mutator', function() { |
|
43 | 43 | return new Mutator; |
44 | 44 | }); |
45 | 45 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | protected function registerJoiner() |
55 | 55 | { |
56 | - $this->app->singleton('eloquence.joiner', function () { |
|
56 | + $this->app->singleton('eloquence.joiner', function() { |
|
57 | 57 | return new JoinerFactory; |
58 | 58 | }); |
59 | 59 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | protected function registerParser() |
69 | 69 | { |
70 | - $this->app->singleton('eloquence.parser', function () { |
|
70 | + $this->app->singleton('eloquence.parser', function() { |
|
71 | 71 | return new ParserFactory; |
72 | 72 | }); |
73 | 73 |
@@ -129,7 +129,7 @@ |
||
129 | 129 | */ |
130 | 130 | public function toArray() |
131 | 131 | { |
132 | - return array_filter(array_map(function ($attribute) { |
|
132 | + return array_filter(array_map(function($attribute) { |
|
133 | 133 | return $attribute->getValue(); |
134 | 134 | }, $this->items)); |
135 | 135 | } |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | protected function mappedSelectListsKey(Builder $query, $key) |
216 | 216 | { |
217 | 217 | if ($this->hasColumn($key)) { |
218 | - return $query->addSelect($this->getTable() . '.' . $key); |
|
218 | + return $query->addSelect($this->getTable().'.'.$key); |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | return $query->addSelect($key); |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | if (!$this->alreadyJoined($query, $table)) { |
262 | 262 | list($fk, $pk) = $this->getJoinKeys($relation); |
263 | 263 | |
264 | - $query->leftJoin($table, function ($join) use ($fk, $pk, $relation, $parent, $related) { |
|
264 | + $query->leftJoin($table, function($join) use ($fk, $pk, $relation, $parent, $related) { |
|
265 | 265 | $join->on($fk, '=', $pk); |
266 | 266 | |
267 | 267 | if ($relation instanceof MorphOne || $relation instanceof MorphTo) { |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | */ |
362 | 362 | protected function getMappedWhereConstraint($method, ArgumentBag $args) |
363 | 363 | { |
364 | - return function ($query) use ($method, $args) { |
|
364 | + return function($query) use ($method, $args) { |
|
365 | 365 | call_user_func_array([$query, $method], $args->all()); |
366 | 366 | }; |
367 | 367 | } |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | ? array_sum($columns->getWeights()) / 4 |
106 | 106 | : (float) $threshold; |
107 | 107 | |
108 | - $subquery->select($this->model->getTable() . '.*') |
|
108 | + $subquery->select($this->model->getTable().'.*') |
|
109 | 109 | ->from($this->model->getTable()) |
110 | 110 | ->groupBy($this->model->getQualifiedKeyName()); |
111 | 111 | |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | if (in_array($type, $typesToMove) && $this->model->hasColumn($where['column'])) { |
237 | 237 | unset($this->query->wheres[$key]); |
238 | 238 | |
239 | - $where['column'] = $this->model->getTable() . '.' . $where['column']; |
|
239 | + $where['column'] = $this->model->getTable().'.'.$where['column']; |
|
240 | 240 | |
241 | 241 | $subquery->getQuery()->wheres[] = $where; |
242 | 242 | |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | protected function countBindings(array $where, $type) |
268 | 268 | { |
269 | 269 | if ($this->isHasWhere($where, $type)) { |
270 | - return substr_count($where['column'] . $where['value'], '?'); |
|
270 | + return substr_count($where['column'].$where['value'], '?'); |
|
271 | 271 | |
272 | 272 | } elseif ($type === 'basic') { |
273 | 273 | return (int) !$where['value'] instanceof Expression; |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | |
321 | 321 | $operator = $this->getLikeOperator(); |
322 | 322 | |
323 | - $bindings['select'] = $bindings['where'] = array_map(function ($word) { |
|
323 | + $bindings['select'] = $bindings['where'] = array_map(function($word) { |
|
324 | 324 | return $this->caseBinding($word); |
325 | 325 | }, $words); |
326 | 326 | |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | foreach ($words as $key => $word) { |
333 | 333 | if ($this->isLeftMatching($word)) { |
334 | 334 | $leftMatching[] = sprintf('%s %s ?', $column->getWrapped(), $operator); |
335 | - $bindings['select'][] = $bindings['where'][$key] = $this->caseBinding($word) . '%'; |
|
335 | + $bindings['select'][] = $bindings['where'][$key] = $this->caseBinding($word).'%'; |
|
336 | 336 | } |
337 | 337 | } |
338 | 338 | |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | foreach ($words as $key => $word) { |
348 | 348 | if ($this->isWildcard($word)) { |
349 | 349 | $wildcards[] = sprintf('%s %s ?', $column->getWrapped(), $operator); |
350 | - $bindings['select'][] = $bindings['where'][$key] = '%'.$this->caseBinding($word) . '%'; |
|
350 | + $bindings['select'][] = $bindings['where'][$key] = '%'.$this->caseBinding($word).'%'; |
|
351 | 351 | } |
352 | 352 | } |
353 | 353 | |
@@ -476,12 +476,12 @@ discard block |
||
476 | 476 | public function prefixColumnsForJoin() |
477 | 477 | { |
478 | 478 | if (!$columns = $this->query->columns) { |
479 | - return $this->select($this->model->getTable() . '.*'); |
|
479 | + return $this->select($this->model->getTable().'.*'); |
|
480 | 480 | } |
481 | 481 | |
482 | 482 | foreach ($columns as $key => $column) { |
483 | 483 | if ($this->model->hasColumn($column)) { |
484 | - $columns[$key] = $this->model->getTable() . '.' . $column; |
|
484 | + $columns[$key] = $this->model->getTable().'.'.$column; |
|
485 | 485 | } |
486 | 486 | } |
487 | 487 |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | */ |
18 | 18 | public function getAttribute() |
19 | 19 | { |
20 | - return function ($next, $value, $args) { |
|
20 | + return function($next, $value, $args) { |
|
21 | 21 | $key = $args->get('key'); |
22 | 22 | |
23 | 23 | if (is_null($value)) { |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function setAttribute() |
37 | 37 | { |
38 | - return function ($next, $value, $args) { |
|
38 | + return function($next, $value, $args) { |
|
39 | 39 | $key = $args->get('key'); |
40 | 40 | |
41 | 41 | if (!$this->hasColumn($key) && $this->allowsMeta($key) && !$this->hasSetMutator($key)) { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function toArray() |
55 | 55 | { |
56 | - return function ($next, $attributes) { |
|
56 | + return function($next, $attributes) { |
|
57 | 57 | unset($attributes['meta_attributes'], $attributes['metaAttributes']); |
58 | 58 | |
59 | 59 | $attributes = array_merge($attributes, $this->getMetaAttributesArray()); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | public function replicate() |
71 | 71 | { |
72 | - return function ($next, $copy, $args) { |
|
72 | + return function($next, $copy, $args) { |
|
73 | 73 | $metaAttributes = $args->get('original') |
74 | 74 | ->getMetaAttributes() |
75 | 75 | ->replicate($args->get('except')); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | */ |
88 | 88 | public function save() |
89 | 89 | { |
90 | - return function ($next, $value, $args) { |
|
90 | + return function($next, $value, $args) { |
|
91 | 91 | $this->saveMeta(); |
92 | 92 | |
93 | 93 | return $next($value, $args); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | */ |
102 | 102 | public function __issetHook() |
103 | 103 | { |
104 | - return function ($next, $isset, $args) { |
|
104 | + return function($next, $isset, $args) { |
|
105 | 105 | $key = $args->get('key'); |
106 | 106 | |
107 | 107 | if (!$isset) { |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | public function __unsetHook() |
121 | 121 | { |
122 | - return function ($next, $value, $args) { |
|
122 | + return function($next, $value, $args) { |
|
123 | 123 | $key = $args->get('key'); |
124 | 124 | |
125 | 125 | if ($this->hasMeta($key)) { |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | */ |
138 | 138 | public function queryHook() |
139 | 139 | { |
140 | - return function ($next, $query, $bag) { |
|
140 | + return function($next, $query, $bag) { |
|
141 | 141 | $method = $bag->get('method'); |
142 | 142 | $args = $bag->get('args'); |
143 | 143 | $column = $args->get('column'); |