Completed
Push — master ( 0e040f...7b3a4f )
by Mike
02:36 queued 10s
created
src/CachedBuilder.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
     public function avg($column)
17 17
     {
18
-        if (! $this->isCachable()) {
18
+        if (!$this->isCachable()) {
19 19
             return parent::avg($column);
20 20
         }
21 21
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
     public function count($columns = "*")
28 28
     {
29
-        if (! $this->isCachable()) {
29
+        if (!$this->isCachable()) {
30 30
             return parent::count($columns);
31 31
         }
32 32
 
@@ -56,20 +56,20 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function find($id, $columns = ["*"])
58 58
     {
59
-        if (! $this->isCachable()) {
59
+        if (!$this->isCachable()) {
60 60
             return parent::find($id, $columns);
61 61
         }
62 62
 
63 63
         $idKey = collect($id)->implode('-');
64 64
         $preStr = is_array($id) ? 'find-list' : 'find';
65
-        $cacheKey = $this->makeCacheKey($columns, null, "-" . $preStr . "_{$idKey}");
65
+        $cacheKey = $this->makeCacheKey($columns, null, "-".$preStr."_{$idKey}");
66 66
 
67 67
         return $this->cachedValue(func_get_args(), $cacheKey);
68 68
     }
69 69
 
70 70
     public function first($columns = ["*"])
71 71
     {
72
-        if (! $this->isCachable()) {
72
+        if (!$this->isCachable()) {
73 73
             return parent::first($columns);
74 74
         }
75 75
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
     public function get($columns = ["*"])
90 90
     {
91
-        if (! $this->isCachable()) {
91
+        if (!$this->isCachable()) {
92 92
             return parent::get($columns);
93 93
         }
94 94
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
     public function max($column)
123 123
     {
124
-        if (! $this->isCachable()) {
124
+        if (!$this->isCachable()) {
125 125
             return parent::max($column);
126 126
         }
127 127
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
     public function min($column)
134 134
     {
135
-        if (! $this->isCachable()) {
135
+        if (!$this->isCachable()) {
136 136
             return parent::min($column);
137 137
         }
138 138
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         $pageName = "page",
148 148
         $page = null
149 149
     ) {
150
-        if (! $this->isCachable()) {
150
+        if (!$this->isCachable()) {
151 151
             return parent::paginate($perPage, $columns, $pageName, $page);
152 152
         }
153 153
 
@@ -169,12 +169,12 @@  discard block
 block discarded – undo
169 169
 
170 170
         foreach ($items as $key => $value) {
171 171
             if (is_array($value)) {
172
-                $result .= $key . $glue . $this->recursiveImplodeWithKey($value, $glue);
172
+                $result .= $key.$glue.$this->recursiveImplodeWithKey($value, $glue);
173 173
 
174 174
                 continue;
175 175
             }
176 176
 
177
-            $result .= $glue . $key . $glue . $value;
177
+            $result .= $glue.$key.$glue.$value;
178 178
         }
179 179
 
180 180
         return $result;
@@ -182,11 +182,11 @@  discard block
 block discarded – undo
182 182
 
183 183
     public function pluck($column, $key = null)
184 184
     {
185
-        if (! $this->isCachable()) {
185
+        if (!$this->isCachable()) {
186 186
             return parent::pluck($column, $key);
187 187
         }
188 188
 
189
-        $keyDifferentiator = "-pluck_{$column}" . ($key ? "_{$key}" : "");
189
+        $keyDifferentiator = "-pluck_{$column}".($key ? "_{$key}" : "");
190 190
         $cacheKey = $this->makeCacheKey([$column], null, $keyDifferentiator);
191 191
 
192 192
         return $this->cachedValue(func_get_args(), $cacheKey);
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 
195 195
     public function sum($column)
196 196
     {
197
-        if (! $this->isCachable()) {
197
+        if (!$this->isCachable()) {
198 198
             return parent::sum($column);
199 199
         }
200 200
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 
213 213
     public function value($column)
214 214
     {
215
-        if (! $this->isCachable()) {
215
+        if (!$this->isCachable()) {
216 216
             return parent::value($column);
217 217
         }
218 218
 
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
         return $this->cache($cacheTags)
282 282
             ->rememberForever(
283 283
                 $hashedCacheKey,
284
-                function () use ($arguments, $cacheKey, $method) {
284
+                function() use ($arguments, $cacheKey, $method) {
285 285
                     return [
286 286
                         "key" => $cacheKey,
287 287
                         "value" => parent::{$method}(...$arguments),
Please login to merge, or discard this patch.