@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | [ |
| 50 | 50 | 'users_id' => $uid, |
| 51 | 51 | 'imdbid' => $imdbid, |
| 52 | - 'categories' => ! empty($catID) ? implode('|', $catID) : 'NULL', |
|
| 52 | + 'categories' => !empty($catID) ? implode('|', $catID) : 'NULL', |
|
| 53 | 53 | 'created_at' => now(), |
| 54 | 54 | ] |
| 55 | 55 | ); |
@@ -91,6 +91,6 @@ discard block |
||
| 91 | 91 | { |
| 92 | 92 | self::query() |
| 93 | 93 | ->where(['users_id' => $uid, 'imdbid' => $imdbid]) |
| 94 | - ->update(['categories' => ! empty($catID) ? implode('|', $catID) : 'NULL']); |
|
| 94 | + ->update(['categories' => !empty($catID) ? implode('|', $catID) : 'NULL']); |
|
| 95 | 95 | } |
| 96 | 96 | } |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | public static function updateRelease($id, $name, $searchName, $fromName, $categoryId, $parts, $grabs, $size, $postedDate, $addedDate, $videoId, $episodeId, $imDbId, $aniDbId): void |
| 281 | 281 | { |
| 282 | 282 | $movieInfoId = null; |
| 283 | - if (! empty($imDbId)) { |
|
| 283 | + if (!empty($imDbId)) { |
|
| 284 | 284 | $movieInfoId = MovieInfo::whereImdbid($imDbId)->first(['id']); |
| 285 | 285 | } |
| 286 | 286 | self::whereId($id)->update( |
@@ -531,12 +531,12 @@ discard block |
||
| 531 | 531 | |
| 532 | 532 | preg_match('/(^\w+[-_. ].+?\.(\d+p)).+/i', $rel['searchname'], $similar); |
| 533 | 533 | |
| 534 | - if (! empty($similar)) { |
|
| 534 | + if (!empty($similar)) { |
|
| 535 | 535 | if (config('nntmux.elasticsearch_enabled') === true) { |
| 536 | 536 | $searchResult = (new ElasticSearchSiteSearch())->indexSearch($similar[1], 10); |
| 537 | 537 | } else { |
| 538 | 538 | $searchResult = (new ManticoreSearch())->searchIndexes('releases_rt', $similar[1]); |
| 539 | - if (! empty($searchResult)) { |
|
| 539 | + if (!empty($searchResult)) { |
|
| 540 | 540 | $searchResult = Arr::wrap(Arr::get($searchResult, 'id')); |
| 541 | 541 | } |
| 542 | 542 | } |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | */ |
| 60 | 60 | public static function delApiRequests($userID): void |
| 61 | 61 | { |
| 62 | - DB::transaction(function () use ($userID) { |
|
| 62 | + DB::transaction(function() use ($userID) { |
|
| 63 | 63 | self::query()->where('users_id', $userID)->delete(); |
| 64 | 64 | }, 3); |
| 65 | 65 | } |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | self::clearApiRequests($userID); |
| 78 | 78 | $requests = self::query()->where('users_id', $userID)->count('id'); |
| 79 | 79 | |
| 80 | - return ! $requests ? 0 : $requests; |
|
| 80 | + return !$requests ? 0 : $requests; |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | /** |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | */ |
| 105 | 105 | public static function clearApiRequests($userID): void |
| 106 | 106 | { |
| 107 | - DB::transaction(function () use ($userID) { |
|
| 107 | + DB::transaction(function() use ($userID) { |
|
| 108 | 108 | if ($userID === false) { |
| 109 | 109 | self::query()->where('timestamp', '<', now()->subDay())->delete(); |
| 110 | 110 | } else { |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | public static function getFailedCount($relId) |
| 69 | 69 | { |
| 70 | 70 | $result = self::query()->where('release_id', $relId)->value('failed'); |
| 71 | - if (! empty($result)) { |
|
| 71 | + if (!empty($result)) { |
|
| 72 | 72 | return $result; |
| 73 | 73 | } |
| 74 | 74 | |
@@ -136,7 +136,7 @@ |
||
| 136 | 136 | ->select(['videos.*', 'tve.firstaired as prevdate', 'tve.title as previnfo', 'tvi.publisher', 'us.id as userseriesid']) |
| 137 | 137 | ->join('tv_info as tvi', 'videos.id', '=', 'tvi.videos_id') |
| 138 | 138 | ->join('tv_episodes as tve', 'videos.id', '=', 'tve.videos_id') |
| 139 | - ->leftJoin('user_series as us', function ($join) use ($uid) { |
|
| 139 | + ->leftJoin('user_series as us', function($join) use ($uid) { |
|
| 140 | 140 | $join->on('videos.id', '=', 'us.videos_id')->where('us.users_id', '=', $uid); |
| 141 | 141 | }) |
| 142 | 142 | ->whereBetween('r.categories_id', [Category::TV_ROOT, Category::TV_OTHER]) |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | [ |
| 60 | 60 | 'users_id' => $userId, |
| 61 | 61 | 'videos_id' => $videoId, |
| 62 | - 'categories' => ! empty($catID) ? implode('|', $catID) : 'NULL', |
|
| 62 | + 'categories' => !empty($catID) ? implode('|', $catID) : 'NULL', |
|
| 63 | 63 | 'created_at' => now(), |
| 64 | 64 | 'updated_at' => now(), |
| 65 | 65 | ] |
@@ -127,6 +127,6 @@ discard block |
||
| 127 | 127 | */ |
| 128 | 128 | public static function updateShow($users_id, $videos_id, array $catID = []): void |
| 129 | 129 | { |
| 130 | - self::query()->where(compact('users_id', 'videos_id'))->update(['categories' => ! empty($catID) ? implode('|', $catID) : 'NULL']); |
|
| 130 | + self::query()->where(compact('users_id', 'videos_id'))->update(['categories' => !empty($catID) ? implode('|', $catID) : 'NULL']); |
|
| 131 | 131 | } |
| 132 | 132 | } |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | // If there's an override and no mutator has been explicitly defined on |
| 129 | 129 | // the model then use the override value |
| 130 | - if ($override && ! $this->hasGetMutator($key)) { |
|
| 130 | + if ($override && !$this->hasGetMutator($key)) { |
|
| 131 | 131 | return $override->value; |
| 132 | 132 | } |
| 133 | 133 | |
@@ -148,9 +148,9 @@ discard block |
||
| 148 | 148 | $results = self::cursor()->remember(); |
| 149 | 149 | |
| 150 | 150 | $tree = []; |
| 151 | - if (! empty($results)) { |
|
| 151 | + if (!empty($results)) { |
|
| 152 | 152 | foreach ($results as $result) { |
| 153 | - if (! $excludeUnsectioned || ! empty($result->section)) { |
|
| 153 | + if (!$excludeUnsectioned || !empty($result->section)) { |
|
| 154 | 154 | $tree[$result->section][$result->subsection][$result->name] = |
| 155 | 155 | ['value' => $result->value, 'hint' => $result->hint]; |
| 156 | 156 | } |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | { |
| 212 | 212 | $result = DB::select('SELECT VERSION() AS version'); |
| 213 | 213 | |
| 214 | - if (! empty($result)) { |
|
| 214 | + if (!empty($result)) { |
|
| 215 | 215 | $dummy = explode('-', $result[0]->version, 2); |
| 216 | 216 | $this->dbVersion = $dummy[0]; |
| 217 | 217 | } |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | */ |
| 83 | 83 | public static function delCartByGuid($guids, $userID) |
| 84 | 84 | { |
| 85 | - if (! \is_array($guids)) { |
|
| 85 | + if (!\is_array($guids)) { |
|
| 86 | 86 | return false; |
| 87 | 87 | } |
| 88 | 88 | |
@@ -195,7 +195,7 @@ |
||
| 195 | 195 | return $predb; |
| 196 | 196 | } |
| 197 | 197 | $sql = self::query()->leftJoin('releases', 'releases.predb_id', '=', 'predb.id')->orderByDesc('predb.predate'); |
| 198 | - if (! empty($search)) { |
|
| 198 | + if (!empty($search)) { |
|
| 199 | 199 | if (config('nntmux.elasticsearch_enabled') === true) { |
| 200 | 200 | $ids = (new ElasticSearchSiteSearch())->predbIndexSearch($search); |
| 201 | 201 | } else { |