@@ -17,7 +17,7 @@ |
||
| 17 | 17 | { |
| 18 | 18 | $relation = parent::getRelation($name); |
| 19 | 19 | |
| 20 | - if (! $this->isCachable() |
|
| 20 | + if (!$this->isCachable() |
|
| 21 | 21 | && is_a($relation->getQuery(), self::class) |
| 22 | 22 | ) { |
| 23 | 23 | $relation->getQuery()->disableModelCaching(); |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | { |
| 8 | 8 | public function avg($column) |
| 9 | 9 | { |
| 10 | - if (! $this->isCachable()) { |
|
| 10 | + if (!$this->isCachable()) { |
|
| 11 | 11 | return parent::avg($column); |
| 12 | 12 | } |
| 13 | 13 | |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | public function count($columns = "*") |
| 20 | 20 | { |
| 21 | - if (! $this->isCachable()) { |
|
| 21 | + if (!$this->isCachable()) { |
|
| 22 | 22 | return parent::count($columns); |
| 23 | 23 | } |
| 24 | 24 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | public function find($id, $columns = ["*"]) |
| 50 | 50 | { |
| 51 | - if (! $this->isCachable()) { |
|
| 51 | + if (!$this->isCachable()) { |
|
| 52 | 52 | return parent::find($id, $columns); |
| 53 | 53 | } |
| 54 | 54 | |
@@ -64,11 +64,11 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | public function first($columns = ["*"]) |
| 66 | 66 | { |
| 67 | - if (! $this->isCachable()) { |
|
| 67 | + if (!$this->isCachable()) { |
|
| 68 | 68 | return parent::first($columns); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - if (! is_array($columns)) { |
|
| 71 | + if (!is_array($columns)) { |
|
| 72 | 72 | $columns = [$columns]; |
| 73 | 73 | } |
| 74 | 74 | |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | public function get($columns = ["*"]) |
| 89 | 89 | { |
| 90 | - if (! $this->isCachable()) { |
|
| 90 | + if (!$this->isCachable()) { |
|
| 91 | 91 | return parent::get($columns); |
| 92 | 92 | } |
| 93 | 93 | |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | |
| 121 | 121 | public function max($column) |
| 122 | 122 | { |
| 123 | - if (! $this->isCachable()) { |
|
| 123 | + if (!$this->isCachable()) { |
|
| 124 | 124 | return parent::max($column); |
| 125 | 125 | } |
| 126 | 126 | |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | |
| 132 | 132 | public function min($column) |
| 133 | 133 | { |
| 134 | - if (! $this->isCachable()) { |
|
| 134 | + if (!$this->isCachable()) { |
|
| 135 | 135 | return parent::min($column); |
| 136 | 136 | } |
| 137 | 137 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $pageName = "page", |
| 147 | 147 | $page = null |
| 148 | 148 | ) { |
| 149 | - if (! $this->isCachable()) { |
|
| 149 | + if (!$this->isCachable()) { |
|
| 150 | 150 | return parent::paginate($perPage, $columns, $pageName, $page); |
| 151 | 151 | } |
| 152 | 152 | |
@@ -168,12 +168,12 @@ discard block |
||
| 168 | 168 | |
| 169 | 169 | foreach ($items as $key => $value) { |
| 170 | 170 | if (is_array($value)) { |
| 171 | - $result .= $key . $glue . $this->recursiveImplodeWithKey($value, $glue); |
|
| 171 | + $result .= $key.$glue.$this->recursiveImplodeWithKey($value, $glue); |
|
| 172 | 172 | |
| 173 | 173 | continue; |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | - $result .= $glue . $key . $glue . $value; |
|
| 176 | + $result .= $glue.$key.$glue.$value; |
|
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | return $result; |
@@ -181,11 +181,11 @@ discard block |
||
| 181 | 181 | |
| 182 | 182 | public function pluck($column, $key = null) |
| 183 | 183 | { |
| 184 | - if (! $this->isCachable()) { |
|
| 184 | + if (!$this->isCachable()) { |
|
| 185 | 185 | return parent::pluck($column, $key); |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | - $keyDifferentiator = "-pluck_{$column}" . ($key ? "_{$key}" : ""); |
|
| 188 | + $keyDifferentiator = "-pluck_{$column}".($key ? "_{$key}" : ""); |
|
| 189 | 189 | $cacheKey = $this->makeCacheKey([$column], null, $keyDifferentiator); |
| 190 | 190 | |
| 191 | 191 | return $this->cachedValue(func_get_args(), $cacheKey); |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | |
| 194 | 194 | public function sum($column) |
| 195 | 195 | { |
| 196 | - if (! $this->isCachable()) { |
|
| 196 | + if (!$this->isCachable()) { |
|
| 197 | 197 | return parent::sum($column); |
| 198 | 198 | } |
| 199 | 199 | |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | |
| 212 | 212 | public function value($column) |
| 213 | 213 | { |
| 214 | - if (! $this->isCachable()) { |
|
| 214 | + if (!$this->isCachable()) { |
|
| 215 | 215 | return parent::value($column); |
| 216 | 216 | } |
| 217 | 217 | |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | return $this->cache($cacheTags) |
| 287 | 287 | ->rememberForever( |
| 288 | 288 | $hashedCacheKey, |
| 289 | - function () use ($arguments, $cacheKey, $method) { |
|
| 289 | + function() use ($arguments, $cacheKey, $method) { |
|
| 290 | 290 | return [ |
| 291 | 291 | "key" => $cacheKey, |
| 292 | 292 | "value" => parent::{$method}(...$arguments), |