Completed
Pull Request — 5.1 (#45)
by
unknown
04:59
created
src/Builder.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -473,7 +473,7 @@
 block discarded – undo
473 473
     /**
474 474
      * Prefix selected columns with table name in order to avoid collisions.
475 475
      *
476
-     * @return void
476
+     * @return Builder|null
477 477
      */
478 478
     public function prefixColumnsForJoin()
479 479
     {
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Sofa\Eloquence;
4 4
 
5
-use Closure;
6
-use InvalidArgumentException;
7 5
 use Sofa\Eloquence\Searchable\Column;
8 6
 use Illuminate\Database\Query\Expression;
9 7
 use Sofa\Hookable\Builder as HookableBuilder;
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,8 +108,8 @@
 block discarded – undo
108 108
                         : (float) $threshold ;
109 109
 
110 110
         $subquery->select($this->model->getTable().'.*')
111
-                 ->from($this->model->getTable())
112
-                 ->groupBy($this->model->getQualifiedKeyName());
111
+                    ->from($this->model->getTable())
112
+                    ->groupBy($this->model->getQualifiedKeyName());
113 113
 
114 114
         $this->addSearchClauses($subquery, $columns, $words, $threshold);
115 115
 
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
 
106 106
         $threshold = (is_null($threshold))
107 107
                         ? array_sum($columns->getWeights()) / 4
108
-                        : (float) $threshold ;
108
+                        : (float) $threshold;
109 109
 
110
-        $subquery->select($this->model->getTable().'.*')
110
+        $subquery->select($this->model->getTable() . '.*')
111 111
                  ->from($this->model->getTable())
112 112
                  ->groupBy($this->model->getQualifiedKeyName());
113 113
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         $whereBindings = $this->searchSelect($subquery, $columns, $words, $threshold);
135 135
 
136 136
         // For morphOne/morphMany support we need to port the bindings from JoinClauses.
137
-        $joinBindings = array_flatten(array_pluck((array)$subquery->getQuery()->joins, 'bindings'));
137
+        $joinBindings = array_flatten(array_pluck((array) $subquery->getQuery()->joins, 'bindings'));
138 138
 
139 139
         $this->addBinding($joinBindings, 'select');
140 140
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
             if (in_array($type, $typesToMove) && $this->model->hasColumn($where['column'])) {
239 239
                 unset($this->query->wheres[$key]);
240 240
 
241
-                $where['column'] = $this->model->getTable().'.'.$where['column'];
241
+                $where['column'] = $this->model->getTable() . '.' . $where['column'];
242 242
 
243 243
                 $subquery->getQuery()->wheres[] = $where;
244 244
 
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
     protected function countBindings(array $where, $type)
270 270
     {
271 271
         if ($this->isHasWhere($where, $type)) {
272
-            return substr_count($where['column'].$where['value'], '?');
272
+            return substr_count($where['column'] . $where['value'], '?');
273 273
 
274 274
         } elseif ($type === 'basic') {
275 275
             return (int) !$where['value'] instanceof Expression;
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 
323 323
         $operator = $this->getLikeOperator();
324 324
 
325
-        $bindings['select'] = $bindings['where'] = array_map(function ($word) {
325
+        $bindings['select'] = $bindings['where'] = array_map(function($word) {
326 326
             return $this->caseBinding($word);
327 327
         }, $words);
328 328
 
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
             foreach ($words as $key => $word) {
335 335
                 if ($this->isLeftMatching($word)) {
336 336
                     $leftMatching[] = sprintf('%s %s ?', $column->getWrapped(), $operator);
337
-                    $bindings['select'][] = $bindings['where'][$key] = $this->caseBinding($word).'%';
337
+                    $bindings['select'][] = $bindings['where'][$key] = $this->caseBinding($word) . '%';
338 338
                 }
339 339
             }
340 340
 
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
             foreach ($words as $key => $word) {
350 350
                 if ($this->isWildcard($word)) {
351 351
                     $wildcards[] = sprintf('%s %s ?', $column->getWrapped(), $operator);
352
-                    $bindings['select'][] = $bindings['where'][$key] = '%'.$this->caseBinding($word).'%';
352
+                    $bindings['select'][] = $bindings['where'][$key] = '%' . $this->caseBinding($word) . '%';
353 353
                 }
354 354
             }
355 355
 
@@ -478,12 +478,12 @@  discard block
 block discarded – undo
478 478
     public function prefixColumnsForJoin()
479 479
     {
480 480
         if (!$columns = $this->query->columns) {
481
-            return $this->select($this->model->getTable().'.*');
481
+            return $this->select($this->model->getTable() . '.*');
482 482
         }
483 483
 
484 484
         foreach ($columns as $key => $column) {
485 485
             if ($this->model->hasColumn($column)) {
486
-                $columns[$key] = $this->model->getTable().'.'.$column;
486
+                $columns[$key] = $this->model->getTable() . '.' . $column;
487 487
             }
488 488
         }
489 489
 
Please login to merge, or discard this patch.
src/Eloquence.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      * Determine whether where should be treated as whereNull.
64 64
      *
65 65
      * @param  string $method
66
-     * @param  \Sofa\Eloquence\ArgumentBag $args
66
+     * @param  ArgumentBag $args
67 67
      * @return boolean
68 68
      */
69 69
     protected function isWhereNull($method, ArgumentBag $args)
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     /**
75 75
      * Determine whether where is a whereNull by the arguments passed to where method.
76 76
      *
77
-     * @param  \Sofa\Eloquence\ArgumentBag $args
77
+     * @param  ArgumentBag $args
78 78
      * @return boolean
79 79
      */
80 80
     protected function isWhereNullByArgs(ArgumentBag $args)
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
     {
128 128
         static::loadColumnListing();
129 129
 
130
-        return in_array((string)$key, static::$columnListing);
130
+        return in_array((string) $key, static::$columnListing);
131 131
     }
132 132
 
133 133
     /**
Please login to merge, or discard this patch.
src/Mappable.php 2 patches
Doc Comments   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      *
61 61
      * @param  \Sofa\Eloquence\Builder $query
62 62
      * @param  string $method
63
-     * @param  \Sofa\Eloquence\ArgumentBag $args
63
+     * @param  ArgumentBag $args
64 64
      * @return mixed
65 65
      */
66 66
     protected function mappedQuery(Builder $query, $method, ArgumentBag $args)
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      * Adjust mapped columns for select statement.
81 81
      *
82 82
      * @param  \Sofa\Eloquence\Builder $query
83
-     * @param  \Sofa\Eloquence\ArgumentBag $args
83
+     * @param  ArgumentBag $args
84 84
      * @return void
85 85
      */
86 86
     protected function mappedSelect(Builder $query, ArgumentBag $args)
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      *
123 123
      * @param  \Sofa\Eloquence\Builder $query
124 124
      * @param  string $method
125
-     * @param  \Sofa\Eloquence\ArgumentBag $args
125
+     * @param  ArgumentBag $args
126 126
      * @param  string $mapping
127 127
      * @return mixed
128 128
      */
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
      *
143 143
      * @param  \Sofa\Eloquence\Builder $query
144 144
      * @param  string $method
145
-     * @param  \Sofa\Eloquence\ArgumentBag $args
145
+     * @param  ArgumentBag $args
146 146
      * @param  string $target
147 147
      * @param  string $column
148 148
      * @return mixed
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
      * Order query by mapped attribute.
165 165
      *
166 166
      * @param  \Sofa\Eloquence\Builder $query
167
-     * @param  \Sofa\Eloquence\ArgumentBag $args
167
+     * @param  ArgumentBag $args
168 168
      * @param  string $table
169 169
      * @param  string $column
170 170
      * @param  string $target
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
      * Get an array with the values of given mapped attribute.
182 182
      *
183 183
      * @param  \Sofa\Eloquence\Builder $query
184
-     * @param  \Sofa\Eloquence\ArgumentBag $args
184
+     * @param  ArgumentBag $args
185 185
      * @param  string $table
186 186
      * @param  string $column
187 187
      * @return array
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
      *
329 329
      * @param  \Sofa\Eloquence\Builder $query
330 330
      * @param  string $method
331
-     * @param  \Sofa\Eloquence\ArgumentBag $args
331
+     * @param  ArgumentBag $args
332 332
      * @param  string $target
333 333
      * @param  string $column
334 334
      * @return \Sofa\Eloquence\Builder
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
      * Get the relation constraint closure.
351 351
      *
352 352
      * @param  string $method
353
-     * @param  \Sofa\Eloquence\ArgumentBag $args
353
+     * @param  ArgumentBag $args
354 354
      * @return \Closure
355 355
      */
356 356
     protected function getMappedWhereConstraint($method, ArgumentBag $args)
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
     /**
364 364
      * Get boolean called on the original method and set it to default.
365 365
      *
366
-     * @param  \Sofa\EloquenceArgumentBag $args
366
+     * @param  ArgumentBag $args
367 367
      * @return string
368 368
      */
369 369
     protected function getMappedBoolean(ArgumentBag $args)
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
      * Determine the operator for count relation query and set 'not' appropriately.
380 380
      *
381 381
      * @param  string $method
382
-     * @param  \Sofa\Eloquence\ArgumentBag $args
382
+     * @param  ArgumentBag $args
383 383
      * @return string
384 384
      */
385 385
     protected function getMappedOperator($method, ArgumentBag $args)
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
      *
485 485
      * @param  \Illuminate\Database\Eloquent\Model $target
486 486
      * @param  array  $segments
487
-     * @return mixed
487
+     * @return EloquentModel
488 488
      */
489 489
     protected function getTarget($target, array $segments)
490 490
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
     protected function mappedSelectListsKey(Builder $query, $key)
210 210
     {
211 211
         if ($this->hasColumn($key)) {
212
-            return $query->addSelect($this->getTable().'.'.$key);
212
+            return $query->addSelect($this->getTable() . '.' . $key);
213 213
         }
214 214
 
215 215
         return $query->addSelect($key);
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
         if (!$this->alreadyJoined($query, $table)) {
256 256
             list($fk, $pk) = $this->getJoinKeys($relation);
257 257
 
258
-            $query->leftJoin($table, function ($join) use ($fk, $pk, $relation, $parent, $related) {
258
+            $query->leftJoin($table, function($join) use ($fk, $pk, $relation, $parent, $related) {
259 259
                 $join->on($fk, '=', $pk);
260 260
 
261 261
                 if ($relation instanceof MorphOne || $relation instanceof MorphTo) {
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
      */
356 356
     protected function getMappedWhereConstraint($method, ArgumentBag $args)
357 357
     {
358
-        return function ($query) use ($method, $args) {
358
+        return function($query) use ($method, $args) {
359 359
             call_user_func_array([$query, $method], $args->all());
360 360
         };
361 361
     }
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
             $this->parseMappings();
432 432
         }
433 433
 
434
-        return array_key_exists((string)$key, static::$mappedAttributes);
434
+        return array_key_exists((string) $key, static::$mappedAttributes);
435 435
     }
436 436
 
437 437
     /**
Please login to merge, or discard this patch.
src/Metable.php 2 patches
Doc Comments   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      *
65 65
      * @param  \Sofa\Eloquence\Builder $query
66 66
      * @param  string $method
67
-     * @param  \Sofa\Eloquence\ArgumentBag $args
67
+     * @param  ArgumentBag $args
68 68
      * @return mixed
69 69
      */
70 70
     protected function metaQuery(Builder $query, $method, ArgumentBag $args)
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      * Adjust meta columns for select statement.
81 81
      *
82 82
      * @param  \Sofa\Eloquence\Builder $query
83
-     * @param  \Sofa\Eloquence\ArgumentBag $args
83
+     * @param  ArgumentBag $args
84 84
      * @return void
85 85
      */
86 86
     protected function metaSelect(Builder $query, ArgumentBag $args)
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      *
114 114
      * @param  \Sofa\Eloquence\Builder $query
115 115
      * @param  string $method
116
-     * @param  \Sofa\Eloquence\ArgumentBag $args
116
+     * @param  ArgumentBag $args
117 117
      * @return mixed
118 118
      */
119 119
     protected function metaJoinQuery(Builder $query, $method, ArgumentBag $args)
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      * Get an array with the values of given meta attribute.
149 149
      *
150 150
      * @param  \Sofa\Eloquence\Builder $query
151
-     * @param  \Sofa\Eloquence\ArgumentBag $args
151
+     * @param  ArgumentBag $args
152 152
      * @param  string $alias
153 153
      * @return array
154 154
      */
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
      *
239 239
      * @param  \Sofa\Eloquence\Builder $query
240 240
      * @param  string $method
241
-     * @param  \Sofa\Eloquence\ArgumentBag $args
241
+     * @param  ArgumentBag $args
242 242
      * @return \Sofa\Eloquence\Builder
243 243
      */
244 244
     protected function metaHasQuery(Builder $query, $method, ArgumentBag $args)
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     /**
260 260
      * Get boolean called on the original method and set it to default.
261 261
      *
262
-     * @param  \Sofa\EloquenceArgumentBag $args
262
+     * @param  ArgumentBag $args
263 263
      * @return string
264 264
      */
265 265
     protected function getMetaBoolean(ArgumentBag $args)
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
      * Determine the operator for count relation query.
276 276
      *
277 277
      * @param  string $method
278
-     * @param  \Sofa\Eloquence\ArgumentBag $args
278
+     * @param  ArgumentBag $args
279 279
      * @return string
280 280
      */
281 281
     protected function getMetaOperator($method, ArgumentBag $args)
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
      * Integers and floats must be passed in raw form in order to avoid string
292 292
      * comparison, due to the fact that all meta values are stored as strings.
293 293
      *
294
-     * @param  \Sofa\Eloquence\ArgumentBag $args
294
+     * @param  ArgumentBag $args
295 295
      * @return void
296 296
      */
297 297
     protected function unbindNumerics(ArgumentBag $args)
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
      * Get the relation constraint closure.
314 314
      *
315 315
      * @param  string $method
316
-     * @param  \Sofa\Eloquence\ArgumentBag $args
316
+     * @param  ArgumentBag $args
317 317
      * @return \Closure
318 318
      */
319 319
     protected function getMetaWhereConstraint($method, ArgumentBag $args)
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
         if (strpos($key, '.') !== false) {
178 178
             return $query->addSelect($key);
179 179
         } elseif ($this->hasColumn($key)) {
180
-            return $query->addSelect($this->getTable().'.'.$key);
180
+            return $query->addSelect($this->getTable() . '.' . $key);
181 181
         }
182 182
 
183 183
         $alias = $this->joinMeta($query, $key);
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 
215 215
         $table = (new Attribute)->getTable();
216 216
 
217
-        $query->leftJoin("{$table} as {$alias}", function ($join) use ($alias, $column) {
217
+        $query->leftJoin("{$table} as {$alias}", function($join) use ($alias, $column) {
218 218
             $join->on("{$alias}.metable_id", '=', $this->getQualifiedKeyName())
219 219
                 ->where("{$alias}.metable_type", '=', $this->getMorphClass())
220 220
                 ->where("{$alias}.meta_key", '=', $column);
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
      */
231 231
     protected function generateMetaAlias()
232 232
     {
233
-        return md5(microtime(true)).'_meta_alias';
233
+        return md5(microtime(true)) . '_meta_alias';
234 234
     }
235 235
 
236 236
     /**
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
             return $this->getMetaBetweenConstraint($column, $args->get('values'));
327 327
         }
328 328
 
329
-        return function ($query) use ($column, $method, $args) {
329
+        return function($query) use ($column, $method, $args) {
330 330
             $query->where('meta_key', $column);
331 331
 
332 332
             if ($args->get('value') || $args->get('values')) {
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
         $min = $values[0];
348 348
         $max = $values[1];
349 349
 
350
-        return function ($query) use ($column, $min, $max) {
350
+        return function($query) use ($column, $min, $max) {
351 351
             $query->where('meta_key', $column)
352 352
                 ->where('meta_value', '>=', $min)
353 353
                 ->where('meta_value', '<=', $max);
Please login to merge, or discard this patch.
src/Mutator/Mutator.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,6 @@
 block discarded – undo
16 16
      * Mutate value using provided methods.
17 17
      *
18 18
      * @param  mixed $value
19
-     * @param  string|array $mutators
20 19
      * @return mixed
21 20
      *
22 21
      * @throws \LogicException
Please login to merge, or discard this patch.
src/Validable.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -264,7 +264,7 @@
 block discarded – undo
264 264
     /**
265 265
      * Get all validation rules for update for given id.
266 266
      *
267
-     * @param  \Illuminate\Database\Eloquent\Model|string $id
267
+     * @param  Validable $id
268 268
      * @return array
269 269
      */
270 270
     public static function getUpdateRulesForId($id)
Please login to merge, or discard this patch.
src/Metable/CreateMetaAttributesTable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.
src/Metable/Hooks.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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');
@@ -156,8 +156,8 @@  discard block
 block discarded – undo
156 156
 
157 157
     public function __call($method, $params)
158 158
     {
159
-        if (strpos($method, '__') === 0 && method_exists($this, $method.'Hook')) {
160
-            return call_user_func_array([$this, $method.'Hook'], $params);
159
+        if (strpos($method, '__') === 0 && method_exists($this, $method . 'Hook')) {
160
+            return call_user_func_array([$this, $method . 'Hook'], $params);
161 161
         }
162 162
 
163 163
         throw new BadMethodCallException("Method [{$method}] doesn't exist on this object.");
Please login to merge, or discard this patch.
src/Mutable/Hooks.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.