Passed
Push — master ( 4e5873...9a1ad0 )
by Darko
05:47
created
Blacklight/Genres.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
     private function getListQuery(string $type = '', bool $activeOnly = false): string
59 59
     {
60
-        if (! empty($type)) {
60
+        if (!empty($type)) {
61 61
             $typesql = sprintf(' AND g.type = %d', $type);
62 62
         } else {
63 63
             $typesql = '';
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
     public function getCount(string $type = '', bool $activeOnly = false): mixed
105 105
     {
106
-        if (! empty($type)) {
106
+        if (!empty($type)) {
107 107
             $typesql = sprintf(' AND g.type = %d', $type);
108 108
         } else {
109 109
             $typesql = '';
Please login to merge, or discard this patch.
Blacklight/NZBContents.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                     $foundNFO = true;
140 140
                 }
141 141
 
142
-                if ($foundNFO === false && $hiddenNFO === false && preg_match('/\(1\/1\)$/i', $subject) && ! preg_match('/\.(apk|bat|bmp|cbr|cbz|cfg|css|csv|cue|db|dll|doc|epub|exe|gif|htm|ico|idx|ini'.'|jpg|lit|log|m3u|mid|mobi|mp3|nib|nzb|odt|opf|otf|par|par2|pdf|psd|pps|png|ppt|r\d{2,4}'.'|rar|sfv|srr|sub|srt|sql|rom|rtf|tif|torrent|ttf|txt|vb|vol\d+\+\d+|wps|xml|zip)/i', $subject)) {
142
+                if ($foundNFO === false && $hiddenNFO === false && preg_match('/\(1\/1\)$/i', $subject) && !preg_match('/\.(apk|bat|bmp|cbr|cbz|cfg|css|csv|cue|db|dll|doc|epub|exe|gif|htm|ico|idx|ini'.'|jpg|lit|log|m3u|mid|mobi|mp3|nib|nzb|odt|opf|otf|par|par2|pdf|psd|pps|png|ppt|r\d{2,4}'.'|rar|sfv|srr|sub|srt|sql|rom|rtf|tif|torrent|ttf|txt|vb|vol\d+\+\d+|wps|xml|zip)/i', $subject)) {
143 143
                     $hiddenID = (string) $nzbcontents->segments->segment;
144 144
                     $hiddenNFO = true;
145 145
                 }
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
             return false;
185 185
         }
186 186
         $nzbContents = Utility::unzipGzipFile($nzbPath);
187
-        if (! $nzbContents) {
187
+        if (!$nzbContents) {
188 188
             if ($this->echooutput) {
189 189
                 echo PHP_EOL.
190 190
                     'Unable to decompress: '.
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         }
200 200
 
201 201
         $nzbFile = @simplexml_load_string($nzbContents);
202
-        if (! $nzbFile) {
202
+        if (!$nzbFile) {
203 203
             if ($this->echooutput) {
204 204
                 echo PHP_EOL."Unable to load NZB: $guid appears to be an invalid NZB, skipping.".PHP_EOL;
205 205
             }
Please login to merge, or discard this patch.
Blacklight/libraries/TraktAPI.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         $url = self::API_URL."shows/{$id}/seasons/{$season}/episodes/{$ep}";
58 58
 
59 59
         $array = $this->getJsonArray($url, $extended);
60
-        if (! \is_array($array)) {
60
+        if (!\is_array($array)) {
61 61
             return false;
62 62
         }
63 63
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $array = $this->getJsonArray(
73 73
             self::API_URL.'movies/boxoffice'
74 74
         );
75
-        if (! $array) {
75
+        if (!$array) {
76 76
             return false;
77 77
         }
78 78
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $array = $this->getJsonArray(
88 88
             self::API_URL.'calendars/all/shows/'.$start.'/'.$days
89 89
         );
90
-        if (! $array) {
90
+        if (!$array) {
91 91
             return false;
92 92
         }
93 93
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             $extendedString = '?extended='.$extended;
108 108
         }
109 109
 
110
-        if (! empty($this->requestHeaders)) {
110
+        if (!empty($this->requestHeaders)) {
111 111
             try {
112 112
                 $json = $this->client->get(
113 113
                     $URI.$extendedString,
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
                 return false;
122 122
             }
123 123
 
124
-            if (! empty($json)) {
124
+            if (!empty($json)) {
125 125
                 $json = json_decode($json, true);
126
-                if (! \is_array($json) || (isset($json['status']) && $json['status'] === 'failure')) {
126
+                if (!\is_array($json) || (isset($json['status']) && $json['status'] === 'failure')) {
127 127
                     return false;
128 128
                 }
129 129
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
             default => 'min',
147 147
         };
148 148
         $array = $this->getJsonArray(self::API_URL.'movies/'.Str::slug($movie), $extended);
149
-        if (! $array) {
149
+        if (!$array) {
150 150
             return false;
151 151
         }
152 152
         if ($type === 'imdbid' && isset($array['ids']['imdb'])) {
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      */
164 164
     public function searchId(int|string $id, string $site = 'trakt', int|string $type = 0)
165 165
     {
166
-        if (! \in_array($site, self::$types, false) || ! ctype_digit($id)) {
166
+        if (!\in_array($site, self::$types, false) || !ctype_digit($id)) {
167 167
             return;
168 168
         }
169 169
         if ($site === 'imdb') {
Please login to merge, or discard this patch.
Blacklight/libraries/Geary.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,10 +16,10 @@  discard block
 block discarded – undo
16 16
  * Updated for NNTmux by DariusIII
17 17
  */
18 18
 
19
-if (! \function_exists('getAllHeaders')) {
19
+if (!\function_exists('getAllHeaders')) {
20 20
     function getAllHeaders()
21 21
     {
22
-        if (! \is_array($_SERVER)) {
22
+        if (!\is_array($_SERVER)) {
23 23
             return [];
24 24
         }
25 25
 
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
     private function prepare_header(array $data): array
278 278
     {
279 279
         $params = $data['params'];
280
-        $params_query = ! \is_array($params) ? "/$params" : '?'.http_build_query($params);
280
+        $params_query = !\is_array($params) ? "/$params" : '?'.http_build_query($params);
281 281
 
282 282
         $nonce = (int) round(microtime(true) * 1000);
283 283
         $body = '';
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 
320 320
         curl_setopt_array($ch, $curl_data);
321 321
 
322
-        if (! $result = curl_exec($ch)) {
322
+        if (!$result = curl_exec($ch)) {
323 323
             return $this->curl_error($ch);
324 324
         }
325 325
 
Please login to merge, or discard this patch.
Blacklight/libraries/ForkingImportNZB.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
         foreach ($directories as $directory) {
63 63
             $pool = Pool::create()->concurrency($maxProcesses)->timeout(3600);
64
-            $pool->add(function () use ($directory) {
64
+            $pool->add(function() use ($directory) {
65 65
                 $this->_executeCommand(
66 66
                     $this->importPath.'"'.
67 67
                     $directory.'" '.
@@ -70,9 +70,9 @@  discard block
 block discarded – undo
70 70
                     $this->useFileName.' '.
71 71
                     $this->maxPerProcess
72 72
                 );
73
-            })->then(function () {
73
+            })->then(function() {
74 74
                 $this->colorCli->header('Finished importing new nzbs', true);
75
-            })->catch(function (\Throwable $exception) {
75
+            })->catch(function(\Throwable $exception) {
76 76
                 // Handle exception
77 77
             });
78 78
             $pool->wait();
Please login to merge, or discard this patch.
Blacklight/db/populate/AniDB.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                     $episodeArray[$i]['episode_no'] = (int) $episode->epno;
133 133
                     $episodeArray[$i]['airdate'] = (string) $episode->airdate;
134 134
 
135
-                    if (! empty($episode->title)) {
135
+                    if (!empty($episode->title)) {
136 136
                         foreach ($episode->title as $title) {
137 137
                             $xmlAttribs = $title->attributes('xml', true);
138 138
                             // only english, x-jat imploded episode titles for now
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
                     'updated' => now(),
253 253
                 ]
254 254
             );
255
-        if (! empty($AniDBInfoArray['epsarr'])) {
255
+        if (!empty($AniDBInfoArray['epsarr'])) {
256 256
             $this->insertAniDBEpisodes($aniDbId, $AniDBInfoArray['epsarr']);
257 257
         }
258 258
 
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 
262 262
     private function insertAniDBEpisodes($aniDbId, array $episodeArr = []): void
263 263
     {
264
-        if (! empty($episodeArr)) {
264
+        if (!empty($episodeArr)) {
265 265
             foreach ($episodeArr as $episode) {
266 266
                 AnidbEpisode::insertOrIgnore(
267 267
                     [
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
                     'updated' => now(),
421 421
                 ]
422 422
             );
423
-        if (! empty($AniDBInfoArray['epsarr'])) {
423
+        if (!empty($AniDBInfoArray['epsarr'])) {
424 424
             $this->insertAniDBEpisodes($aniDbId, $AniDBInfoArray['epsarr']);
425 425
         }
426 426
 
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
             $picture = $this->updateAniDBInfoEps($aniDbId, $AniDBInfoArray);
438 438
         }
439 439
 
440
-        if (! empty($picture) && ! file_exists($this->imgSavePath.$aniDbId.'.jpg')) {
440
+        if (!empty($picture) && !file_exists($this->imgSavePath.$aniDbId.'.jpg')) {
441 441
             (new ReleaseImage())->saveImage(
442 442
                 $aniDbId,
443 443
                 'http://img7.anidb.net/pics/anime/'.$picture,
Please login to merge, or discard this patch.
Blacklight/Backfill.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                 $this->colorCli->header($dMessage);
87 87
             }
88 88
 
89
-            if ($articles !== '' && ! is_numeric($articles)) {
89
+            if ($articles !== '' && !is_numeric($articles)) {
90 90
                 $articles = 20000;
91 91
             }
92 92
 
@@ -181,8 +181,7 @@  discard block
 block discarded – undo
181 181
             $dMessage =
182 182
                 'We have hit the maximum we can backfill for '.
183 183
                 $groupName.
184
-                ($this->_disableBackfillGroup ? ', disabling backfill on it.' :
185
-                ', skipping it, consider disabling backfill on it.');
184
+                ($this->_disableBackfillGroup ? ', disabling backfill on it.' : ', skipping it, consider disabling backfill on it.');
186 185
 
187 186
             if ($this->_disableBackfillGroup) {
188 187
                 UsenetGroup::updateGroupStatus($groupArr['id'], 'backfill', 0);
Please login to merge, or discard this patch.
Blacklight/TmuxOutput.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
             $buffer .= sprintf($this->tmpMasks[3], 'File System', 'Used', 'Free');
406 406
             $buffer .= $this->_getSeparator();
407 407
 
408
-            if (! empty($monitor_path) && file_exists($monitor_path)) {
408
+            if (!empty($monitor_path) && file_exists($monitor_path)) {
409 409
                 $disk_use = $this->decodeSize(disk_total_space($monitor_path) - disk_free_space($monitor_path));
410 410
                 $disk_free = $this->decodeSize(disk_free_space($monitor_path));
411 411
                 if (basename($monitor_path) === '') {
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
                 $buffer .= sprintf($this->tmpMasks[4], $show, $disk_use, $disk_free);
417 417
             }
418 418
 
419
-            if (! empty($monitor_path_a) && file_exists($monitor_path_a)) {
419
+            if (!empty($monitor_path_a) && file_exists($monitor_path_a)) {
420 420
                 $disk_use = $this->decodeSize(disk_total_space($monitor_path_a) - disk_free_space($monitor_path_a));
421 421
                 $disk_free = $this->decodeSize(disk_free_space($monitor_path_a));
422 422
                 if (basename($monitor_path_a) === '') {
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
                 $buffer .= sprintf($this->tmpMasks[4], $show, $disk_use, $disk_free);
428 428
             }
429 429
 
430
-            if (! empty($monitor_path_b) && file_exists($monitor_path_b)) {
430
+            if (!empty($monitor_path_b) && file_exists($monitor_path_b)) {
431 431
                 $disk_use = $this->decodeSize(disk_total_space($monitor_path_b) - disk_free_space($monitor_path_b));
432 432
                 $disk_free = $this->decodeSize(disk_free_space($monitor_path_b));
433 433
                 if (basename($monitor_path_b) === '') {
Please login to merge, or discard this patch.
Blacklight/NameFixer.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -830,7 +830,7 @@  discard block
 block discarded – undo
830 830
                 $this->matched = true;
831 831
                 $this->relid = (int) $release->releases_id;
832 832
 
833
-                $determinedCategory = $this->category->determineCategory($release->groups_id, $newName, ! empty($release->fromname) ? $release->fromname : '');
833
+                $determinedCategory = $this->category->determineCategory($release->groups_id, $newName, !empty($release->fromname) ? $release->fromname : '');
834 834
 
835 835
                 if ($type === 'PAR2, ') {
836 836
                     $newName = ucwords($newName);
@@ -871,7 +871,7 @@  discard block
 block discarded – undo
871 871
                         $this->colorCLI->info($type.$method).
872 872
                         $this->colorCLI->headerOver('Releases ID: ').
873 873
                         $this->colorCLI->info($release->releases_id);
874
-                    if (! empty($release->filename)) {
874
+                    if (!empty($release->filename)) {
875 875
                         $this->colorCLI->headerOver('Filename:  ').
876 876
                             $this->colorCLI->info($release->filename);
877 877
                     }
@@ -1077,7 +1077,7 @@  discard block
 block discarded – undo
1077 1077
 
1078 1078
         if (\strlen($preTitle) >= 15 && preg_match(self::PREDB_REGEX, $preTitle)) {
1079 1079
             $titleMatch = $this->manticore->searchIndexes('releases_rt', $preTitle, ['name', 'searchname', 'filename']);
1080
-            if (! empty($titleMatch)) {
1080
+            if (!empty($titleMatch)) {
1081 1081
                 $join = implode(',', Arr::get($titleMatch, 'id'));
1082 1082
             }
1083 1083
         }
@@ -1174,9 +1174,9 @@  discard block
 block discarded – undo
1174 1174
                 } else {
1175 1175
                     $results = Arr::get($this->manticore->searchIndexes('predb_rt', $preMatch[1], ['filename', 'title']), 'data');
1176 1176
                 }
1177
-                if (! empty($results)) {
1177
+                if (!empty($results)) {
1178 1178
                     foreach ($results as $result) {
1179
-                        if (! empty($result)) {
1179
+                        if (!empty($result)) {
1180 1180
                             $preFtMatch = $this->preMatch($result['filename']);
1181 1181
                             if ($preFtMatch[0] === true) {
1182 1182
                                 $this->_fileName = $result['filename'];
@@ -1206,7 +1206,7 @@  discard block
 block discarded – undo
1206 1206
         // first strip all non-printing chars  from filename
1207 1207
         $this->_fileName = str_replace('/[[:^print:]]/', '', $this->_fileName);
1208 1208
 
1209
-        if ($this->_fileName !== '' && ! str_starts_with($this->_fileName, '.')) {
1209
+        if ($this->_fileName !== '' && !str_starts_with($this->_fileName, '.')) {
1210 1210
             $this->_fileName = match (true) {
1211 1211
                 str_contains($this->_fileName, '.') => Str::beforeLast('.', $this->_fileName),
1212 1212
                 preg_match('/\.part\d+$/', $this->_fileName) => Str::beforeLast('.', $this->_fileName),
@@ -1252,7 +1252,7 @@  discard block
 block discarded – undo
1252 1252
         );
1253 1253
 
1254 1254
         foreach ($row as $item) {
1255
-            if (! empty($item)) {
1255
+            if (!empty($item)) {
1256 1256
                 if ($item->title !== $release->searchname) {
1257 1257
                     $this->updateRelease($release, $item->title, 'predb hash release name: '.$item->source, $echo, $hashtype, $nameStatus, $show, $item->predb_id);
1258 1258
                     $matching++;
@@ -1337,7 +1337,7 @@  discard block
 block discarded – undo
1337 1337
     {
1338 1338
 
1339 1339
         // Get pre style name from releases.name
1340
-        if (preg_match_all(self::PREDB_REGEX, $release->textstring, $hits) && ! preg_match('/Source\s\:/i', $release->textstring)) {
1340
+        if (preg_match_all(self::PREDB_REGEX, $release->textstring, $hits) && !preg_match('/Source\s\:/i', $release->textstring)) {
1341 1341
             foreach ($hits as $hit) {
1342 1342
                 foreach ($hit as $val) {
1343 1343
                     $title = Predb::query()->where('title', trim($val))->select(['title', 'id'])->first();
@@ -1350,7 +1350,7 @@  discard block
 block discarded – undo
1350 1350
         }
1351 1351
 
1352 1352
         // if only processing for PreDB match skip to return
1353
-        if (! $preId) {
1353
+        if (!$preId) {
1354 1354
             switch ($type) {
1355 1355
                 case 'PAR2, ':
1356 1356
                     $this->fileCheck($release, $echo, $type, $nameStatus, $show);
@@ -1390,7 +1390,7 @@  discard block
 block discarded – undo
1390 1390
             }
1391 1391
 
1392 1392
             // set NameFixer process flags after run
1393
-            if ($nameStatus === true && ! $this->matched) {
1393
+            if ($nameStatus === true && !$this->matched) {
1394 1394
                 switch ($type) {
1395 1395
                     case 'NFO, ':
1396 1396
                         $this->_updateSingleColumn('proc_nfo', self::PROC_NFO_DONE, $release->releases_id);
@@ -1440,7 +1440,7 @@  discard block
 block discarded – undo
1440 1440
 
1441 1441
         $result = [];
1442 1442
 
1443
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
1443
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
1444 1444
             if (preg_match('/\w[\-\w.\',;& ]+((s\d{1,2}[._ -]?[bde]\d{1,2})|(?<!\d)[S|]\d{1,2}[E|x]\d{1,}(?!\d)|ep[._ -]?\d{2})[\-\w.\',;.()]+(BD(-?(25|50|RIP))?|Blu-?Ray ?(3D)?|BRRIP|CAM(RIP)?|DBrip|DTV|DVD\-?(5|9|(R(IP)?|scr(eener)?))?|[HPS]D?(RIP|TV(RIP)?)?|NTSC|PAL|R5|Ripped |S?VCD|scr(eener)?|SAT(RIP)?|TS|VHS(RIP)?|VOD|WEB-DL)[._ -][\-\w.\',;& ]+\w/i', $release->textstring, $result)) {
1445 1445
                 $this->updateRelease($release, $result['0'], 'tvCheck: Title.SxxExx.Text.source.group', $echo, $type, $nameStatus, $show);
1446 1446
             } elseif (preg_match('/\w[\-\w.\',;& ]+((s\d{1,2}[._ -]?[bde]\d{1,2})|\d{1,2}x\d{2}|ep[._ -]?\d{2})[\-\w.\',;& ]+((19|20)\d\d)[\-\w.\',;& ]+\w/i', $release->textstring, $result)) {
@@ -1470,7 +1470,7 @@  discard block
 block discarded – undo
1470 1470
 
1471 1471
         $result = [];
1472 1472
 
1473
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
1473
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
1474 1474
             if (preg_match('/\w[\-\w.\',;& ]+((19|20)\d\d)[\-\w.\',;& ]+(480|720|1080)[ip][._ -](DivX|[HX][._ -]?264|MPEG2|XviD(HD)?|WMV)[\-\w.\',;& ]+\w/i', $release->textstring, $result)) {
1475 1475
                 $this->updateRelease($release, $result['0'], 'movieCheck: Title.year.Text.res.vcod.group', $echo, $type, $nameStatus, $show);
1476 1476
             } elseif (preg_match('/\w[\-\w.\',;& ]+((19|20)\d\d)[._ -](BD(-?(25|50|RIP))?|Blu-?Ray ?(3D)?|BRRIP|CAM(RIP)?|DBrip|DTV|DVD\-?(5|9|(R(IP)?|scr(eener)?))?|[HPS]D?(RIP|TV(RIP)?)?|NTSC|PAL|R5|Ripped |S?VCD|scr(eener)?|SAT(RIP)?|TS|VHS(RIP)?|VOD|WEB-DL)[._ -](DivX|[HX][._ -]?264|MPEG2|XviD(HD)?|WMV)[._ -](480|720|1080)[ip][\-\w.\',;& ]+\w/i', $release->textstring, $result)) {
@@ -1512,7 +1512,7 @@  discard block
 block discarded – undo
1512 1512
 
1513 1513
         $result = [];
1514 1514
 
1515
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
1515
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
1516 1516
             if (preg_match('/\w[\-\w.\',;& ]+(ASIA|DLC|EUR|GOTY|JPN|KOR|MULTI\d{1}|NTSCU?|PAL|RF|Region[._ -]?Free|USA|XBLA)[._ -](DLC[._ -]Complete|FRENCH|GERMAN|MULTI\d{1}|PROPER|PSN|READ[._ -]?NFO|UMD)?[._ -]?(GC|NDS|NGC|PS3|PSP|WII|XBOX(360)?)[\-\w.\',;& ]+\w/i', $release->textstring, $result)) {
1517 1517
                 $this->updateRelease($release, $result['0'], 'gameCheck: Videogames 1', $echo, $type, $nameStatus, $show);
1518 1518
             } elseif (preg_match('/\w[\-\w.\',;& ]+(GC|NDS|NGC|PS3|WII|XBOX(360)?)[._ -](DUPLEX|iNSOMNi|OneUp|STRANGE|SWAG|SKY)[\-\w.\',;& ]+\w/i', $release->textstring, $result)) {
@@ -1538,7 +1538,7 @@  discard block
 block discarded – undo
1538 1538
 
1539 1539
         $result = [];
1540 1540
 
1541
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
1541
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
1542 1542
             if (preg_match('/\w[\-\w.\',;& ]+(\d{1,10}|Linux|UNIX)[._ -](RPM)?[._ -]?(X64)?[._ -]?(Incl)[._ -](Keygen)[\-\w.\',;& ]+\w/i', $release->textstring, $result)) {
1543 1543
                 $this->updateRelease($release, $result['0'], 'appCheck: Apps 1', $echo, $type, $nameStatus, $show);
1544 1544
             } elseif (preg_match('/\w[\-\w.\',;& ]+\d{1,8}[._ -](winall-freeware)[\-\w.\',;& ]+\w/i', $release->textstring, $result)) {
@@ -1558,7 +1558,7 @@  discard block
 block discarded – undo
1558 1558
 
1559 1559
         $result = [];
1560 1560
 
1561
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
1561
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
1562 1562
             if (preg_match('/:\s*.*[\\\\\/]([A-Z0-9].+?S\d+[.-_ ]?[ED]\d+.+?)\.\w{2,}\s+/i', $release->textstring, $result)) {
1563 1563
                 $this->updateRelease($release, $result['1'], 'nfoCheck: Generic TV 1', $echo, $type, $nameStatus, $show);
1564 1564
             } elseif (preg_match('/(?:(\:\s{1,}))(.+?S\d{1,3}[.-_ ]?[ED]\d{1,3}.+?)(\s{2,}|\r|\n)/i', $release->textstring, $result)) {
@@ -1578,7 +1578,7 @@  discard block
 block discarded – undo
1578 1578
 
1579 1579
         $result = [];
1580 1580
 
1581
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
1581
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
1582 1582
             if (preg_match('/(?:((?!Source\s)\:\s{1,}))(.+?(19|20)\d\d.+?(BDRip|bluray|DVD(R|Rip)?|XVID).+?)(\s{2,}|\r|\n)/i', $release->textstring, $result)) {
1583 1583
                 $this->updateRelease($release, $result['2'], 'nfoCheck: Generic Movies 1', $echo, $type, $nameStatus, $show);
1584 1584
             } elseif (preg_match('/(?:(\s{2,}))((?!Source).+?[\.\-_ ](19|20)\d\d.+?(BDRip|bluray|DVD(R|Rip)?|XVID).+?)(\s{2,}|\r|\n)/i', $release->textstring, $result)) {
@@ -1597,7 +1597,7 @@  discard block
 block discarded – undo
1597 1597
 
1598 1598
         $result = [];
1599 1599
 
1600
-        if (! $this->done && $this->relid !== (int) $release->releases_id && preg_match('/(?:\s{2,})(.+?-FM-\d{2}-\d{2})/i', $release->textstring, $result)) {
1600
+        if (!$this->done && $this->relid !== (int) $release->releases_id && preg_match('/(?:\s{2,})(.+?-FM-\d{2}-\d{2})/i', $release->textstring, $result)) {
1601 1601
             $newName = str_replace('-FM-', '-FM-Radio-MP3-', $result['1']);
1602 1602
             $this->updateRelease($release, $newName, 'nfoCheck: Music FM RADIO', $echo, $type, $nameStatus, $show);
1603 1603
         }
@@ -1614,7 +1614,7 @@  discard block
 block discarded – undo
1614 1614
 
1615 1615
         $result = [];
1616 1616
 
1617
-        if (! $this->done && $this->relid !== (int) $release->releases_id && preg_match('/(\w[\-\w`~!@#$%^&*()_+={}|"<>?\[\]\\;\',.\/ ]+\s?\((19|20)\d\d\))/i', $release->textstring, $result) && ! preg_match('/\.pdf|Audio ?Book/i', $release->textstring)) {
1617
+        if (!$this->done && $this->relid !== (int) $release->releases_id && preg_match('/(\w[\-\w`~!@#$%^&*()_+={}|"<>?\[\]\\;\',.\/ ]+\s?\((19|20)\d\d\))/i', $release->textstring, $result) && !preg_match('/\.pdf|Audio ?Book/i', $release->textstring)) {
1618 1618
             $releaseName = $result[0];
1619 1619
             if (preg_match('/(idiomas|lang|language|langue|sprache).*?\b(?P<lang>Brazilian|Chinese|Croatian|Danish|DE|Deutsch|Dutch|Estonian|ES|English|Englisch|Finnish|Flemish|Francais|French|FR|German|Greek|Hebrew|Icelandic|Italian|Japenese|Japan|Japanese|Korean|Latin|Nordic|Norwegian|Polish|Portuguese|Russian|Serbian|Slovenian|Swedish|Spanisch|Spanish|Thai|Turkish)\b/i', $release->textstring, $result)) {
1620 1620
                 switch ($result['lang']) {
@@ -1787,7 +1787,7 @@  discard block
 block discarded – undo
1787 1787
 
1788 1788
         $result = [];
1789 1789
 
1790
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
1790
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
1791 1791
             if (preg_match('/ALiAS|BAT-TEAM|FAiRLiGHT|Game Type|Glamoury|HI2U|iTWINS|JAGUAR|(LARGE|MEDIUM)ISO|MAZE|nERv|PROPHET|PROFiT|PROCYON|RELOADED|REVOLVER|ROGUE|ViTALiTY/i', $release->textstring)) {
1792 1792
                 if (preg_match('/\w[\w.+&*\/\()\',;: -]+\(c\)[\-\w.\',;& ]+\w/i', $release->textstring, $result)) {
1793 1793
                     $releaseName = str_replace(['(c)', '(C)'], '(GAMES) (c)', $result['0']);
@@ -1811,7 +1811,7 @@  discard block
 block discarded – undo
1811 1811
     public function nfoCheckMisc($release, bool $echo, string $type, $nameStatus, $show): void
1812 1812
     {
1813 1813
 
1814
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
1814
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
1815 1815
             if (preg_match('/Supplier.+?IGUANA/i', $release->textstring)) {
1816 1816
                 $releaseName = '';
1817 1817
                 $result = [];
@@ -1850,7 +1850,7 @@  discard block
 block discarded – undo
1850 1850
 
1851 1851
         $result = [];
1852 1852
 
1853
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
1853
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
1854 1854
             switch (true) {
1855 1855
                 case preg_match('/^(.+?(x264|XviD)\-TVP)\\\\/i', $release->textstring, $result):
1856 1856
                     $this->updateRelease($release, $result['1'], 'fileCheck: TVP', $echo, $type, $nameStatus, $show);
@@ -1942,7 +1942,7 @@  discard block
 block discarded – undo
1942 1942
     public function uidCheck($release, $echo, $type, $nameStatus, $show): bool
1943 1943
     {
1944 1944
 
1945
-        if (! empty($release->uid) && ! $this->done && $this->relid !== (int) $release->releases_id) {
1945
+        if (!empty($release->uid) && !$this->done && $this->relid !== (int) $release->releases_id) {
1946 1946
             $result = Release::fromQuery(sprintf(
1947 1947
                 '
1948 1948
 				SELECT r.id AS releases_id, r.size AS relsize, r.name AS textstring, r.searchname, r.fromname, r.predb_id
@@ -1991,7 +1991,7 @@  discard block
 block discarded – undo
1991 1991
     {
1992 1992
 
1993 1993
         $newName = '';
1994
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
1994
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
1995 1995
             if (preg_match('/<Movie_name>(.+)<\/Movie_name>/i', $release->mediainfo, $hit)) {
1996 1996
                 $media = $hit[1];
1997 1997
                 if (preg_match(self::PREDB_REGEX, $media, $hit)) {
@@ -2024,7 +2024,7 @@  discard block
 block discarded – undo
2024 2024
     public function xxxNameCheck($release, $echo, $type, $nameStatus, $show): bool
2025 2025
     {
2026 2026
 
2027
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
2027
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
2028 2028
             $result = Release::fromQuery(
2029 2029
                 sprintf(
2030 2030
                     "
@@ -2072,7 +2072,7 @@  discard block
 block discarded – undo
2072 2072
     public function srrNameCheck($release, $echo, $type, $nameStatus, $show): bool
2073 2073
     {
2074 2074
 
2075
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
2075
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
2076 2076
             $result = Release::fromQuery(
2077 2077
                 sprintf(
2078 2078
                     "
@@ -2120,7 +2120,7 @@  discard block
 block discarded – undo
2120 2120
     public function hashCheck($release, $echo, $type, $nameStatus, $show): bool
2121 2121
     {
2122 2122
 
2123
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
2123
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
2124 2124
             $result = Release::fromQuery(sprintf(
2125 2125
                 '
2126 2126
 				SELECT r.id AS releases_id, r.size AS relsize, r.name AS textstring, r.searchname, r.fromname, r.predb_id
@@ -2166,7 +2166,7 @@  discard block
 block discarded – undo
2166 2166
     public function crcCheck($release, $echo, $type, $nameStatus, $show): bool
2167 2167
     {
2168 2168
 
2169
-        if (! $this->done && $this->relid !== (int) $release->releases_id && $release->textstring !== '') {
2169
+        if (!$this->done && $this->relid !== (int) $release->releases_id && $release->textstring !== '') {
2170 2170
             $result = Release::fromQuery(
2171 2171
                 sprintf(
2172 2172
                     '
@@ -2227,11 +2227,11 @@  discard block
 block discarded – undo
2227 2227
         $this->_fileName = $release->textstring;
2228 2228
         $this->_cleanMatchFiles();
2229 2229
         $this->cleanFileNames();
2230
-        if (! empty($this->_fileName)) {
2230
+        if (!empty($this->_fileName)) {
2231 2231
             if (config('nntmux.elasticsearch_enabled') === true) {
2232 2232
                 $results = $this->elasticsearch->searchPreDb($this->_fileName);
2233 2233
                 foreach ($results as $hit) {
2234
-                    if (! empty($hit)) {
2234
+                    if (!empty($hit)) {
2235 2235
                         $this->updateRelease($release, $hit['title'], 'PreDb: Filename match', $echo, $type, $nameStatus, $show, $hit['id']);
2236 2236
 
2237 2237
                         return true;
@@ -2239,9 +2239,9 @@  discard block
 block discarded – undo
2239 2239
                 }
2240 2240
             } else {
2241 2241
                 $predbSearch = Arr::get($this->manticore->searchIndexes('predb_rt', $this->_fileName, ['filename', 'title']), 'data');
2242
-                if (! empty($predbSearch)) {
2242
+                if (!empty($predbSearch)) {
2243 2243
                     foreach ($predbSearch as $hit) {
2244
-                        if (! empty($hit)) {
2244
+                        if (!empty($hit)) {
2245 2245
                             $this->updateRelease($release, $hit['title'], 'PreDb: Filename match', $echo, $type, $nameStatus, $show);
2246 2246
 
2247 2247
                             return true;
@@ -2263,11 +2263,11 @@  discard block
 block discarded – undo
2263 2263
         $this->_fileName = $release->textstring;
2264 2264
         $this->_cleanMatchFiles();
2265 2265
         $this->cleanFileNames();
2266
-        if (! empty($this->_fileName)) {
2266
+        if (!empty($this->_fileName)) {
2267 2267
             if (config('nntmux.elasticsearch_enabled') === true) {
2268 2268
                 $results = $this->elasticsearch->searchPreDb($this->_fileName);
2269 2269
                 foreach ($results as $hit) {
2270
-                    if (! empty($hit)) {
2270
+                    if (!empty($hit)) {
2271 2271
                         $this->updateRelease($release, $hit['title'], 'PreDb: Title match', $echo, $type, $nameStatus, $show, $hit['id']);
2272 2272
 
2273 2273
                         return true;
@@ -2275,9 +2275,9 @@  discard block
 block discarded – undo
2275 2275
                 }
2276 2276
             } else {
2277 2277
                 $results = Arr::get($this->manticore->searchIndexes('predb_rt', $this->_fileName, ['title']), 'data');
2278
-                if (! empty($results)) {
2278
+                if (!empty($results)) {
2279 2279
                     foreach ($results as $hit) {
2280
-                        if (! empty($hit)) {
2280
+                        if (!empty($hit)) {
2281 2281
                             $this->updateRelease($release, $hit['title'], 'PreDb: Title match', $echo, $type, $nameStatus, $show);
2282 2282
 
2283 2283
                             return true;
@@ -2293,10 +2293,10 @@  discard block
 block discarded – undo
2293 2293
     private function cleanFileNames(): array|string|null
2294 2294
     {
2295 2295
         if (preg_match('/(\.[a-zA-Z]{2})?(\.4k|\.fullhd|\.hd|\.int|\.\d+)?$/i', $this->_fileName, $hit)) {
2296
-            if (! empty($hit[1]) && preg_match('/\.[a-zA-Z]{2}/i', $hit[1])) {
2296
+            if (!empty($hit[1]) && preg_match('/\.[a-zA-Z]{2}/i', $hit[1])) {
2297 2297
                 $this->_fileName = preg_replace('/\.[a-zA-Z]{2}\./i', '.', $this->_fileName);
2298 2298
             }
2299
-            if (! empty($hit[2])) {
2299
+            if (!empty($hit[2])) {
2300 2300
                 if (preg_match('/\.4k$/', $hit[2])) {
2301 2301
                     $this->_fileName = preg_replace('/\.4k$/', '.2160p', $this->_fileName);
2302 2302
                 }
Please login to merge, or discard this patch.