@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | $type = $this->option('type'); |
| 38 | 38 | $force = $this->option('force'); |
| 39 | 39 | |
| 40 | - if (! in_array($type, ['daily', 'hourly'])) { |
|
| 40 | + if (!in_array($type, ['daily', 'hourly'])) { |
|
| 41 | 41 | $this->error("Invalid type '{$type}'. Must be 'daily' or 'hourly'."); |
| 42 | 42 | |
| 43 | 43 | return Command::FAILURE; |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | $date = Carbon::now()->subDays($i)->format('Y-m-d'); |
| 69 | 69 | |
| 70 | 70 | // Check if stats already exist for this date |
| 71 | - if (! $force && UserActivityStat::where('stat_date', $date)->exists()) { |
|
| 71 | + if (!$force && UserActivityStat::where('stat_date', $date)->exists()) { |
|
| 72 | 72 | $statsSkipped++; |
| 73 | 73 | $progressBar->advance(); |
| 74 | 74 | |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | $hour = Carbon::now()->subHours($i)->startOfHour()->format('Y-m-d H:00:00'); |
| 129 | 129 | |
| 130 | 130 | // Check if stats already exist for this hour |
| 131 | - if (! $force && DB::table('user_activity_stats_hourly')->where('stat_hour', $hour)->exists()) { |
|
| 131 | + if (!$force && DB::table('user_activity_stats_hourly')->where('stat_hour', $hour)->exists()) { |
|
| 132 | 132 | $statsSkipped++; |
| 133 | 133 | $progressBar->advance(); |
| 134 | 134 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | ->when($email !== '', fn ($q) => $q->where('users.email', 'like', "%$email%")) |
| 35 | 35 | ->when($host !== '', fn ($q) => $q->where('users.host', 'like', "%$host%")) |
| 36 | 36 | // Created date filters |
| 37 | - ->when($createdFrom !== '' || $createdTo !== '', function ($q) use ($createdFrom, $createdTo) { |
|
| 37 | + ->when($createdFrom !== '' || $createdTo !== '', function($q) use ($createdFrom, $createdTo) { |
|
| 38 | 38 | try { |
| 39 | 39 | if ($createdFrom !== '' && $createdTo !== '') { |
| 40 | 40 | $from = Carbon::createFromFormat('Y-m-d', $createdFrom)->startOfDay(); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | } |
| 53 | 53 | }) |
| 54 | 54 | // Deleted date filters |
| 55 | - ->when($deletedFrom !== '' || $deletedTo !== '', function ($q) use ($deletedFrom, $deletedTo) { |
|
| 55 | + ->when($deletedFrom !== '' || $deletedTo !== '', function($q) use ($deletedFrom, $deletedTo) { |
|
| 56 | 56 | try { |
| 57 | 57 | if ($deletedFrom !== '' && $deletedTo !== '') { |
| 58 | 58 | $from = Carbon::createFromFormat('Y-m-d', $deletedFrom)->startOfDay(); |
@@ -109,11 +109,11 @@ discard block |
||
| 109 | 109 | $userIds = $request->input('user_ids', []); |
| 110 | 110 | |
| 111 | 111 | // Better validation with specific error messages |
| 112 | - if (empty($action) || ! in_array($action, ['restore', 'delete'], true)) { |
|
| 112 | + if (empty($action) || !in_array($action, ['restore', 'delete'], true)) { |
|
| 113 | 113 | return redirect()->route('admin.deleted.users.index')->with('error', 'Please select a valid action.'); |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | - if (! is_array($userIds)) { |
|
| 116 | + if (!is_array($userIds)) { |
|
| 117 | 117 | return redirect()->route('admin.deleted.users.index')->with('error', 'Invalid user selection format.'); |
| 118 | 118 | } |
| 119 | 119 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | return $user; |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | - $outputXML = (! ($request->has('o') && $request->input('o') === 'json')); |
|
| 33 | + $outputXML = (!($request->has('o') && $request->input('o') === 'json')); |
|
| 34 | 34 | |
| 35 | 35 | $userNum = ($request->has('num') && is_numeric($request->input('num')) ? abs($request->input('num')) : 0); |
| 36 | 36 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $userAirDate = $request->has('airdate') && is_numeric($request->input('airdate')) ? abs($request->input('airdate')) : -1; |
| 56 | 56 | $userNum = ($request->has('num') && is_numeric($request->input('num')) ? abs($request->input('num')) : 0); |
| 57 | 57 | $relData = $rss->getShowsRss($userNum, $user['user_id'], User::getCategoryExclusionById($user['user_id']), $userAirDate); |
| 58 | - $outputXML = (! ($request->has('o') && $request->input('o') === 'json')); |
|
| 58 | + $outputXML = (!($request->has('o') && $request->input('o') === 'json')); |
|
| 59 | 59 | |
| 60 | 60 | $rss->output($relData, $user['params'], $outputXML, $offset, 'rss'); |
| 61 | 61 | } |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | } elseif ($request->has('anidb')) { |
| 83 | 83 | $userAnidb = ((int) $request->input('anidb') === 0 ? -1 : $request->input('anidb') + 0); |
| 84 | 84 | } |
| 85 | - $outputXML = (! ($request->has('o') && $request->input('o') === 'json')); |
|
| 85 | + $outputXML = (!($request->has('o') && $request->input('o') === 'json')); |
|
| 86 | 86 | $relData = $rss->getRss(Arr::wrap(0), $userShow, $userAnidb, $user['user_id'], $userAirDate, $userLimit, $userNum); |
| 87 | 87 | $rss->output($relData, $user['params'], $outputXML, $offset, 'rss'); |
| 88 | 88 | } |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | if (is_object($user)) { |
| 128 | 128 | return $user; |
| 129 | 129 | } |
| 130 | - $outputXML = (! ($request->has('o') && $request->input('o') === 'json')); |
|
| 130 | + $outputXML = (!($request->has('o') && $request->input('o') === 'json')); |
|
| 131 | 131 | $userAirDate = $request->has('airdate') && is_numeric($request->input('airdate')) ? abs($request->input('airdate')) : -1; |
| 132 | 132 | $userNum = ($request->has('num') && is_numeric($request->input('num')) ? abs($request->input('num')) : 0); |
| 133 | 133 | $userLimit = $request->has('limit') && is_numeric($request->input('limit')) ? $request->input('limit') : 100; |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | } elseif ($request->has('anidb')) { |
| 168 | 168 | $userAnidb = ((int) $request->input('anidb') === 0 ? -1 : $request->input('anidb') + 0); |
| 169 | 169 | } |
| 170 | - $outputXML = (! ($request->has('o') && $request->input('o') === 'json')); |
|
| 170 | + $outputXML = (!($request->has('o') && $request->input('o') === 'json')); |
|
| 171 | 171 | $relData = $rss->getRss($categoryId, $userShow, $userAnidb, $user['user_id'], $userAirDate, $userLimit, $userNum); |
| 172 | 172 | $rss->output($relData, $user['params'], $outputXML, $offset, 'rss'); |
| 173 | 173 | } |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | if (is_object($user)) { |
| 184 | 184 | return $user; |
| 185 | 185 | } |
| 186 | - $outputXML = (! ($request->has('o') && $request->input('o') === 'json')); |
|
| 186 | + $outputXML = (!($request->has('o') && $request->input('o') === 'json')); |
|
| 187 | 187 | |
| 188 | 188 | $relData = $rss->getTrendingMoviesRss(); |
| 189 | 189 | |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | if (is_object($user)) { |
| 202 | 202 | return $user; |
| 203 | 203 | } |
| 204 | - $outputXML = (! ($request->has('o') && $request->input('o') === 'json')); |
|
| 204 | + $outputXML = (!($request->has('o') && $request->input('o') === 'json')); |
|
| 205 | 205 | |
| 206 | 206 | $relData = $rss->getTrendingShowsRss(); |
| 207 | 207 | |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | Category::TV_ROOT, |
| 107 | 107 | Category::TV_OTHER, |
| 108 | 108 | $this->releases->showPasswords(), |
| 109 | - ! empty($limit) ? sprintf(' LIMIT %d OFFSET 0', min($limit, 100)) : '' |
|
| 109 | + !empty($limit) ? sprintf(' LIMIT %d OFFSET 0', min($limit, 100)) : '' |
|
| 110 | 110 | ); |
| 111 | 111 | |
| 112 | 112 | $expiresAt = now()->addMinutes(config('nntmux.cache_expiry_medium')); |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | Category::MOVIE_ROOT, |
| 135 | 135 | Category::MOVIE_OTHER, |
| 136 | 136 | $this->releases->showPasswords(), |
| 137 | - ! empty($limit) ? sprintf(' LIMIT %d OFFSET 0', min($limit, 100)) : '' |
|
| 137 | + !empty($limit) ? sprintf(' LIMIT %d OFFSET 0', min($limit, 100)) : '' |
|
| 138 | 138 | ); |
| 139 | 139 | |
| 140 | 140 | $expiresAt = now()->addMinutes(config('nntmux.cache_expiry_medium')); |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | { |
| 159 | 159 | $cacheKey = 'rss_trending_movies_48h'; |
| 160 | 160 | |
| 161 | - return Cache::remember($cacheKey, 3600, function () { |
|
| 161 | + return Cache::remember($cacheKey, 3600, function() { |
|
| 162 | 162 | $fortyEightHoursAgo = \Illuminate\Support\Carbon::now()->subHours(48); |
| 163 | 163 | |
| 164 | 164 | // First get the top 15 movies by download count |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | { |
| 219 | 219 | $cacheKey = 'rss_trending_shows_48h'; |
| 220 | 220 | |
| 221 | - return Cache::remember($cacheKey, 3600, function () { |
|
| 221 | + return Cache::remember($cacheKey, 3600, function() { |
|
| 222 | 222 | $fortyEightHoursAgo = \Illuminate\Support\Carbon::now()->subHours(48); |
| 223 | 223 | |
| 224 | 224 | // First get the top 15 TV shows by download count |
@@ -37,11 +37,11 @@ |
||
| 37 | 37 | $backfill = new Backfill(['NNTP' => $nntp]); |
| 38 | 38 | |
| 39 | 39 | match (true) { |
| 40 | - $mode === 'all' && ! isset($quantity) => $backfill->backfillAllGroups(), |
|
| 40 | + $mode === 'all' && !isset($quantity) => $backfill->backfillAllGroups(), |
|
| 41 | 41 | $mode === 'alph' && is_numeric($quantity) => $backfill->backfillAllGroups('', (int) $quantity, 'normal'), |
| 42 | 42 | $mode === 'date' && is_numeric($quantity) => $backfill->backfillAllGroups('', (int) $quantity, 'date'), |
| 43 | 43 | $mode === 'safe' && is_numeric($quantity) => $backfill->safeBackfill((int) $quantity), |
| 44 | - preg_match('/^alt\.binaries\..+$/i', $mode) && ! isset($quantity) => $backfill->backfillAllGroups($mode), |
|
| 44 | + preg_match('/^alt\.binaries\..+$/i', $mode) && !isset($quantity) => $backfill->backfillAllGroups($mode), |
|
| 45 | 45 | preg_match('/^alt\.binaries\..+$/i', $mode) && is_numeric($quantity) => $backfill->backfillAllGroups($mode, (int) $quantity), |
| 46 | 46 | default => throw new \Exception($this->getHelpText()), |
| 47 | 47 | }; |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | { |
| 29 | 29 | $limit = $this->argument('limit'); |
| 30 | 30 | |
| 31 | - if ($limit !== null && ! is_numeric($limit)) { |
|
| 31 | + if ($limit !== null && !is_numeric($limit)) { |
|
| 32 | 32 | $this->error('Limit must be a number'); |
| 33 | 33 | |
| 34 | 34 | return Command::FAILURE; |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | { |
| 37 | 37 | $groupId = $this->argument('groupId'); |
| 38 | 38 | |
| 39 | - if (! is_numeric($groupId)) { |
|
| 39 | + if (!is_numeric($groupId)) { |
|
| 40 | 40 | $this->error('Group ID must be numeric.'); |
| 41 | 41 | |
| 42 | 42 | return self::FAILURE; |
@@ -45,15 +45,15 @@ |
||
| 45 | 45 | $this->sessionManager = new TmuxSessionManager($sessionName); |
| 46 | 46 | |
| 47 | 47 | // Check if session exists |
| 48 | - if (! $this->sessionManager->sessionExists()) { |
|
| 48 | + if (!$this->sessionManager->sessionExists()) { |
|
| 49 | 49 | $this->warn("⚠️ Session '{$sessionName}' is not running"); |
| 50 | 50 | |
| 51 | 51 | return Command::SUCCESS; |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | // Confirm unless forced |
| 55 | - if (! $this->option('force')) { |
|
| 56 | - if (! $this->confirm("Stop tmux session '{$sessionName}'?", true)) { |
|
| 55 | + if (!$this->option('force')) { |
|
| 56 | + if (!$this->confirm("Stop tmux session '{$sessionName}'?", true)) { |
|
| 57 | 57 | $this->info('Cancelled'); |
| 58 | 58 | |
| 59 | 59 | return Command::SUCCESS; |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | { |
| 30 | 30 | $type = $this->argument('type'); |
| 31 | 31 | |
| 32 | - if (! \in_array($type, ['backfill', 'binaries'], true)) { |
|
| 32 | + if (!\in_array($type, ['backfill', 'binaries'], true)) { |
|
| 33 | 33 | $this->error('Type must be either: binaries or backfill'); |
| 34 | 34 | $this->line(''); |
| 35 | 35 | $this->line('binaries => Do Safe Binaries update'); |