@@ -486,15 +486,15 @@ discard block |
||
486 | 486 | public static function getForMenu(array $excludedCats = []): array |
487 | 487 | { |
488 | 488 | $categoriesResult = []; |
489 | - $categoriesArray = RootCategory::query()->with(['categories' => function ($query) use ($excludedCats) { |
|
490 | - if (! empty($excludedCats)) { |
|
489 | + $categoriesArray = RootCategory::query()->with(['categories' => function($query) use ($excludedCats) { |
|
490 | + if (!empty($excludedCats)) { |
|
491 | 491 | $query->whereNotIn('id', $excludedCats); |
492 | 492 | } |
493 | 493 | $query->select(['id', 'title', 'root_categories_id', 'description']); |
494 | 494 | }])->select(['id', 'title'])->get()->toArray(); |
495 | 495 | |
496 | 496 | foreach ($categoriesArray as $category) { |
497 | - if (! empty($category['categories'])) { |
|
497 | + if (!empty($category['categories'])) { |
|
498 | 498 | $categoriesResult[] = $category; |
499 | 499 | } |
500 | 500 | } |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | $sql->where('status', '=', self::STATUS_ACTIVE); |
553 | 553 | } |
554 | 554 | |
555 | - if (! empty($excludedCats)) { |
|
555 | + if (!empty($excludedCats)) { |
|
556 | 556 | $sql->whereNotIn('id', $excludedCats); |
557 | 557 | } |
558 | 558 |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | public static function updateRelease($id, $name, $searchName, $fromName, $categoryId, $parts, $grabs, $size, $postedDate, $addedDate, $videoId, $episodeId, $imDbId, $aniDbId): void |
276 | 276 | { |
277 | 277 | $movieInfoId = null; |
278 | - if (! empty($imDbId)) { |
|
278 | + if (!empty($imDbId)) { |
|
279 | 279 | $movieInfoId = MovieInfo::whereImdbid($imDbId)->first(['id']); |
280 | 280 | } |
281 | 281 | self::whereId($id)->update( |
@@ -526,12 +526,12 @@ discard block |
||
526 | 526 | |
527 | 527 | preg_match('/(^\w+[-_. ].+?\.(\d+p)).+/i', $rel['searchname'], $similar); |
528 | 528 | |
529 | - if (! empty($similar)) { |
|
529 | + if (!empty($similar)) { |
|
530 | 530 | if (config('nntmux.elasticsearch_enabled') === true) { |
531 | 531 | $searchResult = (new ElasticSearchSiteSearch)->indexSearch($similar[1], 10); |
532 | 532 | } else { |
533 | 533 | $searchResult = (new ManticoreSearch)->searchIndexes('releases_rt', $similar[1]); |
534 | - if (! empty($searchResult)) { |
|
534 | + if (!empty($searchResult)) { |
|
535 | 535 | $searchResult = Arr::wrap(Arr::get($searchResult, 'id')); |
536 | 536 | } |
537 | 537 | } |