Test Failed
Push — master ( dc6805...d418fd )
by Mike
08:18
created
src/CacheKey.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     {
15 15
         return "genealabs:laravel-model-caching:"
16 16
             . (config('laravel-model-caching.cache-prefix')
17
-                ? config('laravel-model-caching.cache-prefix', '') . ":"
17
+                ? config('laravel-model-caching.cache-prefix', '').":"
18 18
                 : "");
19 19
     }
20 20
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
     protected function getLimitClause() : string
56 56
     {
57
-        if (! $this->query->limit) {
57
+        if (!$this->query->limit) {
58 58
             return '';
59 59
         }
60 60
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
     protected function getOffsetClause() : string
70 70
     {
71
-        if (! $this->query->offset) {
71
+        if (!$this->query->offset) {
72 72
             return '';
73 73
         }
74 74
 
@@ -80,12 +80,12 @@  discard block
 block discarded – undo
80 80
         $orders = collect($this->query->orders);
81 81
 
82 82
         return $orders
83
-            ->reduce(function ($carry, $order) {
83
+            ->reduce(function($carry, $order) {
84 84
                 if (($order['type'] ?? '') === 'Raw') {
85
-                    return $carry . '_orderByRaw_' . str_slug($order['sql']);
85
+                    return $carry.'_orderByRaw_'.str_slug($order['sql']);
86 86
                 }
87 87
 
88
-                return $carry . '_orderBy_' . $order['column'] . '_' . $order['direction'];
88
+                return $carry.'_orderBy_'.$order['column'].'_'.$order['direction'];
89 89
             })
90 90
             ?: '';
91 91
     }
@@ -96,12 +96,12 @@  discard block
 block discarded – undo
96 96
             return '';
97 97
         }
98 98
 
99
-        return '_' . implode('_', $columns);
99
+        return '_'.implode('_', $columns);
100 100
     }
101 101
 
102 102
     protected function getTypeClause($where) : string
103 103
     {
104
-        $type =in_array($where['type'], ['In', 'NotIn', 'Null', 'NotNull', 'between'])
104
+        $type = in_array($where['type'], ['In', 'NotIn', 'Null', 'NotNull', 'between'])
105 105
             ? strtolower($where['type'])
106 106
             : strtolower($where['operator']);
107 107
 
@@ -118,17 +118,17 @@  discard block
 block discarded – undo
118 118
             ? implode('_', $where['values'])
119 119
             : '';
120 120
 
121
-        if (! $values && $this->query->bindings['where'] ?? false) {
121
+        if (!$values && $this->query->bindings['where'] ?? false) {
122 122
             $values = implode('_', $this->query->bindings['where']);
123 123
         }
124 124
 
125
-        return '_' . $values;
125
+        return '_'.$values;
126 126
     }
127 127
 
128 128
     protected function getWhereClauses(array $wheres = []) : string
129 129
     {
130 130
         return $this->getWheres($wheres)
131
-            ->reduce(function ($carry, $where) {
131
+            ->reduce(function($carry, $where) {
132 132
                 $value = $this->getNestedClauses($where);
133 133
                 $value .= $this->getColumnClauses($where);
134 134
                 $value .= $this->getRawClauses($where);
@@ -141,11 +141,11 @@  discard block
 block discarded – undo
141 141
 
142 142
     protected function getNestedClauses(array $where) : string
143 143
     {
144
-        if (! in_array($where['type'], ['Exists', 'Nested', 'NotExists'])) {
144
+        if (!in_array($where['type'], ['Exists', 'Nested', 'NotExists'])) {
145 145
             return '';
146 146
         }
147 147
 
148
-        return '_' . strtolower($where['type']) . $this->getWhereClauses($where['query']->wheres);
148
+        return '_'.strtolower($where['type']).$this->getWhereClauses($where['query']->wheres);
149 149
     }
150 150
 
151 151
     protected function getColumnClauses(array $where) : string
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
             return '';
164 164
         }
165 165
 
166
-        return "_{$where['boolean']}_" . str_slug($where['sql']);
166
+        return "_{$where['boolean']}_".str_slug($where['sql']);
167 167
     }
168 168
 
169 169
     protected function getOtherClauses(array $where, string $carry = null) : string
@@ -197,6 +197,6 @@  discard block
 block discarded – undo
197 197
             return '';
198 198
         }
199 199
 
200
-        return '-' . implode('-', $eagerLoads->keys()->toArray());
200
+        return '-'.implode('-', $eagerLoads->keys()->toArray());
201 201
     }
202 202
 }
Please login to merge, or discard this patch.
src/CacheTags.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     {
20 20
         return "genealabs:laravel-model-caching:"
21 21
             . (config('laravel-model-caching.cache-prefix')
22
-                ? config('laravel-model-caching.cache-prefix', '') . ":"
22
+                ? config('laravel-model-caching.cache-prefix', '').":"
23 23
                 : "");
24 24
     }
25 25
 
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
     {
28 28
         $tags = collect($this->eagerLoad)
29 29
             ->keys()
30
-            ->map(function ($relationName) {
30
+            ->map(function($relationName) {
31 31
                 $relation = collect(explode('.', $relationName))
32
-                    ->reduce(function ($carry, $name) {
33
-                        if (! $carry) {
32
+                    ->reduce(function($carry, $name) {
33
+                        if (!$carry) {
34 34
                             $carry = $this->model;
35 35
                         }
36 36
 
Please login to merge, or discard this patch.