@@ -15,7 +15,7 @@ discard block |
||
| 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 |
||
| 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,7 +56,7 @@ discard block |
||
| 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 | |
@@ -72,11 +72,11 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | public function first($columns = ["*"]) |
| 74 | 74 | { |
| 75 | - if (! $this->isCachable()) { |
|
| 75 | + if (!$this->isCachable()) { |
|
| 76 | 76 | return parent::first($columns); |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | - if (! is_array($columns)) { |
|
| 79 | + if (!is_array($columns)) { |
|
| 80 | 80 | $columns = [$columns]; |
| 81 | 81 | } |
| 82 | 82 | |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | public function get($columns = ["*"]) |
| 97 | 97 | { |
| 98 | - if (! $this->isCachable()) { |
|
| 98 | + if (!$this->isCachable()) { |
|
| 99 | 99 | return parent::get($columns); |
| 100 | 100 | } |
| 101 | 101 | |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | |
| 129 | 129 | public function max($column) |
| 130 | 130 | { |
| 131 | - if (! $this->isCachable()) { |
|
| 131 | + if (!$this->isCachable()) { |
|
| 132 | 132 | return parent::max($column); |
| 133 | 133 | } |
| 134 | 134 | |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | |
| 140 | 140 | public function min($column) |
| 141 | 141 | { |
| 142 | - if (! $this->isCachable()) { |
|
| 142 | + if (!$this->isCachable()) { |
|
| 143 | 143 | return parent::min($column); |
| 144 | 144 | } |
| 145 | 145 | |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | $pageName = "page", |
| 155 | 155 | $page = null |
| 156 | 156 | ) { |
| 157 | - if (! $this->isCachable()) { |
|
| 157 | + if (!$this->isCachable()) { |
|
| 158 | 158 | return parent::paginate($perPage, $columns, $pageName, $page); |
| 159 | 159 | } |
| 160 | 160 | |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | { |
| 175 | 175 | $relation = parent::getRelation($name); |
| 176 | 176 | |
| 177 | - if (! $this->isCachable() |
|
| 177 | + if (!$this->isCachable() |
|
| 178 | 178 | && is_a($relation->getQuery(), self::class) |
| 179 | 179 | ) { |
| 180 | 180 | $relation->getQuery()->disableModelCaching(); |
@@ -189,12 +189,12 @@ discard block |
||
| 189 | 189 | |
| 190 | 190 | foreach ($items as $key => $value) { |
| 191 | 191 | if (is_array($value)) { |
| 192 | - $result .= $key . $glue . $this->recursiveImplodeWithKey($value, $glue); |
|
| 192 | + $result .= $key.$glue.$this->recursiveImplodeWithKey($value, $glue); |
|
| 193 | 193 | |
| 194 | 194 | continue; |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | - $result .= $glue . $key . $glue . $value; |
|
| 197 | + $result .= $glue.$key.$glue.$value; |
|
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | return $result; |
@@ -202,11 +202,11 @@ discard block |
||
| 202 | 202 | |
| 203 | 203 | public function pluck($column, $key = null) |
| 204 | 204 | { |
| 205 | - if (! $this->isCachable()) { |
|
| 205 | + if (!$this->isCachable()) { |
|
| 206 | 206 | return parent::pluck($column, $key); |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | - $keyDifferentiator = "-pluck_{$column}" . ($key ? "_{$key}" : ""); |
|
| 209 | + $keyDifferentiator = "-pluck_{$column}".($key ? "_{$key}" : ""); |
|
| 210 | 210 | $cacheKey = $this->makeCacheKey([$column], null, $keyDifferentiator); |
| 211 | 211 | |
| 212 | 212 | return $this->cachedValue(func_get_args(), $cacheKey); |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | |
| 215 | 215 | public function sum($column) |
| 216 | 216 | { |
| 217 | - if (! $this->isCachable()) { |
|
| 217 | + if (!$this->isCachable()) { |
|
| 218 | 218 | return parent::sum($column); |
| 219 | 219 | } |
| 220 | 220 | |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | |
| 233 | 233 | public function value($column) |
| 234 | 234 | { |
| 235 | - if (! $this->isCachable()) { |
|
| 235 | + if (!$this->isCachable()) { |
|
| 236 | 236 | return parent::value($column); |
| 237 | 237 | } |
| 238 | 238 | |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | return $this->cache($cacheTags) |
| 302 | 302 | ->rememberForever( |
| 303 | 303 | $hashedCacheKey, |
| 304 | - function () use ($arguments, $cacheKey, $method) { |
|
| 304 | + function() use ($arguments, $cacheKey, $method) { |
|
| 305 | 305 | return [ |
| 306 | 306 | "key" => $cacheKey, |
| 307 | 307 | "value" => parent::{$method}(...$arguments), |