@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | if (\in_array($siteColumn, self::$sites, false)) { |
101 | 101 | $result = Video::query()->where($siteColumn, $siteID)->first(); |
102 | 102 | } |
103 | - if (! empty($result)) { |
|
103 | + if (!empty($result)) { |
|
104 | 104 | $query = $result->toArray(); |
105 | 105 | |
106 | 106 | return $query['id']; |
@@ -180,13 +180,13 @@ discard block |
||
180 | 180 | public function getTitleExact(string $title, int $type, int $source = 0): int |
181 | 181 | { |
182 | 182 | $return = 0; |
183 | - if (! empty($title)) { |
|
183 | + if (!empty($title)) { |
|
184 | 184 | $sql = Video::query()->where(['title' => $title, 'type' => $type]); |
185 | 185 | if ($source > 0) { |
186 | 186 | $sql->where('source', $source); |
187 | 187 | } |
188 | 188 | $query = $sql->first(); |
189 | - if (! empty($query)) { |
|
189 | + if (!empty($query)) { |
|
190 | 190 | $result = $query->toArray(); |
191 | 191 | $return = $result['id']; |
192 | 192 | } |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $sql->where('videos.source', $source); |
200 | 200 | } |
201 | 201 | $query = $sql->first(); |
202 | - if (! empty($query)) { |
|
202 | + if (!empty($query)) { |
|
203 | 203 | $result = $query->toArray(); |
204 | 204 | $return = $result['id']; |
205 | 205 | } |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | { |
217 | 217 | $return = 0; |
218 | 218 | |
219 | - if (! empty($title)) { |
|
219 | + if (!empty($title)) { |
|
220 | 220 | $sql = Video::query() |
221 | 221 | ->where('title', 'like', rtrim($title, '%')) |
222 | 222 | ->where('type', $type); |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | $sql->where('source', $source); |
225 | 225 | } |
226 | 226 | $query = $sql->first(); |
227 | - if (! empty($query)) { |
|
227 | + if (!empty($query)) { |
|
228 | 228 | $result = $query->toArray(); |
229 | 229 | $return = $result['id']; |
230 | 230 | } |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | $sql->where('videos.source', $source); |
239 | 239 | } |
240 | 240 | $query = $sql->first(); |
241 | - if (! empty($query)) { |
|
241 | + if (!empty($query)) { |
|
242 | 242 | $result = $query->toArray(); |
243 | 243 | $return = $result['id']; |
244 | 244 | } |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | public function getAlternativeTitleExact(string $title, int $type, int $source = 0): mixed |
255 | 255 | { |
256 | 256 | $return = 0; |
257 | - if (! empty($title)) { |
|
257 | + if (!empty($title)) { |
|
258 | 258 | if ($source > 0) { |
259 | 259 | $query = Video::query() |
260 | 260 | ->whereRaw("REPLACE(title,'\'','') = ?", $title) |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | ->where('type', '=', $type) |
270 | 270 | ->first(); |
271 | 271 | } |
272 | - if (! empty($query)) { |
|
272 | + if (!empty($query)) { |
|
273 | 273 | $result = $query->toArray(); |
274 | 274 | |
275 | 275 | return $result['id']; |
@@ -284,10 +284,10 @@ discard block |
||
284 | 284 | */ |
285 | 285 | public function addAliases($videoId, array $aliases = []): void |
286 | 286 | { |
287 | - if (! empty($aliases) && $videoId > 0) { |
|
287 | + if (!empty($aliases) && $videoId > 0) { |
|
288 | 288 | foreach ($aliases as $key => $title) { |
289 | 289 | // Check for tvmaze style aka |
290 | - if (\is_array($title) && ! empty($title['name'])) { |
|
290 | + if (\is_array($title) && !empty($title['name'])) { |
|
291 | 291 | $title = $title['name']; |
292 | 292 | } |
293 | 293 | // Check if we have the AKA already |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | $sql->where('title', $alias); |
316 | 316 | } |
317 | 317 | |
318 | - return Cache::flexible($cacheKey, [config('nntmux.cache_expiry_medium'), config('nntmux.cache_expiry_long')], function () use ($sql) { |
|
318 | + return Cache::flexible($cacheKey, [config('nntmux.cache_expiry_medium'), config('nntmux.cache_expiry_long')], function() use ($sql) { |
|
319 | 319 | $result = $sql->get(); |
320 | 320 | |
321 | 321 | return $result->isEmpty() ? false : $result; |