Completed
Push — 5.2 ( 91d1dc...7d5294 )
by Jarek
02:31
created
src/Metable/Hooks.php 1 patch
Spacing   +8 added lines, -8 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');
Please login to merge, or discard this patch.
src/helpers.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@
 block discarded – undo
27 27
         // We want to update each unique rule so it ignores this model's row
28 28
         // during unique check in order to avoid faulty non-unique errors
29 29
         // in accordance to the linked Laravel Validator documentation.
30
-        array_walk($rules, function (&$fieldRules, $field) use ($id, $primaryKey) {
30
+        array_walk($rules, function(&$fieldRules, $field) use ($id, $primaryKey) {
31 31
             if (is_string($fieldRules)) {
32 32
                 $fieldRules = explode('|', $fieldRules);
33 33
             }
34 34
 
35
-            array_walk($fieldRules, function (&$rule) use ($field, $id, $primaryKey) {
35
+            array_walk($fieldRules, function(&$rule) use ($field, $id, $primaryKey) {
36 36
                 if (strpos($rule, 'unique') === false) {
37 37
                     return;
38 38
                 }
Please login to merge, or discard this patch.
src/Mappable/Hooks.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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)) {
Please login to merge, or discard this patch.
src/Builder.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,8 +119,8 @@
 block discarded – undo
119 119
         }
120 120
 
121 121
         $subquery->select($this->model->getTable() . '.*')
122
-                 ->from($this->model->getTable())
123
-                 ->groupBy($groupByColumns);
122
+                    ->from($this->model->getTable())
123
+                    ->groupBy($groupByColumns);
124 124
 
125 125
         $this->addSearchClauses($subquery, $columns, $words, $threshold);
126 126
 
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -112,13 +112,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.