Passed
Push — master ( 52d10f...990f47 )
by Darko
11:27
created
app/Console/Commands/ProcessPostProcess.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         $type = $this->argument('type');
35 35
         $renamed = $this->argument('renamed');
36 36
 
37
-        if (! \in_array($type, ['ama', 'add', 'ani', 'mov', 'nfo', 'tv'], true)) {
37
+        if (!\in_array($type, ['ama', 'add', 'ani', 'mov', 'nfo', 'tv'], true)) {
38 38
             $this->error('Type must be one of: ama, add, ani, mov, nfo, sha, tv');
39 39
             $this->line('');
40 40
             $this->line('ama => Do amazon/books processing');
Please login to merge, or discard this patch.
app/Http/Controllers/GetNzbController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
         // Authenticate and authorize user
41 41
         $userData = $this->authenticateUser($request);
42
-        if (! \is_array($userData)) {
42
+        if (!\is_array($userData)) {
43 43
             return $userData; // Return error response
44 44
         }
45 45
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
         // Validate and sanitize ID parameter
55 55
         $releaseId = $this->validateAndSanitizeId($request);
56
-        if (! \is_string($releaseId)) {
56
+        if (!\is_string($releaseId)) {
57 57
             return $releaseId; // Return error response
58 58
         }
59 59
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     private function normalizeGuidParameter(Request $request, ?string $guid): void
73 73
     {
74
-        if ($guid !== null && ! $request->has('id')) {
74
+        if ($guid !== null && !$request->has('id')) {
75 75
             $request->merge(['id' => $guid]);
76 76
         }
77 77
     }
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         }
124 124
 
125 125
         $user = User::getByRssToken($request->input('r'));
126
-        if (! $user) {
126
+        if (!$user) {
127 127
             return Utility::showApiError(100);
128 128
         }
129 129
 
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
     ) {
254 254
         // Get NZB file path and validate
255 255
         $nzbPath = (new NZB)->getNZBPath($releaseId);
256
-        if (! File::exists($nzbPath)) {
256
+        if (!File::exists($nzbPath)) {
257 257
             return Utility::showApiError(300, 'NZB file not found!');
258 258
         }
259 259
 
@@ -309,9 +309,9 @@  discard block
 block discarded – undo
309 309
         ];
310 310
 
311 311
         // Add optional metadata headers
312
-        if (! empty($releaseData->imdbid) && $releaseData->imdbid > 0) {
312
+        if (!empty($releaseData->imdbid) && $releaseData->imdbid > 0) {
313 313
             $headers['X-DNZB-MoreInfo'] = "http://www.imdb.com/title/tt{$releaseData->imdbid}";
314
-        } elseif (! empty($releaseData->tvdb) && $releaseData->tvdb > 0) {
314
+        } elseif (!empty($releaseData->tvdb) && $releaseData->tvdb > 0) {
315 315
             $headers['X-DNZB-MoreInfo'] = "http://www.thetvdb.com/?tab=series&id={$releaseData->tvdb}";
316 316
         }
317 317
 
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
         $lastChunk = false;
340 340
 
341 341
         // Stream and modify content in chunks
342
-        while (! gzeof($fileHandle)) {
342
+        while (!gzeof($fileHandle)) {
343 343
             $chunk = gzread($fileHandle, self::BUFFER_SIZE);
344 344
             if ($chunk === false) {
345 345
                 break;
Please login to merge, or discard this patch.
app/Http/Controllers/AdultController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,11 +44,11 @@
 block discarded – undo
44 44
         $rslt = $adult->getXXXRange($page, $catarray, $offset, config('nntmux.items_per_page'), $orderby, -1, $this->userdata['categoryexclusions']);
45 45
         $results = $this->paginate($rslt ?? [], $rslt[0]->_totalcount ?? 0, config('nntmux.items_per_page'), $page, $request->url(), $request->query());
46 46
 
47
-        $title = ($request->has('title') && ! empty($request->input('title'))) ? stripslashes($request->input('title')) : '';
47
+        $title = ($request->has('title') && !empty($request->input('title'))) ? stripslashes($request->input('title')) : '';
48 48
 
49
-        $actors = ($request->has('actors') && ! empty($request->input('actors'))) ? stripslashes($request->input('actors')) : '';
49
+        $actors = ($request->has('actors') && !empty($request->input('actors'))) ? stripslashes($request->input('actors')) : '';
50 50
 
51
-        $director = ($request->has('director') && ! empty($request->input('director'))) ? stripslashes($request->input('director')) : '';
51
+        $director = ($request->has('director') && !empty($request->input('director'))) ? stripslashes($request->input('director')) : '';
52 52
 
53 53
         $genres = $adult->getAllGenres(true);
54 54
         $genre = ($request->has('genre') && \in_array($request->input('genre'), $genres, false)) ? $request->input('genre') : '';
Please login to merge, or discard this patch.
app/Services/TvProcessor.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,9 +14,9 @@  discard block
 block discarded – undo
14 14
 class TvProcessor
15 15
 {
16 16
     // Processing modes
17
-    public const MODE_PIPELINE = 'pipeline';  // Sequential processing (efficient, reduces API calls)
17
+    public const MODE_PIPELINE = 'pipeline'; // Sequential processing (efficient, reduces API calls)
18 18
 
19
-    public const MODE_PARALLEL = 'parallel';  // Parallel processing (faster, more API calls)
19
+    public const MODE_PARALLEL = 'parallel'; // Parallel processing (faster, more API calls)
20 20
 
21 21
     private bool $echooutput;
22 22
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
      */
260 260
     private function displayHeader(string $guidChar = ''): void
261 261
     {
262
-        if (! $this->echooutput) {
262
+        if (!$this->echooutput) {
263 263
             return;
264 264
         }
265 265
 
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
      */
284 284
     private function displayHeaderParallel(string $guidChar = ''): void
285 285
     {
286
-        if (! $this->echooutput) {
286
+        if (!$this->echooutput) {
287 287
             return;
288 288
         }
289 289
 
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
      */
308 308
     private function displayProviderHeader(string $providerName, int $step, int $total): void
309 309
     {
310
-        if (! $this->echooutput) {
310
+        if (!$this->echooutput) {
311 311
             return;
312 312
         }
313 313
 
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
      */
327 327
     private function displayProviderPreview(string $providerName, Release $release, int $total, int $status): void
328 328
     {
329
-        if (! $this->echooutput) {
329
+        if (!$this->echooutput) {
330 330
             return;
331 331
         }
332 332
 
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
      */
353 353
     private function displayProviderSkip(string $providerName, int $step, int $total): void
354 354
     {
355
-        if (! $this->echooutput) {
355
+        if (!$this->echooutput) {
356 356
             return;
357 357
         }
358 358
 
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
      */
373 373
     private function displayProviderComplete(string $providerName, float $elapsedTime): void
374 374
     {
375
-        if (! $this->echooutput) {
375
+        if (!$this->echooutput) {
376 376
             return;
377 377
         }
378 378
 
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
      */
391 391
     private function displaySummary(): void
392 392
     {
393
-        if (! $this->echooutput) {
393
+        if (!$this->echooutput) {
394 394
             return;
395 395
         }
396 396
 
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
      */
407 407
     private function displaySummaryParallel(float $totalTime): void
408 408
     {
409
-        if (! $this->echooutput) {
409
+        if (!$this->echooutput) {
410 410
             return;
411 411
         }
412 412
 
Please login to merge, or discard this patch.
app/Http/Controllers/SeriesController.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
             $seriessummary = '';
45 45
             $seriescountry = '';
46 46
 
47
-            if (! $show) {
47
+            if (!$show) {
48 48
                 $nodata = 'No video information for this series.';
49
-            } elseif (! $rel) {
49
+            } elseif (!$rel) {
50 50
                 $nodata = 'No releases for this series.';
51 51
             } else {
52 52
                 $myshows = UserSerie::getShow($this->userdata->id, $show['id']);
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                         if (empty($r->episode) || (int) $r->episode === 0) {
68 68
                             $r->episode = (int) $meta->episode;
69 69
                         }
70
-                        if ((! $meta->series || (int) $meta->series === 0) && ! empty($meta->firstaired)) {
70
+                        if ((!$meta->series || (int) $meta->series === 0) && !empty($meta->firstaired)) {
71 71
                             if (empty($r->series) || (int) $r->series === 0) {
72 72
                                 $r->series = (int) Carbon::parse($meta->firstaired)->format('Y');
73 73
                             }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                                 $r->episode = (int) Carbon::parse($meta->firstaired)->format('md');
76 76
                             }
77 77
                         }
78
-                    } elseif (! empty($r->firstaired)) {
78
+                    } elseif (!empty($r->firstaired)) {
79 79
                         if (empty($r->series) || (int) $r->series === 0) {
80 80
                             $r->series = (int) Carbon::parse($r->firstaired)->format('Y');
81 81
                         }
@@ -84,10 +84,10 @@  discard block
 block discarded – undo
84 84
                         }
85 85
                     }
86 86
 
87
-                    if ((empty($r->series) || (int) $r->series === 0 || empty($r->episode) || (int) $r->episode === 0) && ! empty($r->searchname)) {
87
+                    if ((empty($r->series) || (int) $r->series === 0 || empty($r->episode) || (int) $r->episode === 0) && !empty($r->searchname)) {
88 88
                         $matched = false;
89 89
 
90
-                        if (! $matched && preg_match('/\bS(\d{1,2})E(\d{1,3})\b/i', $r->searchname, $m)) {
90
+                        if (!$matched && preg_match('/\bS(\d{1,2})E(\d{1,3})\b/i', $r->searchname, $m)) {
91 91
                             if (empty($r->series) || (int) $r->series === 0) {
92 92
                                 $r->series = (int) $m[1];
93 93
                             }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                             $matched = true;
98 98
                         }
99 99
 
100
-                        if (! $matched && preg_match('/\b(\d{1,2})x(\d{1,3})\b/i', $r->searchname, $m)) {
100
+                        if (!$matched && preg_match('/\b(\d{1,2})x(\d{1,3})\b/i', $r->searchname, $m)) {
101 101
                             if (empty($r->series) || (int) $r->series === 0) {
102 102
                                 $r->series = (int) $m[1];
103 103
                             }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
                             $matched = true;
108 108
                         }
109 109
 
110
-                        if (! $matched && preg_match('/\bSeason[\s._-]*(\d{1,2})[\s._-]*Episode[\s._-]*(\d{1,3})\b/i', $r->searchname, $m)) {
110
+                        if (!$matched && preg_match('/\bSeason[\s._-]*(\d{1,2})[\s._-]*Episode[\s._-]*(\d{1,3})\b/i', $r->searchname, $m)) {
111 111
                             if (empty($r->series) || (int) $r->series === 0) {
112 112
                                 $r->series = (int) $m[1];
113 113
                             }
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
                             $matched = true;
118 118
                         }
119 119
 
120
-                        if (! $matched && preg_match('/\b(\d)(0[1-9]|[1-9]\d)\b/', $r->searchname, $m)) {
120
+                        if (!$matched && preg_match('/\b(\d)(0[1-9]|[1-9]\d)\b/', $r->searchname, $m)) {
121 121
                             if ((empty($r->series) || (int) $r->series === 0) && (empty($r->episode) || (int) $r->episode === 0)) {
122 122
                                 $r->series = (int) $m[1];
123 123
                                 $r->episode = (int) $m[2];
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                             }
126 126
                         }
127 127
 
128
-                        if (! $matched && preg_match('/\b(\d{4})[._-](\d{2})[._-](\d{2})\b/', $r->searchname, $m)) {
128
+                        if (!$matched && preg_match('/\b(\d{4})[._-](\d{2})[._-](\d{2})\b/', $r->searchname, $m)) {
129 129
                             if (empty($r->series) || (int) $r->series === 0) {
130 130
                                 $r->series = (int) $m[1];
131 131
                             }
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
                             $matched = true;
136 136
                         }
137 137
 
138
-                        if (! $matched && preg_match('/\b(?:Part|Pt)[\s._-]*(\d{1,3})\b/i', $r->searchname, $m)) {
138
+                        if (!$matched && preg_match('/\b(?:Part|Pt)[\s._-]*(\d{1,3})\b/i', $r->searchname, $m)) {
139 139
                             if (empty($r->episode) || (int) $r->episode === 0) {
140 140
                                 $r->episode = (int) $m[1];
141 141
                                 if (empty($r->series) || (int) $r->series === 0) {
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
                             }
146 146
                         }
147 147
 
148
-                        if (! $matched && (empty($r->episode) || (int) $r->episode === 0) && preg_match('/\bEp?[\s._-]*(\d{1,3})\b/i', $r->searchname, $m)) {
148
+                        if (!$matched && (empty($r->episode) || (int) $r->episode === 0) && preg_match('/\bEp?[\s._-]*(\d{1,3})\b/i', $r->searchname, $m)) {
149 149
                             $r->episode = (int) $m[1];
150 150
                             if (empty($r->series) || (int) $r->series === 0) {
151 151
                                 $r->series = 1;
@@ -174,11 +174,11 @@  discard block
 block discarded – undo
174 174
                 $seriestitlesArray = $seriessummaryArray = $seriescountryArray = [];
175 175
                 $seriestitlesArray[] = $show['title'];
176 176
 
177
-                if (! empty($show['summary'])) {
177
+                if (!empty($show['summary'])) {
178 178
                     $seriessummaryArray[] = $show['summary'];
179 179
                 }
180 180
 
181
-                if (! empty($show['countries_id'])) {
181
+                if (!empty($show['countries_id'])) {
182 182
                     $seriescountryArray[] = $show['countries_id'];
183 183
                 }
184 184
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
             $totalSeasonsAired = 0;
199 199
             $totalEpisodesAired = 0;
200 200
 
201
-            if (! empty($show['id'])) {
201
+            if (!empty($show['id'])) {
202 202
                 $episodeStats = \App\Models\TvEpisode::query()
203 203
                     ->where('videos_id', $show['id'])
204 204
                     ->whereNotNull('firstaired')
@@ -207,10 +207,10 @@  discard block
 block discarded – undo
207 207
                     ->first();
208 208
 
209 209
                 if ($episodeStats) {
210
-                    if (! empty($episodeStats->first_aired) && $episodeStats->first_aired != '0000-00-00') {
210
+                    if (!empty($episodeStats->first_aired) && $episodeStats->first_aired != '0000-00-00') {
211 211
                         $firstEpisodeAired = \Carbon\Carbon::parse($episodeStats->first_aired);
212 212
                     }
213
-                    if (! empty($episodeStats->last_aired) && $episodeStats->last_aired != '0000-00-00') {
213
+                    if (!empty($episodeStats->last_aired) && $episodeStats->last_aired != '0000-00-00') {
214 214
                         $lastEpisodeAired = \Carbon\Carbon::parse($episodeStats->last_aired);
215 215
                     }
216 216
                     $totalSeasonsAired = $episodeStats->total_seasons ?? 0;
@@ -257,9 +257,9 @@  discard block
 block discarded – undo
257 257
         } else {
258 258
             $letter = ($id && preg_match('/^(0-9|[A-Z])$/i', $id)) ? $id : '0-9';
259 259
 
260
-            $showname = ($request->has('title') && ! empty($request->input('title'))) ? $request->input('title') : '';
260
+            $showname = ($request->has('title') && !empty($request->input('title'))) ? $request->input('title') : '';
261 261
 
262
-            if ($showname !== '' && ! $id) {
262
+            if ($showname !== '' && !$id) {
263 263
                 $letter = '';
264 264
             }
265 265
 
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
         $cacheKey = 'trending_tv_top_15_48h';
303 303
 
304 304
         // Get trending TV shows from cache or calculate (refresh every hour)
305
-        $trendingShows = \Illuminate\Support\Facades\Cache::remember($cacheKey, 3600, function () {
305
+        $trendingShows = \Illuminate\Support\Facades\Cache::remember($cacheKey, 3600, function() {
306 306
             // Calculate timestamp for 48 hours ago
307 307
             $fortyEightHoursAgo = \Illuminate\Support\Carbon::now()->subHours(48);
308 308
 
Please login to merge, or discard this patch.
app/Console/Commands/NntmuxResetTvShowPostProcessing.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         $bar->start();
63 63
 
64 64
         // Chunk through releases to avoid loading all models simultaneously
65
-        $baseQuery->chunkById(1000, function ($chunk) use ($bar) {
65
+        $baseQuery->chunkById(1000, function($chunk) use ($bar) {
66 66
             foreach ($chunk as $release) {
67 67
                 Release::query()->where('id', $release->id)->update([
68 68
                     // Reset association so TV pipeline picks them up again
Please login to merge, or discard this patch.
app/Providers/ForumServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     public function boot(): void
23 23
     {
24 24
         // Add global scope to eager load author with role for all post queries
25
-        Post::addGlobalScope('withAuthorRole', function (Builder $builder) {
25
+        Post::addGlobalScope('withAuthorRole', function(Builder $builder) {
26 26
             $builder->with(['author.role']);
27 27
         });
28 28
     }
Please login to merge, or discard this patch.
app/Services/ImdbScraper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             $res = $this->client->get($url);
43 43
             $html = (string) $res->getBody();
44 44
             $dom = HtmlDomParser::str_get_html($html);
45
-            if (! $dom) {
45
+            if (!$dom) {
46 46
                 Cache::put($cacheKey, false, now()->addHours(6));
47 47
 
48 48
                 return false;
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             // Plot
75 75
             $plot = '';
76 76
             $plotNode = $dom->findOne("span[data-testid='plot-l']");
77
-            if (! $plotNode) {
77
+            if (!$plotNode) {
78 78
                 $plotNode = $dom->findOne("span[data-testid='plot-xl']");
79 79
             }
80 80
             if ($plotNode) {
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
             $json = json_decode((string) $res->getBody(), true);
195 195
             $results = [];
196 196
             foreach (($json['d'] ?? []) as $row) {
197
-                if (! isset($row['id']) || ! str_starts_with($row['id'], 'tt')) {
197
+                if (!isset($row['id']) || !str_starts_with($row['id'], 'tt')) {
198 198
                     continue;
199 199
                 }
200 200
                 $id = substr($row['id'], 2);
Please login to merge, or discard this patch.
app/Console/Commands/FetchMovieByImdb.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         $normalized = preg_replace('/^tt/i', '', $normalized); // remove leading tt if present
27 27
         $imdbId = preg_replace('/\D/', '', $normalized); // keep digits only
28 28
 
29
-        if ($imdbId === '' || ! ctype_digit($imdbId) || strlen($imdbId) < 5) {
29
+        if ($imdbId === '' || !ctype_digit($imdbId) || strlen($imdbId) < 5) {
30 30
             $this->error('Invalid IMDb id provided: '.$raw.' (parsed: '.$imdbId.')');
31 31
 
32 32
             return self::FAILURE;
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
         $ok = $movie->updateMovieInfo($imdbId);
48 48
 
49
-        if (! $ok) {
49
+        if (!$ok) {
50 50
             $this->error('Failed to fetch/update movie data for tt'.$imdbId.'.');
51 51
 
52 52
             return self::FAILURE;
Please login to merge, or discard this patch.