Passed
Push — master ( 22fc87...ec513b )
by Darko
03:13
created
app/Http/Controllers/DetailsController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,11 +34,11 @@  discard block
 block discarded – undo
34 34
             $re = new ReleaseExtra;
35 35
             $data = Release::getByGuid($guid);
36 36
             $releaseRegex = '';
37
-            if (! empty($data)) {
37
+            if (!empty($data)) {
38 38
                 $releaseRegex = ReleaseRegex::query()->where('releases_id', '=', $data['id'])->first();
39 39
             }
40 40
 
41
-            if (! $data) {
41
+            if (!$data) {
42 42
                 return redirect()->back();
43 43
             }
44 44
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             if ($data['imdbid'] !== '' && $data['imdbid'] !== 0000000) {
65 65
                 $movie = new Movie(['Settings' => $this->settings]);
66 66
                 $mov = $movie->getMovieInfo($data['imdbid']);
67
-                if (! empty($mov['title'])) {
67
+                if (!empty($mov['title'])) {
68 68
                     $mov['title'] = str_replace(['/', '\\'], '', $mov['title']);
69 69
                     $mov['actors'] = makeFieldLinks($mov, 'actors', 'movies');
70 70
                     $mov['genre'] = makeFieldLinks($mov, 'genre', 'movies');
Please login to merge, or discard this patch.
app/Http/Controllers/MyShowsController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         switch ($action) {
27 27
             case 'delete':
28 28
                 $show = UserSerie::getShow($this->userdata->id, $videoId);
29
-                if (! $show) {
29
+                if (!$show) {
30 30
                     return redirect()->back();
31 31
                 }
32 32
 
@@ -46,12 +46,12 @@  discard block
 block discarded – undo
46 46
                 }
47 47
 
48 48
                 $show = Video::getByVideoID($videoId);
49
-                if (! $show) {
49
+                if (!$show) {
50 50
                     return redirect()->to('myshows');
51 51
                 }
52 52
 
53 53
                 if ($action === 'doadd') {
54
-                    $category = ($request->has('category') && \is_array($request->input('category')) && ! empty($request->input('category'))) ? $request->input('category') : [];
54
+                    $category = ($request->has('category') && \is_array($request->input('category')) && !empty($request->input('category'))) ? $request->input('category') : [];
55 55
                     UserSerie::addShow($this->userdata->id, $videoId, $category);
56 56
                     if ($request->has('from')) {
57 57
                         return redirect()->to($request->input('from'));
@@ -85,12 +85,12 @@  discard block
 block discarded – undo
85 85
             case 'doedit':
86 86
                 $show = UserSerie::getShow($this->userdata->id, $videoId);
87 87
 
88
-                if (! $show) {
88
+                if (!$show) {
89 89
                     return redirect()->to('myshows');
90 90
                 }
91 91
 
92 92
                 if ($action === 'doedit') {
93
-                    $category = ($request->has('category') && \is_array($request->input('category')) && ! empty($request->input('category'))) ? $request->input('category') : [];
93
+                    $category = ($request->has('category') && \is_array($request->input('category')) && !empty($request->input('category'))) ? $request->input('category') : [];
94 94
                     UserSerie::updateShow($this->userdata->id, $videoId, $category);
95 95
                     if ($request->has('from')) {
96 96
                         return redirect()->to($request->input('from'));
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
                 if ($shows !== null) {
137 137
                     foreach ($shows as $showk => $show) {
138 138
                         $showcats = explode('|', $show['categories']);
139
-                        if (\is_array($showcats) && ! empty($showcats)) {
139
+                        if (\is_array($showcats) && !empty($showcats)) {
140 140
                             foreach ($showcats as $scat) {
141
-                                if (! empty($scat)) {
141
+                                if (!empty($scat)) {
142 142
                                     $catArr[] = $categories[$scat];
143 143
                                 }
144 144
                             }
Please login to merge, or discard this patch.
app/Http/Controllers/BtcPaymentController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 
58 58
         if ($payload['type'] === 'InvoiceSettled') {
59 59
             // Check if we have the invoice_id in payments table and if we do, update the user account
60
-            $checkOrder = Payment::query()->where('invoice_id', '=', $payload['invoiceId'])->where('payment_status', '=', 'Settled')->where(function ($query) {
60
+            $checkOrder = Payment::query()->where('invoice_id', '=', $payload['invoiceId'])->where('payment_status', '=', 'Settled')->where(function($query) {
61 61
                 return $query->where('invoice_status', 'Pending')->orWhereNull('invoice_status');
62 62
             })->first();
63 63
             if ($checkOrder !== null) {
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
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
             }
35 35
 
36 36
             $res = User::getByRssToken($request->input('r'));
37
-            if (! $res) {
37
+            if (!$res) {
38 38
                 return Utility::showApiError(100);
39 39
             }
40 40
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             return Utility::showApiError(501);
53 53
         }
54 54
 
55
-        if (! $request->input('id')) {
55
+        if (!$request->input('id')) {
56 56
             return Utility::showApiError(200, 'Parameter id is required');
57 57
         }
58 58
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
         $nzbPath = (new NZB)->getNZBPath($request->input('id'));
88 88
 
89
-        if (! File::exists($nzbPath)) {
89
+        if (!File::exists($nzbPath)) {
90 90
             return Utility::showApiError(300, 'NZB file not found!');
91 91
         }
92 92
 
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
             'X-DNZB-Details' => url('/details/'.$request->input('id')),
114 114
         ];
115 115
 
116
-        if (! empty($relData['imdbid']) && $relData['imdbid'] > 0) {
116
+        if (!empty($relData['imdbid']) && $relData['imdbid'] > 0) {
117 117
             $headers['X-DNZB-MoreInfo'] = 'http://www.imdb.com/title/tt'.$relData['imdbid'];
118
-        } elseif (! empty($relData['tvdb']) && $relData['tvdb'] > 0) {
118
+        } elseif (!empty($relData['tvdb']) && $relData['tvdb'] > 0) {
119 119
             $headers['X-DNZB-MoreInfo'] = 'http://www.thetvdb.com/?tab=series&id='.$relData['tvdb'];
120 120
         }
121 121
 
@@ -130,15 +130,15 @@  discard block
 block discarded – undo
130 130
         $cleanName = str_replace([',', ' ', '/', '\\'], '_', $relData['searchname']);
131 131
 
132 132
         // Stream the file content
133
-        return response()->streamDownload(function () use ($nzbPath) {
133
+        return response()->streamDownload(function() use ($nzbPath) {
134 134
             $bufferSize = 1000000; // 1 MB chunks
135 135
             $gz = gzopen($nzbPath, 'rb');
136 136
 
137
-            if (! $gz) {
137
+            if (!$gz) {
138 138
                 throw new RuntimeException('Failed to open gzipped file for streaming.');
139 139
             }
140 140
 
141
-            while (! gzeof($gz)) {
141
+            while (!gzeof($gz)) {
142 142
                 echo gzread($gz, $bufferSize);
143 143
                 flush(); // Ensure chunks are sent immediately
144 144
             }
Please login to merge, or discard this patch.
app/Http/Controllers/Api/ApiController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         $releases = new Releases;
118 118
 
119 119
         // Set Query Parameters based on Request objects
120
-        $outputXML = ! ($request->has('o') && $request->input('o') === 'json');
120
+        $outputXML = !($request->has('o') && $request->input('o') === 'json');
121 121
         $minSize = $request->has('minsize') && $request->input('minsize') > 0 ? $request->input('minsize') : 0;
122 122
         $offset = $this->offset($request);
123 123
 
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 
259 259
                 $this->addCoverURL(
260 260
                     $relData,
261
-                    function ($release) {
261
+                    function($release) {
262 262
                         return Utility::getCoverURL(['type' => 'movies', 'id' => $release->imdbid]);
263 263
                     }
264 264
                 );
@@ -300,9 +300,9 @@  discard block
 block discarded – undo
300 300
 
301 301
                 if ($rel && $rel->isNotEmpty()) {
302 302
                     $data = ReleaseNfo::getReleaseNfo($rel->id);
303
-                    if (! empty($data)) {
303
+                    if (!empty($data)) {
304 304
                         if ($request->has('o') && $request->input('o') === 'file') {
305
-                            return response()->streamDownload(function () use ($data) {
305
+                            return response()->streamDownload(function() use ($data) {
306 306
                                 echo $data['nfo'];
307 307
                             }, $rel['searchname'].'.nfo', ['Content-type:' => 'application/octet-stream']);
308 308
                         }
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
             header('Content-type: text/xml');
345 345
         } else {
346 346
             // JSON encode the XMLWriter response
347
-            $response = json_encode(xml_to_array($response), JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT + JSON_UNESCAPED_SLASHES);
347
+            $response = json_encode(xml_to_array($response), JSON_THROW_ON_ERROR|JSON_PRETTY_PRINT + JSON_UNESCAPED_SLASHES);
348 348
             header('Content-type: application/json');
349 349
         }
350 350
         if ($response === false) {
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
                 'search' => ['available' => 'yes', 'supportedParams' => 'q'],
388 388
                 'tv-search' => ['available' => 'yes', 'supportedParams' => 'q,vid,tvdbid,traktid,rid,tvmazeid,imdbid,tmdbid,season,ep'],
389 389
                 'movie-search' => ['available' => 'yes', 'supportedParams' => 'q,imdbid, tmdbid, traktid'],
390
-                'audio-search' => ['available' => 'no',  'supportedParams' => ''],
390
+                'audio-search' => ['available' => 'no', 'supportedParams' => ''],
391 391
             ],
392 392
             'categories' => $this->type === 'caps'
393 393
                 ? Category::getForMenu()
@@ -402,9 +402,9 @@  discard block
 block discarded – undo
402 402
     {
403 403
         $maxAge = -1;
404 404
         if ($request->has('maxage')) {
405
-            if (! $request->filled('maxage')) {
405
+            if (!$request->filled('maxage')) {
406 406
                 return Utility::showApiError(201, 'Incorrect parameter (maxage must not be empty)');
407
-            } elseif (! is_numeric($request->input('maxage'))) {
407
+            } elseif (!is_numeric($request->input('maxage'))) {
408 408
                 return Utility::showApiError(201, 'Incorrect parameter (maxage must be numeric)');
409 409
             } else {
410 410
                 $maxAge = (int) $request->input('maxage');
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
         if ($request->has('cat')) {
424 424
             $categoryIDs = urldecode($request->input('cat'));
425 425
             // Append Web-DL category ID if HD present for SickBeard / Sonarr compatibility.
426
-            if (str_contains($categoryIDs, (string) Category::TV_HD) && ! str_contains($categoryIDs, (string) Category::TV_WEBDL) && (int) Settings::settingValue('catwebdl') === 0) {
426
+            if (str_contains($categoryIDs, (string) Category::TV_HD) && !str_contains($categoryIDs, (string) Category::TV_WEBDL) && (int) Settings::settingValue('catwebdl') === 0) {
427 427
                 $categoryIDs .= (','.Category::TV_WEBDL);
428 428
             }
429 429
             $categoryID = explode(',', $categoryIDs);
Please login to merge, or discard this patch.
app/Console/Commands/InstallNntmux.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
             }
54 54
         }
55 55
 
56
-        if (! $yesMode) {
57
-            if (! $this->confirm('Are you sure you want to install NNTmux? This will wipe your database!!')) {
56
+        if (!$yesMode) {
57
+            if (!$this->confirm('Are you sure you want to install NNTmux? This will wipe your database!!')) {
58 58
                 $this->info('Installation aborted by user.');
59 59
                 exit;
60 60
             }
@@ -97,33 +97,33 @@  discard block
 block discarded – undo
97 97
         $zip_path = config('nntmux_settings.tmp_unzip_path');
98 98
         $unrar_path = config('nntmux.tmp_unrar_path');
99 99
 
100
-        if (! File::isWritable($nzb_path)) {
100
+        if (!File::isWritable($nzb_path)) {
101 101
             $this->warn($nzb_path.' is not writable. Please fix folder permissions');
102 102
 
103 103
             return false;
104 104
         }
105 105
 
106
-        if (! file_exists($unrar_path)) {
106
+        if (!file_exists($unrar_path)) {
107 107
             $this->info('Creating missing '.$unrar_path.' folder');
108
-            if (! @File::makeDirectory($unrar_path) && ! File::isDirectory($unrar_path)) {
108
+            if (!@File::makeDirectory($unrar_path) && !File::isDirectory($unrar_path)) {
109 109
                 throw new \RuntimeException('Unable to create '.$unrar_path.' folder');
110 110
             }
111 111
             $this->info('Folder '.$unrar_path.' successfully created');
112 112
         }
113 113
 
114
-        if (! is_writable($unrar_path)) {
114
+        if (!is_writable($unrar_path)) {
115 115
             $this->warn($unrar_path.' is not writable. Please fix folder permissions');
116 116
 
117 117
             return false;
118 118
         }
119 119
 
120
-        if (! File::isWritable($covers_path)) {
120
+        if (!File::isWritable($covers_path)) {
121 121
             $this->warn($covers_path.' is not writable. Please fix folder permissions');
122 122
 
123 123
             return false;
124 124
         }
125 125
 
126
-        if (! File::isWritable($zip_path)) {
126
+        if (!File::isWritable($zip_path)) {
127 127
             $this->warn($zip_path.' is not writable. Please fix folder permissions');
128 128
 
129 129
             return false;
Please login to merge, or discard this patch.
Blacklight/Releases.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 				GROUP BY r.id
276 276
 				ORDER BY %s %s %s",
277 277
             $this->uSQL($userShows, 'videos_id'),
278
-            (! empty($excludedCats) ? ' AND r.categories_id NOT IN ('.implode(',', $excludedCats).')' : ''),
278
+            (!empty($excludedCats) ? ' AND r.categories_id NOT IN ('.implode(',', $excludedCats).')' : ''),
279 279
             NZB::NZB_ADDED,
280 280
             Category::TV_ROOT,
281 281
             Category::TV_OTHER,
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
     {
346 346
         // Delete NZB from disk.
347 347
         $nzbPath = $nzb->NZBPath($identifiers['g']);
348
-        if (! empty($nzbPath)) {
348
+        if (!empty($nzbPath)) {
349 349
             File::delete($nzbPath);
350 350
         }
351 351
 
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
      */
386 386
     public function updateMulti($guids, $category, $grabs, $videoId, $episodeId, $anidbId, $imdbId)
387 387
     {
388
-        if (! \is_array($guids) || \count($guids) < 1) {
388
+        if (!\is_array($guids) || \count($guids) < 1) {
389 389
             return false;
390 390
         }
391 391
 
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
         $sql = '(1=2 ';
410 410
         foreach ($userQuery as $query) {
411 411
             $sql .= sprintf('OR (r.%s = %d', $type, $query->$type);
412
-            if (! empty($query->categories)) {
412
+            if (!empty($query->categories)) {
413 413
                 $catsArr = explode('|', $query->categories);
414 414
                 if (\count($catsArr) > 1) {
415 415
                     $sql .= sprintf(' AND r.categories_id IN (%s)', implode(',', $catsArr));
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
             $orderBy = $this->getBrowseOrder($orderBy);
454 454
         }
455 455
 
456
-        $searchFields = Arr::where($searchArr, static function ($value) {
456
+        $searchFields = Arr::where($searchArr, static function($value) {
457 457
             return $value !== -1;
458 458
         });
459 459
 
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
             $searchResult = $this->elasticSearch->indexSearch($phrases, $limit);
464 464
         } else {
465 465
             $searchResult = $this->manticoreSearch->searchIndexes('releases_rt', '', [], $searchFields);
466
-            if (! empty($searchResult)) {
466
+            if (!empty($searchResult)) {
467 467
                 $searchResult = Arr::wrap(Arr::get($searchResult, 'id'));
468 468
             }
469 469
         }
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
                 $searchResult = $this->elasticSearch->indexSearchApi($searchName, $limit);
555 555
             } else {
556 556
                 $searchResult = $this->manticoreSearch->searchIndexes('releases_rt', $searchName, ['searchname']);
557
-                if (! empty($searchResult)) {
557
+                if (!empty($searchResult)) {
558 558
                     $searchResult = Arr::wrap(Arr::get($searchResult, 'id'));
559 559
                 }
560 560
             }
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
             ((int) $groupName !== -1 ? sprintf(' AND r.groups_id = %d ', UsenetGroup::getIDByName($groupName)) : ''),
571 571
             $catQuery,
572 572
             (\count($excludedCats) > 0 ? ' AND r.categories_id NOT IN ('.implode(',', $excludedCats).')' : ''),
573
-            (! empty($searchResult) ? 'AND r.id IN ('.implode(',', $searchResult).')' : ''),
573
+            (!empty($searchResult) ? 'AND r.id IN ('.implode(',', $searchResult).')' : ''),
574 574
             ($minSize > 0 ? sprintf('AND r.size >= %d', $minSize) : '')
575 575
         );
576 576
         $baseSql = sprintf(
@@ -604,7 +604,7 @@  discard block
 block discarded – undo
604 604
         if ($releases !== null) {
605 605
             return $releases;
606 606
         }
607
-        if ($searchName !== -1 && ! empty($searchResult)) {
607
+        if ($searchName !== -1 && !empty($searchResult)) {
608 608
             $releases = self::fromQuery($sql);
609 609
         } elseif ($searchName !== -1 && empty($searchResult)) {
610 610
             $releases = collect();
@@ -659,11 +659,11 @@  discard block
 block discarded – undo
659 659
             $show = self::fromQuery($showQry);
660 660
 
661 661
             if ($show->isNotEmpty()) {
662
-                if ((! empty($episode) && ! empty($series)) && $show[0]->episodes !== '') {
662
+                if ((!empty($episode) && !empty($series)) && $show[0]->episodes !== '') {
663 663
                     $showSql .= ' AND r.tv_episodes_id IN ('.$show[0]->episodes.') AND tve.series = '.$series;
664
-                } elseif (! empty($episode) && $show[0]->episodes !== '') {
664
+                } elseif (!empty($episode) && $show[0]->episodes !== '') {
665 665
                     $showSql = sprintf('AND r.tv_episodes_id IN (%s)', $show[0]->episodes);
666
-                } elseif (! empty($series) && empty($episode)) {
666
+                } elseif (!empty($series) && empty($episode)) {
667 667
                     // If $series is set but episode is not, return Season Packs and Episodes
668 668
                     $showSql .= ' AND r.tv_episodes_id IN ('.$show[0]->episodes.') AND tve.series = '.$series;
669 669
                 }
@@ -677,26 +677,26 @@  discard block
 block discarded – undo
677 677
         }
678 678
 
679 679
         // If $name is set it is a fallback search, add available SxxExx/airdate info to the query
680
-        if (! empty($name) && $showSql === '') {
681
-            if (! empty($series) && (int) $series < 1900) {
680
+        if (!empty($name) && $showSql === '') {
681
+            if (!empty($series) && (int) $series < 1900) {
682 682
                 $name .= sprintf(' S%s', str_pad($series, 2, '0', STR_PAD_LEFT));
683
-                if (! empty($episode) && ! str_contains($episode, '/')) {
683
+                if (!empty($episode) && !str_contains($episode, '/')) {
684 684
                     $name .= sprintf('E%s', str_pad($episode, 2, '0', STR_PAD_LEFT));
685 685
                 }
686 686
                 // If season is not empty but episode is, add a wildcard to the search
687 687
                 if (empty($episode)) {
688 688
                     $name .= '*';
689 689
                 }
690
-            } elseif (! empty($airDate)) {
690
+            } elseif (!empty($airDate)) {
691 691
                 $name .= sprintf(' %s', str_replace(['/', '-', '.', '_'], ' ', $airDate));
692 692
             }
693 693
         }
694
-        if (! empty($name)) {
694
+        if (!empty($name)) {
695 695
             if (config('nntmux.elasticsearch_enabled') === true) {
696 696
                 $searchResult = $this->elasticSearch->indexSearchTMA($name, $limit);
697 697
             } else {
698 698
                 $searchResult = $this->manticoreSearch->searchIndexes('releases_rt', $name, ['searchname']);
699
-                if (! empty($searchResult)) {
699
+                if (!empty($searchResult)) {
700 700
                     $searchResult = Arr::wrap(Arr::get($searchResult, 'id'));
701 701
                 }
702 702
             }
@@ -712,11 +712,11 @@  discard block
 block discarded – undo
712 712
             NZB::NZB_ADDED,
713 713
             $this->showPasswords(),
714 714
             $showSql,
715
-            (! empty($name) && ! empty($searchResult)) ? 'AND r.id IN ('.implode(',', $searchResult).')' : '',
715
+            (!empty($name) && !empty($searchResult)) ? 'AND r.id IN ('.implode(',', $searchResult).')' : '',
716 716
             Category::getCategorySearch($cat, 'tv'),
717 717
             $maxAge > 0 ? sprintf('AND r.postdate > NOW() - INTERVAL %d DAY', $maxAge) : '',
718 718
             $minSize > 0 ? sprintf('AND r.size >= %d', $minSize) : '',
719
-            ! empty($excludedCategories) ? sprintf('AND r.categories_id NOT IN('.implode(',', $excludedCategories).')') : ''
719
+            !empty($excludedCategories) ? sprintf('AND r.categories_id NOT IN('.implode(',', $excludedCategories).')') : ''
720 720
         );
721 721
         $baseSql = sprintf(
722 722
             "SELECT r.searchname, r.guid, r.postdate, r.groups_id, r.categories_id, r.size, r.totalpart, r.fromname, r.passwordstatus, r.grabs, r.comments, r.adddate, r.videos_id, r.tv_episodes_id, r.haspreview, r.jpgstatus,
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
         if ($releases !== null) {
753 753
             return $releases;
754 754
         }
755
-        $releases = ((! empty($name) && ! empty($searchResult)) || empty($name)) ? self::fromQuery($sql) : [];
755
+        $releases = ((!empty($name) && !empty($searchResult)) || empty($name)) ? self::fromQuery($sql) : [];
756 756
         if (count($releases) !== 0 && $releases->isNotEmpty()) {
757 757
             $releases[0]->_totalrows = $this->getPagerCount(
758 758
                 preg_replace('#LEFT(\s+OUTER)?\s+JOIN\s+(?!tv_episodes)\s+.*ON.*=.*\n#i', ' ', $baseSql)
@@ -800,11 +800,11 @@  discard block
 block discarded – undo
800 800
 
801 801
             $show = self::fromQuery($showQry);
802 802
             if ($show->isNotEmpty()) {
803
-                if ((! empty($episode) && ! empty($series)) && $show[0]->episodes !== '') {
803
+                if ((!empty($episode) && !empty($series)) && $show[0]->episodes !== '') {
804 804
                     $showSql .= ' AND r.tv_episodes_id IN ('.$show[0]->episodes.') AND tve.series = '.$series;
805
-                } elseif (! empty($episode) && $show[0]->episodes !== '') {
805
+                } elseif (!empty($episode) && $show[0]->episodes !== '') {
806 806
                     $showSql = sprintf('AND r.tv_episodes_id IN (%s)', $show[0]->episodes);
807
-                } elseif (! empty($series) && empty($episode)) {
807
+                } elseif (!empty($series) && empty($episode)) {
808 808
                     // If $series is set but episode is not, return Season Packs and Episodes
809 809
                     $showSql .= ' AND r.tv_episodes_id IN ('.$show[0]->episodes.') AND tve.series = '.$series;
810 810
                 }
@@ -817,26 +817,26 @@  discard block
 block discarded – undo
817 817
             }
818 818
         }
819 819
         // If $name is set it is a fallback search, add available SxxExx/airdate info to the query
820
-        if (! empty($name) && $showSql === '') {
821
-            if (! empty($series) && (int) $series < 1900) {
820
+        if (!empty($name) && $showSql === '') {
821
+            if (!empty($series) && (int) $series < 1900) {
822 822
                 $name .= sprintf(' S%s', str_pad($series, 2, '0', STR_PAD_LEFT));
823
-                if (! empty($episode) && ! str_contains($episode, '/')) {
823
+                if (!empty($episode) && !str_contains($episode, '/')) {
824 824
                     $name .= sprintf('E%s', str_pad($episode, 2, '0', STR_PAD_LEFT));
825 825
                 }
826 826
                 // If season is not empty but episode is, add a wildcard to the search
827 827
                 if (empty($episode)) {
828 828
                     $name .= '*';
829 829
                 }
830
-            } elseif (! empty($airDate)) {
830
+            } elseif (!empty($airDate)) {
831 831
                 $name .= sprintf(' %s', str_replace(['/', '-', '.', '_'], ' ', $airDate));
832 832
             }
833 833
         }
834
-        if (! empty($name)) {
834
+        if (!empty($name)) {
835 835
             if (config('nntmux.elasticsearch_enabled') === true) {
836 836
                 $searchResult = $this->elasticSearch->indexSearchTMA($name, $limit);
837 837
             } else {
838 838
                 $searchResult = $this->manticoreSearch->searchIndexes('releases_rt', $name, ['searchname']);
839
-                if (! empty($searchResult)) {
839
+                if (!empty($searchResult)) {
840 840
                     $searchResult = Arr::wrap(Arr::get($searchResult, 'id'));
841 841
                 }
842 842
             }
@@ -852,11 +852,11 @@  discard block
 block discarded – undo
852 852
             NZB::NZB_ADDED,
853 853
             $this->showPasswords(),
854 854
             $showSql,
855
-            (! empty($searchResult) ? 'AND r.id IN ('.implode(',', $searchResult).')' : ''),
855
+            (!empty($searchResult) ? 'AND r.id IN ('.implode(',', $searchResult).')' : ''),
856 856
             Category::getCategorySearch($cat, 'tv'),
857 857
             ($maxAge > 0 ? sprintf('AND r.postdate > NOW() - INTERVAL %d DAY', $maxAge) : ''),
858 858
             ($minSize > 0 ? sprintf('AND r.size >= %d', $minSize) : ''),
859
-            ! empty($excludedCategories) ? sprintf('AND r.categories_id NOT IN('.implode(',', $excludedCategories).')') : ''
859
+            !empty($excludedCategories) ? sprintf('AND r.categories_id NOT IN('.implode(',', $excludedCategories).')') : ''
860 860
         );
861 861
         $baseSql = sprintf(
862 862
             "SELECT r.searchname, r.guid, r.postdate, r.groups_id, r.categories_id, r.size, r.totalpart, r.fromname, r.passwordstatus, r.grabs, r.comments, r.adddate, r.tv_episodes_id, r.haspreview, r.jpgstatus,
@@ -906,12 +906,12 @@  discard block
 block discarded – undo
906 906
      */
907 907
     public function animeSearch($aniDbID, int $offset = 0, int $limit = 100, string $name = '', array $cat = [-1], int $maxAge = -1, array $excludedCategories = []): mixed
908 908
     {
909
-        if (! empty($name)) {
909
+        if (!empty($name)) {
910 910
             if (config('nntmux.elasticsearch_enabled') === true) {
911 911
                 $searchResult = $this->elasticSearch->indexSearchTMA($name, $limit);
912 912
             } else {
913 913
                 $searchResult = $this->manticoreSearch->searchIndexes('releases_rt', $name, ['searchname']);
914
-                if (! empty($searchResult)) {
914
+                if (!empty($searchResult)) {
915 915
                     $searchResult = Arr::wrap(Arr::get($searchResult, 'id'));
916 916
                 }
917 917
             }
@@ -928,8 +928,8 @@  discard block
 block discarded – undo
928 928
             $this->showPasswords(),
929 929
             NZB::NZB_ADDED,
930 930
             ($aniDbID > -1 ? sprintf(' AND r.anidbid = %d ', $aniDbID) : ''),
931
-            (! empty($searchResult) ? 'AND r.id IN ('.implode(',', $searchResult).')' : ''),
932
-            ! empty($excludedCategories) ? sprintf('AND r.categories_id NOT IN('.implode(',', $excludedCategories).')') : '',
931
+            (!empty($searchResult) ? 'AND r.id IN ('.implode(',', $searchResult).')' : ''),
932
+            !empty($excludedCategories) ? sprintf('AND r.categories_id NOT IN('.implode(',', $excludedCategories).')') : '',
933 933
             Category::getCategorySearch($cat),
934 934
             ($maxAge > 0 ? sprintf(' AND r.postdate > NOW() - INTERVAL %d DAY ', $maxAge) : '')
935 935
         );
@@ -976,12 +976,12 @@  discard block
 block discarded – undo
976 976
      */
977 977
     public function moviesSearch(int $imDbId = -1, int $tmDbId = -1, int $traktId = -1, int $offset = 0, int $limit = 100, string $name = '', array $cat = [-1], int $maxAge = -1, int $minSize = 0, array $excludedCategories = []): mixed
978 978
     {
979
-        if (! empty($name)) {
979
+        if (!empty($name)) {
980 980
             if (config('nntmux.elasticsearch_enabled') === true) {
981 981
                 $searchResult = $this->elasticSearch->indexSearchTMA($name, $limit);
982 982
             } else {
983 983
                 $searchResult = $this->manticoreSearch->searchIndexes('releases_rt', $name, ['searchname']);
984
-                if (! empty($searchResult)) {
984
+                if (!empty($searchResult)) {
985 985
                     $searchResult = Arr::wrap(Arr::get($searchResult, 'id'));
986 986
                 }
987 987
             }
@@ -998,11 +998,11 @@  discard block
 block discarded – undo
998 998
 			%s %s %s %s %s %s %s',
999 999
             NZB::NZB_ADDED,
1000 1000
             $this->showPasswords(),
1001
-            (! empty($searchResult) ? 'AND r.id IN ('.implode(',', $searchResult).')' : ''),
1001
+            (!empty($searchResult) ? 'AND r.id IN ('.implode(',', $searchResult).')' : ''),
1002 1002
             ($imDbId !== -1 && is_numeric($imDbId)) ? sprintf(' AND m.imdbid = \'%s\' ', $imDbId) : '',
1003 1003
             ($tmDbId !== -1 && is_numeric($tmDbId)) ? sprintf(' AND m.tmdbid = %d ', $tmDbId) : '',
1004 1004
             ($traktId !== -1 && is_numeric($traktId)) ? sprintf(' AND m.traktid = %d ', $traktId) : '',
1005
-            ! empty($excludedCategories) ? sprintf('AND r.categories_id NOT IN('.implode(',', $excludedCategories).')') : '',
1005
+            !empty($excludedCategories) ? sprintf('AND r.categories_id NOT IN('.implode(',', $excludedCategories).')') : '',
1006 1006
             Category::getCategorySearch($cat, 'movies'),
1007 1007
             $maxAge > 0 ? sprintf(' AND r.postdate > NOW() - INTERVAL %d DAY ', $maxAge) : '',
1008 1008
             $minSize > 0 ? sprintf('AND r.size >= %d', $minSize) : ''
@@ -1058,7 +1058,7 @@  discard block
 block discarded – undo
1058 1058
             }
1059 1059
 
1060 1060
             $results = $this->search(['searchname' => getSimilarName($name)], -1, '', '', -1, -1, 0, config('nntmux.items_per_page'), '', -1, $excludedCats, 'basic', [$parentCat]);
1061
-            if (! $results) {
1061
+            if (!$results) {
1062 1062
                 return $ret;
1063 1063
             }
1064 1064
 
Please login to merge, or discard this patch.
app/Models/Release.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     public static function updateRelease($id, $name, $searchName, $fromName, $categoryId, $parts, $grabs, $size, $postedDate, $addedDate, $videoId, $episodeId, $imDbId, $aniDbId): void
145 145
     {
146 146
         $movieInfoId = null;
147
-        if (! empty($imDbId)) {
147
+        if (!empty($imDbId)) {
148 148
             $movieInfoId = MovieInfo::whereImdbid($imDbId)->first(['id']);
149 149
         }
150 150
         self::whereId($id)->update(
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 
338 338
         $releases = $query->get();
339 339
 
340
-        $releases->each(function ($release) {
340
+        $releases->each(function($release) {
341 341
             $release->group_name = $release->group->name ?? null;
342 342
             $release->showtitle = $release->video->title ?? null;
343 343
             $release->tvdb = $release->video->tvdb ?? null;
@@ -389,12 +389,12 @@  discard block
 block discarded – undo
389 389
 
390 390
         preg_match('/(^\w+[-_. ].+?\.(\d+p)).+/i', $rel['searchname'], $similar);
391 391
 
392
-        if (! empty($similar)) {
392
+        if (!empty($similar)) {
393 393
             if (config('nntmux.elasticsearch_enabled') === true) {
394 394
                 $searchResult = (new ElasticSearchSiteSearch)->indexSearch($similar[1], 10);
395 395
             } else {
396 396
                 $searchResult = (new ManticoreSearch)->searchIndexes('releases_rt', $similar[1]);
397
-                if (! empty($searchResult)) {
397
+                if (!empty($searchResult)) {
398 398
                     $searchResult = Arr::wrap(Arr::get($searchResult, 'id'));
399 399
                 }
400 400
             }
Please login to merge, or discard this patch.
Blacklight/Categorize.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     public function isTV(): bool
102 102
     {
103 103
         if (preg_match('/Daily[\-_\.]Show|Nightly News|^\[[a-zA-Z\.\-]+\].*[\-_].*\d{1,3}[\-_. ](([\[\(])(h264-)?\d{3,4}([pi])([\]\)])\s?(\[AAC\])?|\[[a-fA-F0-9]{8}\]|(8|10)BIT|hi10p)(\[[a-fA-F0-9]{8}\])?|(\d\d-){2}[12]\d{3}|[12]\d{3}(\.\d\d){2}|\d+x\d+|\.e\d{1,3}\.|s\d{1,4}[._ -]?[ed]\d{1,3}([ex]\d{1,3}|[\-.\w ])|[._ -](\dx\d\d|C4TV|Complete[._ -]Season|DSR|([DHPS])DTV|EP[._ -]?\d{1,3}|S\d{1,3}.+Extras|SUBPACK|Season[._ -]\d{1,2})([._ -]|$)|TVRIP|TV[._ -](19|20)\d\d|Troll(HD|UHD)/i', $this->releaseName)
104
-            && ! preg_match('/[._ -](flac|imageset|mp3|xxx)[._ -]|[ .]exe$/i', $this->releaseName)) {
104
+            && !preg_match('/[._ -](flac|imageset|mp3|xxx)[._ -]|[ .]exe$/i', $this->releaseName)) {
105 105
             switch (true) {
106 106
                 case $this->isOtherTV():
107 107
                 case $this->categorizeForeign && $this->isForeignTV():
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     {
139 139
         if (preg_match('/[._ -]S\d{1,3}.+(EP\d{1,3}|Extras|SUBPACK)[._ -]|News/i', $this->releaseName)
140 140
             // special case for "Have.I.Got.News.For.You" tv show
141
-            && ! preg_match('/[._ -]Got[._ -]News[._ -]For[._ -]You/i', $this->releaseName)
141
+            && !preg_match('/[._ -]Got[._ -]News[._ -]For[._ -]You/i', $this->releaseName)
142 142
         ) {
143 143
             $this->tmpCat = Category::TV_OTHER;
144 144
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 
226 226
             return true;
227 227
         }
228
-        if (! $this->catWebDL && preg_match('/web[._ -]dl|web-?rip/i', $this->releaseName)) {
228
+        if (!$this->catWebDL && preg_match('/web[._ -]dl|web-?rip/i', $this->releaseName)) {
229 229
             $this->tmpCat = Category::TV_HD;
230 230
 
231 231
             return true;
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 
286 286
     public function isMovie(): bool
287 287
     {
288
-        if (preg_match('/[._ -]AVC|[BH][DR]RIP|(Bluray|Blu-Ray)|BD[._ -]?(25|50)?|\bBR\b|Camrip|[._ -]\d{4}[._ -].+(720p|1080p|Cam|HDTS|2160p)|DIVX|[._ -]DVD[._ -]|DVD-?(5|9|R|Rip)|Untouched|VHSRip|XVID|[._ -](DTS|TVrip|webrip|WEBDL|WEB-DL)[._ -]|\b(2160)p\b.*\b(Netflix|Amazon|NF|AMZN|Disney)\b/i', $this->releaseName) && ! preg_match('/s\d{1,3}[._ -]?[ed]\d{1,3}|auto(cad|desk)|divx[._ -]plus|[._ -]exe$|[._ -](jav|XXX)[._ -]|SWE6RUS|\wXXX(1080p|720p|DVD)|Xilisoft|\.S[0-9]\d{1,3}\./i', $this->releaseName)) {
288
+        if (preg_match('/[._ -]AVC|[BH][DR]RIP|(Bluray|Blu-Ray)|BD[._ -]?(25|50)?|\bBR\b|Camrip|[._ -]\d{4}[._ -].+(720p|1080p|Cam|HDTS|2160p)|DIVX|[._ -]DVD[._ -]|DVD-?(5|9|R|Rip)|Untouched|VHSRip|XVID|[._ -](DTS|TVrip|webrip|WEBDL|WEB-DL)[._ -]|\b(2160)p\b.*\b(Netflix|Amazon|NF|AMZN|Disney)\b/i', $this->releaseName) && !preg_match('/s\d{1,3}[._ -]?[ed]\d{1,3}|auto(cad|desk)|divx[._ -]plus|[._ -]exe$|[._ -](jav|XXX)[._ -]|SWE6RUS|\wXXX(1080p|720p|DVD)|Xilisoft|\.S[0-9]\d{1,3}\./i', $this->releaseName)) {
289 289
             return match (true) {
290 290
                 $this->categorizeForeign && $this->isMovieForeign(), $this->isMovieDVD(), $this->isMovieX265(), $this->isMovieUHD(), $this->catWebDL && $this->isMovieWEBDL(), $this->isMovieSD(), $this->isMovie3D(), $this->isMovieBluRay(), $this->isMovieHD(), $this->isMovieOther() => true,
291 291
                 default => false,
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
     public function isMovieBluRay(): bool
346 346
     {
347 347
         if (preg_match('/bluray-|[._ -]bd?[._ -]?(25|50)|blu-ray|Bluray\s-\sUntouched|[._ -]untouched[._ -]/i', $this->releaseName)
348
-            && ! preg_match('/SecretUsenet\.com$/i', $this->releaseName)) {
348
+            && !preg_match('/SecretUsenet\.com$/i', $this->releaseName)) {
349 349
             $this->tmpCat = Category::MOVIE_BLURAY;
350 350
 
351 351
             return true;
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
 
373 373
     public function isMovieUHD(): bool
374 374
     {
375
-        if (! preg_match('/(S\d+).*(2160p).*(Netflix|Amazon).*(TrollUHD|NTb|VLAD)/i', $this->releaseName) && stripos($this->releaseName, '2160p') !== false) {
375
+        if (!preg_match('/(S\d+).*(2160p).*(Netflix|Amazon).*(TrollUHD|NTb|VLAD)/i', $this->releaseName) && stripos($this->releaseName, '2160p') !== false) {
376 376
             $this->tmpCat = Category::MOVIE_UHD;
377 377
 
378 378
             return true;
@@ -501,7 +501,7 @@  discard block
 block discarded – undo
501 501
     public function isXxx(): bool
502 502
     {
503 503
         switch (true) {
504
-            case ! preg_match('/\bXXX\b|(a\.b\.erotica|ClubSeventeen|Cum(ming|shot)|Err?oticax?|Porn(o|lation)?|Imageset|PICTURESET|JAV Uncensored|lesb(ians?|os?)|mastur(bation|e?bate)|My_Stepfather_Made_Me|nympho?|OLDER ANGELS|pictures\.erotica\.anime|sexontv|slut|Squirt|SWE6RUS|Transsexual|whore)/i', $this->releaseName):
504
+            case !preg_match('/\bXXX\b|(a\.b\.erotica|ClubSeventeen|Cum(ming|shot)|Err?oticax?|Porn(o|lation)?|Imageset|PICTURESET|JAV Uncensored|lesb(ians?|os?)|mastur(bation|e?bate)|My_Stepfather_Made_Me|nympho?|OLDER ANGELS|pictures\.erotica\.anime|sexontv|slut|Squirt|SWE6RUS|Transsexual|whore)/i', $this->releaseName):
505 505
                 return false;
506 506
             case $this->isXxxPack():
507 507
             case $this->isXxxClipSD():
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
 
528 528
     public function isXxx264(): bool
529 529
     {
530
-        if (preg_match('/720p|1080(hd|[ip])|[xh][^a-z0-9]?264/i', $this->releaseName) && ! preg_match('/\bwmv\b/i', $this->releaseName) && stripos($this->releaseName, 'SDX264XXX') === false) {
530
+        if (preg_match('/720p|1080(hd|[ip])|[xh][^a-z0-9]?264/i', $this->releaseName) && !preg_match('/\bwmv\b/i', $this->releaseName) && stripos($this->releaseName, 'SDX264XXX') === false) {
531 531
             $this->tmpCat = Category::XXX_X264;
532 532
 
533 533
             return true;
@@ -718,7 +718,7 @@  discard block
 block discarded – undo
718 718
 
719 719
     public function isGame3DS(): bool
720 720
     {
721
-        if (preg_match('/\b3DS\b[^max]|[\._-]3ds|nintendo.+3ds|[_\.]3DS-/i', $this->releaseName) && ! preg_match('/3ds max/i', $this->releaseName) && preg_match('/(EUR|FR|GAME|HOL|JP|JPN|NL|NTSC|PAL|KS|USA|ASIA)/i', $this->releaseName)) {
721
+        if (preg_match('/\b3DS\b[^max]|[\._-]3ds|nintendo.+3ds|[_\.]3DS-/i', $this->releaseName) && !preg_match('/3ds max/i', $this->releaseName) && preg_match('/(EUR|FR|GAME|HOL|JP|JPN|NL|NTSC|PAL|KS|USA|ASIA)/i', $this->releaseName)) {
722 722
             $this->tmpCat = Category::GAME_3DS;
723 723
 
724 724
             return true;
@@ -921,7 +921,7 @@  discard block
 block discarded – undo
921 921
     public function isMusic(): bool
922 922
     {
923 923
         return match (true) {
924
-            $this->isMusicVideo(), $this->isAudiobook(), $this->isMusicLossless(), $this->isMusicMP3(), $this->isMusicPodcast(),$this->isMusicOther() => true,
924
+            $this->isMusicVideo(), $this->isAudiobook(), $this->isMusicLossless(), $this->isMusicMP3(), $this->isMusicPodcast(), $this->isMusicOther() => true,
925 925
             default => false,
926 926
         };
927 927
     }
@@ -1009,7 +1009,7 @@  discard block
 block discarded – undo
1009 1009
     public function isMusicOther(): bool
1010 1010
     {
1011 1011
         if (preg_match('/(19|20)\d\d\-(C4)$|[._ -]\d?CD[._ -](19|20)\d\d|\(\d\-?CD\)|\-\dcd\-|\d[._ -]Albums|Albums.+(EP)|Bonus.+Tracks|Box.+?CD.+SET|Discography|D\.O\.M|Greatest\sSongs|Live.+(Bootleg|Remastered)|Music.+Vol|([\(\[\s])NMR([\)\]\s])|Promo.+CD|Reggaeton|Tiesto.+Club|Vinyl\s2496|\WV\.A\.|^\(VA\s|^VA[._ -]/i', $this->releaseName)) {
1012
-            if (! $this->isMusicForeign()) {
1012
+            if (!$this->isMusicForeign()) {
1013 1013
                 $this->tmpCat = Category::MUSIC_OTHER;
1014 1014
             }
1015 1015
 
@@ -1060,7 +1060,7 @@  discard block
 block discarded – undo
1060 1060
     public function isComic(): bool
1061 1061
     {
1062 1062
         switch (true) {
1063
-            case ! preg_match('/[\. ](cbr|cbz)|[\( ]c2c|cbr|cbz[\) ]|comix|^\(comic|[\.\-_\(\[ ]comics?[._ -]|comic.+book|covers.+digital|DC.+(Adventures|Universe)|digital.+(son|zone)|Graphic.+Novel|[\.\-_h ]manga|Total[._ -]Marvel/i', $this->releaseName):
1063
+            case !preg_match('/[\. ](cbr|cbz)|[\( ]c2c|cbr|cbz[\) ]|comix|^\(comic|[\.\-_\(\[ ]comics?[._ -]|comic.+book|covers.+digital|DC.+(Adventures|Universe)|digital.+(son|zone)|Graphic.+Novel|[\.\-_h ]manga|Total[._ -]Marvel/i', $this->releaseName):
1064 1064
                 return false;
1065 1065
             case $this->isBookForeign():
1066 1066
                 break;
@@ -1075,7 +1075,7 @@  discard block
 block discarded – undo
1075 1075
     public function isTechnicalBook(): bool
1076 1076
     {
1077 1077
         switch (true) {
1078
-            case ! preg_match('/^\(?(atz|bb|css|c ?t|Drawing|Gabler|IOS|Iphone|Lynda|Manning|Medic(al|ine)|MIT|No[._ -]Starch|Packt|Peachpit|Pragmatic|Revista|Servo|SmartBooks|Spektrum|Strata|Sybex|Syngress|Vieweg|Wiley|Woods|Wrox)[._ -]|[._ -](Ajax|CSS|DIY|Javascript|(My|Postgre)?SQL|XNA)[._ -]|3DS\.\-_ ]Max|Academic|Adobe|Algebra|Analysis|Appleworks|Archaeology|Bitdefender|Birkhauser|Britannica|[._ -]C\+\+|C[._ -](\+\+|Sharp|Plus)|Chemistry|Circuits|Cook(book|ing)|(Beginners?|Complete|Communications|Definitive|Essential|Hackers?|Practical|Professionals?)[._ -]Guide|Developer|Diagnostic|Disassembl(er|ing|y)|Debugg(er|ing)|Dreamweaver|Economics|Education|Electronics|Enc([iy])clopedia|Engineer(ing|s)|Essays|Exercizes|For.+Beginners|Focal[._ -]Press|For[._ -]Dummies|FreeBSD|Fundamentals[._ -]of[._ -]|(Galileo|Island)[._ -]Press|Geography|Grammar|Guide[._ -](For|To)|Hacking|Google|Handboo?k|How[._ -](It|To)|Intoduction[._ -]to|Iphone|jQuery|Lessons[._ -]In|Learning|LibreOffice|Linux|Manual|Marketing|Masonry|Mathematic(al|s)?|Medical|Microsoft|National[._ -]Academies|Nero[._ -]\d+|OReilly|OS[._ -]X[._ -]|Official[._ -]Guide|Open(GL|Office)|Pediatric|Periodic.+Table|Photoshop|Physics|Power(PC|Point|Shell)|Programm(ers?|ier||ing)|Raspberry.+Pi|Remedies|Service\s?Manual|SitePoint|Sketching|Statistics|Stock.+Market|Students|Theory|Training|Tutsplus|Ubuntu|Understanding[._ -](and|Of|The)|Visual[._ -]Studio|Textbook|VMWare|wii?max|Windows[._ -](8|7|Vista|XP)|^Wood[._ -]|Woodwork|WordPress|Work(book|shop)|Youtube/i', $this->releaseName):
1078
+            case !preg_match('/^\(?(atz|bb|css|c ?t|Drawing|Gabler|IOS|Iphone|Lynda|Manning|Medic(al|ine)|MIT|No[._ -]Starch|Packt|Peachpit|Pragmatic|Revista|Servo|SmartBooks|Spektrum|Strata|Sybex|Syngress|Vieweg|Wiley|Woods|Wrox)[._ -]|[._ -](Ajax|CSS|DIY|Javascript|(My|Postgre)?SQL|XNA)[._ -]|3DS\.\-_ ]Max|Academic|Adobe|Algebra|Analysis|Appleworks|Archaeology|Bitdefender|Birkhauser|Britannica|[._ -]C\+\+|C[._ -](\+\+|Sharp|Plus)|Chemistry|Circuits|Cook(book|ing)|(Beginners?|Complete|Communications|Definitive|Essential|Hackers?|Practical|Professionals?)[._ -]Guide|Developer|Diagnostic|Disassembl(er|ing|y)|Debugg(er|ing)|Dreamweaver|Economics|Education|Electronics|Enc([iy])clopedia|Engineer(ing|s)|Essays|Exercizes|For.+Beginners|Focal[._ -]Press|For[._ -]Dummies|FreeBSD|Fundamentals[._ -]of[._ -]|(Galileo|Island)[._ -]Press|Geography|Grammar|Guide[._ -](For|To)|Hacking|Google|Handboo?k|How[._ -](It|To)|Intoduction[._ -]to|Iphone|jQuery|Lessons[._ -]In|Learning|LibreOffice|Linux|Manual|Marketing|Masonry|Mathematic(al|s)?|Medical|Microsoft|National[._ -]Academies|Nero[._ -]\d+|OReilly|OS[._ -]X[._ -]|Official[._ -]Guide|Open(GL|Office)|Pediatric|Periodic.+Table|Photoshop|Physics|Power(PC|Point|Shell)|Programm(ers?|ier||ing)|Raspberry.+Pi|Remedies|Service\s?Manual|SitePoint|Sketching|Statistics|Stock.+Market|Students|Theory|Training|Tutsplus|Ubuntu|Understanding[._ -](and|Of|The)|Visual[._ -]Studio|Textbook|VMWare|wii?max|Windows[._ -](8|7|Vista|XP)|^Wood[._ -]|Woodwork|WordPress|Work(book|shop)|Youtube/i', $this->releaseName):
1079 1079
                 return false;
1080 1080
             case $this->isBookForeign():
1081 1081
                 break;
@@ -1090,7 +1090,7 @@  discard block
 block discarded – undo
1090 1090
     public function isMagazine(): bool
1091 1091
     {
1092 1092
         switch (true) {
1093
-            case ! preg_match('/[a-z\-\._ ][._ -](January|February|March|April|May|June|July|August|September|October|November|December)[._ -](\d{1,2},)?20\d\d[._ -]|^\(.+[ .]\d{1,2}[ .]20\d\d[ .].+\.scr|[._ -](Catalogue|FHM|NUTS|Pictorial|Tatler|XXX)[._ -]|^\(?(Allehanda|Club|Computer([a-z0-9]+)?|Connect \d+|Corriere|ct|Diario|Digit(al)?|Esquire|FHM|Gadgets|Galileo|Glam|GQ|Infosat|Inked|Instyle|io|Kicker|Liberation|New Scientist|NGV|Nuts|Popular|Professional|Reise|Sette(tv)?|Springer|Stuff|Studentlitteratur|Vegetarian|Vegetable|Videomarkt|Wired)[._ -]|Brady(.+)?Games|Catalog|Columbus.+Dispatch|Correspondenten|Corriere[._ -]Della[._ -]Sera|Cosmopolitan|Dagbladet|Digital[._ -]Guide|Economist|Eload ?24|ExtraTime|Fatto[._ -]Quotidiano|Flight[._ -](International|Journal)|Finanzwoche|France.+Football|Foto.+Video|Games?(Master|Markt|tar|TM)|Gardening|Gazzetta|Globe[._ -]And[._ -]Mail|Guitar|Heimkino|Hustler|La.+(Lettura|Rblica|Stampa)|Le[._ -](Monde|Temps)|Les[._ -]Echos|e?Magazin(es?)?|Mac(life|welt)|Marie.+Claire|Maxim|Men.+(Health|Fitness)|Motocross|Motorcycle|Mountain[._ -]Bike|MusikWoche|National[._ -]Geographic|New[._ -]Yorker|PC([._ -](Gamer|Welt|World)|Games|Go|Tip)|Penthouse|Photograph(er|ic)|Playboy|Posten|Quotidiano|(Golf|Readers?).+Digest|SFX[._ -]UK|Recipe(.+Guide|s)|SkyNews|Sport[._ -]?Week|Strategy.+Guide|TabletPC|Tattoo[._ -]Life|The[._ -]Guardian|Tageszeitung|Tid(bits|ning)|Top[._ -]Gear[._ -]|Total[._ -]Guitar|Travel[._ -]Guides?|Tribune[._ -]De[._ -]|US[._ -]Weekly|USA[._ -]Today|TruePDF|Vogue|Verlag|Warcraft|Web.+Designer|What[._ -]Car|Zeitung/i', $this->releaseName):
1093
+            case !preg_match('/[a-z\-\._ ][._ -](January|February|March|April|May|June|July|August|September|October|November|December)[._ -](\d{1,2},)?20\d\d[._ -]|^\(.+[ .]\d{1,2}[ .]20\d\d[ .].+\.scr|[._ -](Catalogue|FHM|NUTS|Pictorial|Tatler|XXX)[._ -]|^\(?(Allehanda|Club|Computer([a-z0-9]+)?|Connect \d+|Corriere|ct|Diario|Digit(al)?|Esquire|FHM|Gadgets|Galileo|Glam|GQ|Infosat|Inked|Instyle|io|Kicker|Liberation|New Scientist|NGV|Nuts|Popular|Professional|Reise|Sette(tv)?|Springer|Stuff|Studentlitteratur|Vegetarian|Vegetable|Videomarkt|Wired)[._ -]|Brady(.+)?Games|Catalog|Columbus.+Dispatch|Correspondenten|Corriere[._ -]Della[._ -]Sera|Cosmopolitan|Dagbladet|Digital[._ -]Guide|Economist|Eload ?24|ExtraTime|Fatto[._ -]Quotidiano|Flight[._ -](International|Journal)|Finanzwoche|France.+Football|Foto.+Video|Games?(Master|Markt|tar|TM)|Gardening|Gazzetta|Globe[._ -]And[._ -]Mail|Guitar|Heimkino|Hustler|La.+(Lettura|Rblica|Stampa)|Le[._ -](Monde|Temps)|Les[._ -]Echos|e?Magazin(es?)?|Mac(life|welt)|Marie.+Claire|Maxim|Men.+(Health|Fitness)|Motocross|Motorcycle|Mountain[._ -]Bike|MusikWoche|National[._ -]Geographic|New[._ -]Yorker|PC([._ -](Gamer|Welt|World)|Games|Go|Tip)|Penthouse|Photograph(er|ic)|Playboy|Posten|Quotidiano|(Golf|Readers?).+Digest|SFX[._ -]UK|Recipe(.+Guide|s)|SkyNews|Sport[._ -]?Week|Strategy.+Guide|TabletPC|Tattoo[._ -]Life|The[._ -]Guardian|Tageszeitung|Tid(bits|ning)|Top[._ -]Gear[._ -]|Total[._ -]Guitar|Travel[._ -]Guides?|Tribune[._ -]De[._ -]|US[._ -]Weekly|USA[._ -]Today|TruePDF|Vogue|Verlag|Warcraft|Web.+Designer|What[._ -]Car|Zeitung/i', $this->releaseName):
1094 1094
                 return false;
1095 1095
             case $this->isBookForeign():
1096 1096
                 break;
@@ -1116,7 +1116,7 @@  discard block
 block discarded – undo
1116 1116
     public function isEBook(): bool
1117 1117
     {
1118 1118
         switch (true) {
1119
-            case ! preg_match('/^ePub|[._ -](Ebook|E?\-book|\) WW|Publishing)|[\.\-_\(\[ ](azw|epub|html|mobi|pdf|rtf|tif|txt)[\.\-_\)\] ]|[\. ](azw|doc|epub|mobi|pdf)(?![\w .])|\.ebook-\w$/i', $this->releaseName):
1119
+            case !preg_match('/^ePub|[._ -](Ebook|E?\-book|\) WW|Publishing)|[\.\-_\(\[ ](azw|epub|html|mobi|pdf|rtf|tif|txt)[\.\-_\)\] ]|[\. ](azw|doc|epub|mobi|pdf)(?![\w .])|\.ebook-\w$/i', $this->releaseName):
1120 1120
                 return false;
1121 1121
             case $this->isBookForeign():
1122 1122
                 break;
Please login to merge, or discard this patch.