@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | */ |
20 | 20 | public function queryHook() |
21 | 21 | { |
22 | - return function ($next, $query, $bag) { |
|
22 | + return function($next, $query, $bag) { |
|
23 | 23 | $method = $bag->get('method'); |
24 | 24 | $args = $bag->get('args'); |
25 | 25 | $column = $args->get('column'); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public function save() |
47 | 47 | { |
48 | - return function ($next, $value, $args) { |
|
48 | + return function($next, $value, $args) { |
|
49 | 49 | $this->saveMapped(); |
50 | 50 | |
51 | 51 | return $next($value, $args); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function __issetHook() |
63 | 63 | { |
64 | - return function ($next, $isset, $args) { |
|
64 | + return function($next, $isset, $args) { |
|
65 | 65 | $key = $args->get('key'); |
66 | 66 | |
67 | 67 | if (!$isset && $this->hasMapping($key)) { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public function __unsetHook() |
83 | 83 | { |
84 | - return function ($next, $value, $args) { |
|
84 | + return function($next, $value, $args) { |
|
85 | 85 | $key = $args->get('key'); |
86 | 86 | |
87 | 87 | if ($this->hasMapping($key)) { |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | */ |
102 | 102 | public function getAttribute() |
103 | 103 | { |
104 | - return function ($next, $value, $args) { |
|
104 | + return function($next, $value, $args) { |
|
105 | 105 | $key = $args->get('key'); |
106 | 106 | |
107 | 107 | if ($this->hasMapping($key)) { |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | */ |
122 | 122 | public function setAttribute() |
123 | 123 | { |
124 | - return function ($next, $value, $args) { |
|
124 | + return function($next, $value, $args) { |
|
125 | 125 | $key = $args->get('key'); |
126 | 126 | |
127 | 127 | if ($this->hasMapping($key)) { |
@@ -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); |