Passed
Push — master ( 79dca1...37911e )
by Darko
03:12
created
Blacklight/ReleaseExtra.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
             $videoDuration = $videoFormat = $videoCodec = $videoWidth = $videoHeight = $videoAspect = $videoFrameRate = $videoLibrary = $videoBitRate = '';
91 91
 
92
-            if (! empty($videos)) {
92
+            if (!empty($videos)) {
93 93
                 foreach ($videos as $video) {
94 94
                     if ($video->get('duration') !== null) {
95 95
                         $videoDuration = $video->get('duration')->getMilliseconds();
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                         $videoBitRate = $video->get('nominal_bit_rate')->getTextValue();
140 140
                     }
141 141
 
142
-                    if (! empty($videoBitRate)) {
142
+                    if (!empty($videoBitRate)) {
143 143
                         $overallBitRate = $videoBitRate;
144 144
                     }
145 145
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             $audioID = 1;
151 151
             $audioFormat = $audioMode = $audioBitRateMode = $audioBitRate = $audioChannels = $audioSampleRate = $audioLibrary = $audioLanguage = $audioTitle = '';
152 152
 
153
-            if (! empty($audios)) {
153
+            if (!empty($audios)) {
154 154
                 foreach ($audios as $audio) {
155 155
                     if ($audio->get('id') !== null) {
156 156
                         $audioID = $audio->get('id')->getFullName();
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
                 }
197 197
             }
198 198
 
199
-            if (! empty($subtitles)) {
199
+            if (!empty($subtitles)) {
200 200
                 foreach ($subtitles as $subtitle) {
201 201
                     $subsID = 1;
202 202
                     $subsLanguage = 'Unknown';
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
                 'audiochannels' => \is_array($audioChannels) ? implode($audioChannels) : $audioChannels,
261 261
                 'audiosamplerate' => \is_array($audioSampleRate) ? implode($audioSampleRate) : $audioSampleRate,
262 262
                 'audiolibrary' => \is_array($audioLibrary) ? implode($audioLibrary) : $audioLibrary,
263
-                'audiolanguage' => ! empty($audioLanguage) ? $audioLanguage[1] : '',
263
+                'audiolanguage' => !empty($audioLanguage) ? $audioLanguage[1] : '',
264 264
                 'audiotitle' => \is_array($audioTitle) ? implode($audioTitle) : $audioTitle,
265 265
             ]);
266 266
         }
@@ -270,10 +270,10 @@  discard block
 block discarded – undo
270 270
     {
271 271
         $ckid = ReleaseSubtitle::query()->where('releases_id', $releaseID)->where('subsid', '=', $subsID)->first(['releases_id']);
272 272
         $subs = '';
273
-        if (! empty($subsLanguage)) {
274
-            if (! empty($subsLanguage[1])) {
273
+        if (!empty($subsLanguage)) {
274
+            if (!empty($subsLanguage[1])) {
275 275
                 $subs = $subsLanguage[1];
276
-            } elseif (! empty($subsLanguage[0])) {
276
+            } elseif (!empty($subsLanguage[0])) {
277 277
                 $subs = $subsLanguage[0];
278 278
             }
279 279
         }
Please login to merge, or discard this patch.
Blacklight/NameFixer.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -810,7 +810,7 @@  discard block
 block discarded – undo
810 810
             $release = (object) $release;
811 811
         }
812 812
         // If $release does not have a releases_id, we should add it.
813
-        if (! isset($release->releases_id)) {
813
+        if (!isset($release->releases_id)) {
814 814
             $release->releases_id = $release->id;
815 815
         }
816 816
         if ($this->relid !== $release->releases_id) {
@@ -819,7 +819,7 @@  discard block
 block discarded – undo
819 819
                 $this->matched = true;
820 820
                 $this->relid = (int) $release->releases_id;
821 821
 
822
-                $determinedCategory = $this->category->determineCategory($release->groups_id, $newName, ! empty($release->fromname) ? $release->fromname : '');
822
+                $determinedCategory = $this->category->determineCategory($release->groups_id, $newName, !empty($release->fromname) ? $release->fromname : '');
823 823
 
824 824
                 if ($type === 'PAR2, ') {
825 825
                     $newName = ucwords($newName);
@@ -860,7 +860,7 @@  discard block
 block discarded – undo
860 860
                         $this->colorCLI->info($type.$method).
861 861
                         $this->colorCLI->headerOver('Releases ID: ').
862 862
                         $this->colorCLI->info($release->releases_id);
863
-                    if (! empty($release->filename)) {
863
+                    if (!empty($release->filename)) {
864 864
                         $this->colorCLI->headerOver('Filename:  ').
865 865
                             $this->colorCLI->info($release->filename);
866 866
                     }
@@ -1058,7 +1058,7 @@  discard block
 block discarded – undo
1058 1058
 
1059 1059
         if (\strlen($preTitle) >= 15 && preg_match(self::PREDB_REGEX, $preTitle)) {
1060 1060
             $titleMatch = $this->manticore->searchIndexes('releases_rt', $preTitle, ['name', 'searchname', 'filename']);
1061
-            if (! empty($titleMatch)) {
1061
+            if (!empty($titleMatch)) {
1062 1062
                 $join = implode(',', Arr::get($titleMatch, 'id'));
1063 1063
             }
1064 1064
         }
@@ -1155,9 +1155,9 @@  discard block
 block discarded – undo
1155 1155
                 } else {
1156 1156
                     $results = Arr::get($this->manticore->searchIndexes('predb_rt', $preMatch[1], ['filename', 'title']), 'data');
1157 1157
                 }
1158
-                if (! empty($results)) {
1158
+                if (!empty($results)) {
1159 1159
                     foreach ($results as $result) {
1160
-                        if (! empty($result)) {
1160
+                        if (!empty($result)) {
1161 1161
                             $preFtMatch = $this->preMatch($result['filename']);
1162 1162
                             if ($preFtMatch[0] === true) {
1163 1163
                                 $this->_fileName = $result['filename'];
@@ -1187,7 +1187,7 @@  discard block
 block discarded – undo
1187 1187
         // first strip all non-printing chars  from filename
1188 1188
         $this->_fileName = str_replace('/[[:^print:]]/', '', $this->_fileName);
1189 1189
 
1190
-        if ($this->_fileName !== '' && ! str_starts_with($this->_fileName, '.')) {
1190
+        if ($this->_fileName !== '' && !str_starts_with($this->_fileName, '.')) {
1191 1191
             $this->_fileName = match (true) {
1192 1192
                 str_contains($this->_fileName, '.') => Str::beforeLast('.', $this->_fileName),
1193 1193
                 preg_match('/\.part\d+$/', $this->_fileName) => Str::beforeLast('.', $this->_fileName),
@@ -1233,7 +1233,7 @@  discard block
 block discarded – undo
1233 1233
         );
1234 1234
 
1235 1235
         foreach ($row as $item) {
1236
-            if (! empty($item)) {
1236
+            if (!empty($item)) {
1237 1237
                 if ($item->title !== $release->searchname) {
1238 1238
                     $this->updateRelease($release, $item->title, 'predb hash release name: '.$item->source, $echo, $hashtype, $nameStatus, $show, $item->predb_id);
1239 1239
                     $matching++;
@@ -1318,7 +1318,7 @@  discard block
 block discarded – undo
1318 1318
     {
1319 1319
 
1320 1320
         // Get pre style name from releases.name
1321
-        if (preg_match_all(self::PREDB_REGEX, $release->textstring, $hits) && ! preg_match('/Source\s\:/i', $release->textstring)) {
1321
+        if (preg_match_all(self::PREDB_REGEX, $release->textstring, $hits) && !preg_match('/Source\s\:/i', $release->textstring)) {
1322 1322
             foreach ($hits as $hit) {
1323 1323
                 foreach ($hit as $val) {
1324 1324
                     $title = Predb::query()->where('title', trim($val))->select(['title', 'id'])->first();
@@ -1331,7 +1331,7 @@  discard block
 block discarded – undo
1331 1331
         }
1332 1332
 
1333 1333
         // if only processing for PreDB match skip to return
1334
-        if (! $preId) {
1334
+        if (!$preId) {
1335 1335
             switch ($type) {
1336 1336
                 case 'PAR2, ':
1337 1337
                     $this->fileCheck($release, $echo, $type, $nameStatus, $show);
@@ -1371,7 +1371,7 @@  discard block
 block discarded – undo
1371 1371
             }
1372 1372
 
1373 1373
             // set NameFixer process flags after run
1374
-            if ($nameStatus === true && ! $this->matched) {
1374
+            if ($nameStatus === true && !$this->matched) {
1375 1375
                 switch ($type) {
1376 1376
                     case 'NFO, ':
1377 1377
                         $this->_updateSingleColumn('proc_nfo', self::PROC_NFO_DONE, $release->releases_id);
@@ -1421,7 +1421,7 @@  discard block
 block discarded – undo
1421 1421
 
1422 1422
         $result = [];
1423 1423
 
1424
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
1424
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
1425 1425
             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)) {
1426 1426
                 $this->updateRelease($release, $result['0'], 'tvCheck: Title.SxxExx.Text.source.group', $echo, $type, $nameStatus, $show);
1427 1427
             } 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)) {
@@ -1451,7 +1451,7 @@  discard block
 block discarded – undo
1451 1451
 
1452 1452
         $result = [];
1453 1453
 
1454
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
1454
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
1455 1455
             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)) {
1456 1456
                 $this->updateRelease($release, $result['0'], 'movieCheck: Title.year.Text.res.vcod.group', $echo, $type, $nameStatus, $show);
1457 1457
             } 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)) {
@@ -1493,7 +1493,7 @@  discard block
 block discarded – undo
1493 1493
 
1494 1494
         $result = [];
1495 1495
 
1496
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
1496
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
1497 1497
             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)) {
1498 1498
                 $this->updateRelease($release, $result['0'], 'gameCheck: Videogames 1', $echo, $type, $nameStatus, $show);
1499 1499
             } elseif (preg_match('/\w[\-\w.\',;& ]+(GC|NDS|NGC|PS3|WII|XBOX(360)?)[._ -](DUPLEX|iNSOMNi|OneUp|STRANGE|SWAG|SKY)[\-\w.\',;& ]+\w/i', $release->textstring, $result)) {
@@ -1519,7 +1519,7 @@  discard block
 block discarded – undo
1519 1519
 
1520 1520
         $result = [];
1521 1521
 
1522
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
1522
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
1523 1523
             if (preg_match('/\w[\-\w.\',;& ]+(\d{1,10}|Linux|UNIX)[._ -](RPM)?[._ -]?(X64)?[._ -]?(Incl)[._ -](Keygen)[\-\w.\',;& ]+\w/i', $release->textstring, $result)) {
1524 1524
                 $this->updateRelease($release, $result['0'], 'appCheck: Apps 1', $echo, $type, $nameStatus, $show);
1525 1525
             } elseif (preg_match('/\w[\-\w.\',;& ]+\d{1,8}[._ -](winall-freeware)[\-\w.\',;& ]+\w/i', $release->textstring, $result)) {
@@ -1539,7 +1539,7 @@  discard block
 block discarded – undo
1539 1539
 
1540 1540
         $result = [];
1541 1541
 
1542
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
1542
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
1543 1543
             if (preg_match('/:\s*.*[\\\\\/]([A-Z0-9].+?S\d+[.-_ ]?[ED]\d+.+?)\.\w{2,}\s+/i', $release->textstring, $result)) {
1544 1544
                 $this->updateRelease($release, $result['1'], 'nfoCheck: Generic TV 1', $echo, $type, $nameStatus, $show);
1545 1545
             } elseif (preg_match('/(?:(\:\s{1,}))(.+?S\d{1,3}[.-_ ]?[ED]\d{1,3}.+?)(\s{2,}|\r|\n)/i', $release->textstring, $result)) {
@@ -1559,7 +1559,7 @@  discard block
 block discarded – undo
1559 1559
 
1560 1560
         $result = [];
1561 1561
 
1562
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
1562
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
1563 1563
             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)) {
1564 1564
                 $this->updateRelease($release, $result['2'], 'nfoCheck: Generic Movies 1', $echo, $type, $nameStatus, $show);
1565 1565
             } elseif (preg_match('/(?:(\s{2,}))((?!Source).+?[\.\-_ ](19|20)\d\d.+?(BDRip|bluray|DVD(R|Rip)?|XVID).+?)(\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 && preg_match('/(?:\s{2,})(.+?-FM-\d{2}-\d{2})/i', $release->textstring, $result)) {
1581
+        if (!$this->done && $this->relid !== (int) $release->releases_id && preg_match('/(?:\s{2,})(.+?-FM-\d{2}-\d{2})/i', $release->textstring, $result)) {
1582 1582
             $newName = str_replace('-FM-', '-FM-Radio-MP3-', $result['1']);
1583 1583
             $this->updateRelease($release, $newName, 'nfoCheck: Music FM RADIO', $echo, $type, $nameStatus, $show);
1584 1584
         }
@@ -1595,7 +1595,7 @@  discard block
 block discarded – undo
1595 1595
 
1596 1596
         $result = [];
1597 1597
 
1598
-        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)) {
1598
+        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)) {
1599 1599
             $releaseName = $result[0];
1600 1600
             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)) {
1601 1601
                 switch ($result['lang']) {
@@ -1768,7 +1768,7 @@  discard block
 block discarded – undo
1768 1768
 
1769 1769
         $result = [];
1770 1770
 
1771
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
1771
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
1772 1772
             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)) {
1773 1773
                 if (preg_match('/\w[\w.+&*\/\()\',;: -]+\(c\)[\-\w.\',;& ]+\w/i', $release->textstring, $result)) {
1774 1774
                     $releaseName = str_replace(['(c)', '(C)'], '(GAMES) (c)', $result['0']);
@@ -1792,7 +1792,7 @@  discard block
 block discarded – undo
1792 1792
     public function nfoCheckMisc($release, bool $echo, string $type, $nameStatus, $show): void
1793 1793
     {
1794 1794
 
1795
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
1795
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
1796 1796
             if (preg_match('/Supplier.+?IGUANA/i', $release->textstring)) {
1797 1797
                 $releaseName = '';
1798 1798
                 $result = [];
@@ -1831,7 +1831,7 @@  discard block
 block discarded – undo
1831 1831
 
1832 1832
         $result = [];
1833 1833
 
1834
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
1834
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
1835 1835
             switch (true) {
1836 1836
                 case preg_match('/^(.+?(x264|XviD)\-TVP)\\\\/i', $release->textstring, $result):
1837 1837
                     $this->updateRelease($release, $result['1'], 'fileCheck: TVP', $echo, $type, $nameStatus, $show);
@@ -1923,7 +1923,7 @@  discard block
 block discarded – undo
1923 1923
     public function uidCheck($release, $echo, $type, $nameStatus, $show): bool
1924 1924
     {
1925 1925
 
1926
-        if (! empty($release->uid) && ! $this->done && $this->relid !== (int) $release->releases_id) {
1926
+        if (!empty($release->uid) && !$this->done && $this->relid !== (int) $release->releases_id) {
1927 1927
             $result = Release::fromQuery(sprintf(
1928 1928
                 '
1929 1929
 				SELECT r.id AS releases_id, r.size AS relsize, r.name AS textstring, r.searchname, r.fromname, r.predb_id
@@ -1972,8 +1972,8 @@  discard block
 block discarded – undo
1972 1972
     {
1973 1973
 
1974 1974
         $newName = '';
1975
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
1976
-            if (! empty($release->movie_name)) {
1975
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
1976
+            if (!empty($release->movie_name)) {
1977 1977
                 if (preg_match(self::PREDB_REGEX, $release->movie_name, $hit)) {
1978 1978
                     $newName = $hit[1];
1979 1979
                 } elseif (preg_match('/(.+),(\sRMZ\.cr)?$/i', $release->movie_name, $hit)) {
@@ -2004,7 +2004,7 @@  discard block
 block discarded – undo
2004 2004
     public function xxxNameCheck($release, $echo, $type, $nameStatus, $show): bool
2005 2005
     {
2006 2006
 
2007
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
2007
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
2008 2008
             $result = Release::fromQuery(
2009 2009
                 sprintf(
2010 2010
                     "
@@ -2052,7 +2052,7 @@  discard block
 block discarded – undo
2052 2052
     public function srrNameCheck($release, $echo, $type, $nameStatus, $show): bool
2053 2053
     {
2054 2054
 
2055
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
2055
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
2056 2056
             $result = Release::fromQuery(
2057 2057
                 sprintf(
2058 2058
                     "
@@ -2100,7 +2100,7 @@  discard block
 block discarded – undo
2100 2100
     public function hashCheck($release, $echo, $type, $nameStatus, $show): bool
2101 2101
     {
2102 2102
 
2103
-        if (! $this->done && $this->relid !== (int) $release->releases_id) {
2103
+        if (!$this->done && $this->relid !== (int) $release->releases_id) {
2104 2104
             $result = Release::fromQuery(sprintf(
2105 2105
                 '
2106 2106
 				SELECT r.id AS releases_id, r.size AS relsize, r.name AS textstring, r.searchname, r.fromname, r.predb_id
@@ -2146,7 +2146,7 @@  discard block
 block discarded – undo
2146 2146
     public function crcCheck($release, $echo, $type, $nameStatus, $show): bool
2147 2147
     {
2148 2148
 
2149
-        if (! $this->done && $this->relid !== (int) $release->releases_id && $release->textstring !== '') {
2149
+        if (!$this->done && $this->relid !== (int) $release->releases_id && $release->textstring !== '') {
2150 2150
             $result = Release::fromQuery(
2151 2151
                 sprintf(
2152 2152
                     '
@@ -2207,11 +2207,11 @@  discard block
 block discarded – undo
2207 2207
         $this->_fileName = $release->textstring;
2208 2208
         $this->_cleanMatchFiles();
2209 2209
         $this->cleanFileNames();
2210
-        if (! empty($this->_fileName)) {
2210
+        if (!empty($this->_fileName)) {
2211 2211
             if (config('nntmux.elasticsearch_enabled') === true) {
2212 2212
                 $results = $this->elasticsearch->searchPreDb($this->_fileName);
2213 2213
                 foreach ($results as $hit) {
2214
-                    if (! empty($hit)) {
2214
+                    if (!empty($hit)) {
2215 2215
                         $this->updateRelease($release, $hit['title'], 'PreDb: Filename match', $echo, $type, $nameStatus, $show, $hit['id']);
2216 2216
 
2217 2217
                         return true;
@@ -2219,9 +2219,9 @@  discard block
 block discarded – undo
2219 2219
                 }
2220 2220
             } else {
2221 2221
                 $predbSearch = Arr::get($this->manticore->searchIndexes('predb_rt', $this->_fileName, ['filename', 'title']), 'data');
2222
-                if (! empty($predbSearch)) {
2222
+                if (!empty($predbSearch)) {
2223 2223
                     foreach ($predbSearch as $hit) {
2224
-                        if (! empty($hit)) {
2224
+                        if (!empty($hit)) {
2225 2225
                             $this->updateRelease($release, $hit['title'], 'PreDb: Filename match', $echo, $type, $nameStatus, $show);
2226 2226
 
2227 2227
                             return true;
@@ -2243,11 +2243,11 @@  discard block
 block discarded – undo
2243 2243
         $this->_fileName = $release->textstring;
2244 2244
         $this->_cleanMatchFiles();
2245 2245
         $this->cleanFileNames();
2246
-        if (! empty($this->_fileName)) {
2246
+        if (!empty($this->_fileName)) {
2247 2247
             if (config('nntmux.elasticsearch_enabled') === true) {
2248 2248
                 $results = $this->elasticsearch->searchPreDb($this->_fileName);
2249 2249
                 foreach ($results as $hit) {
2250
-                    if (! empty($hit)) {
2250
+                    if (!empty($hit)) {
2251 2251
                         $this->updateRelease($release, $hit['title'], 'PreDb: Title match', $echo, $type, $nameStatus, $show, $hit['id']);
2252 2252
 
2253 2253
                         return true;
@@ -2255,9 +2255,9 @@  discard block
 block discarded – undo
2255 2255
                 }
2256 2256
             } else {
2257 2257
                 $results = Arr::get($this->manticore->searchIndexes('predb_rt', $this->_fileName, ['title']), 'data');
2258
-                if (! empty($results)) {
2258
+                if (!empty($results)) {
2259 2259
                     foreach ($results as $hit) {
2260
-                        if (! empty($hit)) {
2260
+                        if (!empty($hit)) {
2261 2261
                             $this->updateRelease($release, $hit['title'], 'PreDb: Title match', $echo, $type, $nameStatus, $show);
2262 2262
 
2263 2263
                             return true;
@@ -2273,10 +2273,10 @@  discard block
 block discarded – undo
2273 2273
     private function cleanFileNames(): array|string|null
2274 2274
     {
2275 2275
         if (preg_match('/(\.[a-zA-Z]{2})?(\.4k|\.fullhd|\.hd|\.int|\.\d+)?$/i', $this->_fileName, $hit)) {
2276
-            if (! empty($hit[1]) && preg_match('/\.[a-zA-Z]{2}/i', $hit[1])) {
2276
+            if (!empty($hit[1]) && preg_match('/\.[a-zA-Z]{2}/i', $hit[1])) {
2277 2277
                 $this->_fileName = preg_replace('/\.[a-zA-Z]{2}\./i', '.', $this->_fileName);
2278 2278
             }
2279
-            if (! empty($hit[2])) {
2279
+            if (!empty($hit[2])) {
2280 2280
                 if (preg_match('/\.4k$/', $hit[2])) {
2281 2281
                     $this->_fileName = preg_replace('/\.4k$/', '.2160p', $this->_fileName);
2282 2282
                 }
Please login to merge, or discard this patch.
app/Models/MediaInfo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     public static function addData($id, MediaInfoContainer $xmlArray): void
16 16
     {
17 17
         $mediainfoArray = $xmlArray->getGeneral();
18
-        if (! $mediainfoArray) {
18
+        if (!$mediainfoArray) {
19 19
             return;
20 20
         }
21 21
 
Please login to merge, or discard this patch.
app/Livewire/Forms/LoginForm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     {
31 31
         $this->ensureIsNotRateLimited();
32 32
 
33
-        if (! Auth::attempt($this->only(['email', 'password']), $this->remember)) {
33
+        if (!Auth::attempt($this->only(['email', 'password']), $this->remember)) {
34 34
             RateLimiter::hit($this->throttleKey());
35 35
 
36 36
             throw ValidationException::withMessages([
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     protected function ensureIsNotRateLimited(): void
48 48
     {
49
-        if (! RateLimiter::tooManyAttempts($this->throttleKey(), 5)) {
49
+        if (!RateLimiter::tooManyAttempts($this->throttleKey(), 5)) {
50 50
             return;
51 51
         }
52 52
 
Please login to merge, or discard this patch.
app/Http/Controllers/SearchController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             foreach ($releases->getBrowseOrdering() as $orderType) {
66 66
                 $this->smarty->assign(
67 67
                     'orderby'.$orderType,
68
-                    url('/search?search='.htmlentities($searchString['searchname'], ENT_QUOTES | ENT_HTML5).'&t='.implode(',', $categoryID).'&amp;ob='.$orderType));
68
+                    url('/search?search='.htmlentities($searchString['searchname'], ENT_QUOTES|ENT_HTML5).'&t='.implode(',', $categoryID).'&amp;ob='.$orderType));
69 69
             }
70 70
 
71 71
             $rslt = $releases->search(
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         if ($searchType !== 'basic' && $request->missing('id') && $request->missing('subject') && $request->anyFilled(['searchadvr', 'searchadvsubject', 'searchadvfilename', 'searchadvposter'])) {
124 124
             $orderByString = '';
125 125
             foreach ($searchVars as $searchVarKey => $searchVar) {
126
-                $orderByString .= "&$searchVarKey=".htmlentities($searchVar, ENT_QUOTES | ENT_HTML5);
126
+                $orderByString .= "&$searchVarKey=".htmlentities($searchVar, ENT_QUOTES|ENT_HTML5);
127 127
             }
128 128
             $orderByString = ltrim($orderByString, '&');
129 129
 
Please login to merge, or discard this patch.
Blacklight/processing/tv/TVDB.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
                 }
130 130
 
131 131
                 if ((int) $videoId > 0 && (int) $tvDbId > 0) {
132
-                    if (! empty($tvdbShow['poster'])) { // Use TVDB poster if available
132
+                    if (!empty($tvdbShow['poster'])) { // Use TVDB poster if available
133 133
                         $this->getPoster($videoId);
134 134
                     } else { // Check Fanart.tv for poster
135 135
                         $poster = $this->fanart->getTVFanArt($tvDbId);
@@ -139,8 +139,8 @@  discard block
 block discarded – undo
139 139
                         }
140 140
                     }
141 141
 
142
-                    $seasonNo = (! empty($release['season']) ? preg_replace('/^S0*/i', '', $release['season']) : '');
143
-                    $episodeNo = (! empty($release['episode']) ? preg_replace('/^E0*/i', '', $release['episode']) : '');
142
+                    $seasonNo = (!empty($release['season']) ? preg_replace('/^S0*/i', '', $release['season']) : '');
143
+                    $episodeNo = (!empty($release['episode']) ? preg_replace('/^E0*/i', '', $release['episode']) : '');
144 144
 
145 145
                     if ($episodeNo === 'all') {
146 146
                         // Set the video ID and leave episode 0
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
                     }
152 152
 
153 153
                     // Download all episodes if new show to reduce API/bandwidth usage
154
-                    if (! $this->countEpsByVideoID($videoId)) {
154
+                    if (!$this->countEpsByVideoID($videoId)) {
155 155
                         $this->getEpisodeInfo($tvDbId, -1, -1, $videoId);
156 156
                     }
157 157
 
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
                     }
252 252
 
253 253
                     // Check for show aliases and try match those too
254
-                    if (! empty($show->aliases)) {
254
+                    if (!empty($show->aliases)) {
255 255
                         foreach ($show->aliases as $key => $name) {
256 256
                             $matchPercent = $this->checkMatch(strtolower($name), strtolower($name), $matchPercent);
257 257
                             if ($matchPercent > $highestMatch) {
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
                     }
263 263
                 }
264 264
             }
265
-            if (! empty($highest)) {
265
+            if (!empty($highest)) {
266 266
                 $return = $this->formatShowInfo($highest);
267 267
             }
268 268
         }
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
     {
299 299
         $return = $response = false;
300 300
 
301
-        if (! $this->local) {
301
+        if (!$this->local) {
302 302
             if ($videoId > 0) {
303 303
                 try {
304 304
                     $response = $this->client->series()->allEpisodes($tvDbId);
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
             $poster = $this->client->series()->artworks($show->tvdb_id);
357 357
             // Grab the image with the highest score where type == 2
358 358
             $poster = collect($poster)->where('type', 2)->sortByDesc('score')->first();
359
-            $this->posterUrl = ! empty($poster->image) ? $poster->image : '';
359
+            $this->posterUrl = !empty($poster->image) ? $poster->image : '';
360 360
         } catch (ResourceNotFoundException $e) {
361 361
             $this->colorCli->climate()->error('Poster image not found on TVDB');
362 362
         } catch (UnauthorizedException $error) {
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
             'tvrage' => 0,
397 397
             'tvmaze' => 0,
398 398
             'tmdb' => 0,
399
-            'aliases' => ! empty($show->aliases) ? $show->aliases : '',
399
+            'aliases' => !empty($show->aliases) ? $show->aliases : '',
400 400
             'localzone' => "''",
401 401
         ];
402 402
     }
Please login to merge, or discard this patch.
app/Models/Settings.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
         // If there's an override and no mutator has been explicitly defined on
122 122
         // the model then use the override value
123
-        if ($override && ! $this->hasGetMutator($key)) {
123
+        if ($override && !$this->hasGetMutator($key)) {
124 124
             return $override->value;
125 125
         }
126 126
 
@@ -141,9 +141,9 @@  discard block
 block discarded – undo
141 141
         $results = self::cursor()->remember();
142 142
 
143 143
         $tree = [];
144
-        if (! empty($results)) {
144
+        if (!empty($results)) {
145 145
             foreach ($results as $result) {
146
-                if (! $excludeUnsectioned || ! empty($result->section)) {
146
+                if (!$excludeUnsectioned || !empty($result->section)) {
147 147
                     $tree[$result->section][$result->subsection][$result->name] =
148 148
                         ['value' => $result->value, 'hint' => $result->hint];
149 149
                 }
Please login to merge, or discard this patch.
misc/testing/Dev/clean_nzbs.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,14 +14,14 @@  discard block
 block discarded – undo
14 14
 $dir = resource_path().'/movednzbs/';
15 15
 $colorCli = new ColorCLI;
16 16
 
17
-if (! isset($argv[1]) || ! in_array($argv[1], ['true', 'move'])) {
17
+if (!isset($argv[1]) || !in_array($argv[1], ['true', 'move'])) {
18 18
     $colorCli->error("This script can remove all nzbs not found in the db and all releases with no nzbs found. It can also move invalid nzbs.\n\n"
19 19
         ."php $argv[0] true     ...: For a dry run, to see how many would be moved.\n"
20 20
         ."php $argv[0] move     ...: Move NZBs that are possibly bad or have no release. They are moved into this folder: $dir");
21 21
     exit();
22 22
 }
23 23
 
24
-if (! File::isDirectory($dir) && ! File::makeDirectory($dir)) {
24
+if (!File::isDirectory($dir) && !File::makeDirectory($dir)) {
25 25
     exit("ERROR: Could not create folder [$dir].".PHP_EOL);
26 26
 }
27 27
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     if (File::isFile($filePath) && $guid) {
45 45
         $nzbfile = Utility::unzipGzipFile($filePath);
46 46
         $nzbContents = $nzb->nzbFileList($nzbfile, ['no-file-key' => false, 'strip-count' => true]);
47
-        if (! $nzbfile || ! @simplexml_load_string($nzbfile) || count($nzbContents) === 0) {
47
+        if (!$nzbfile || !@simplexml_load_string($nzbfile) || count($nzbContents) === 0) {
48 48
             if ($argv[1] === 'move') {
49 49
                 rename($filePath, $dir.$guid.'.nzb.gz');
50 50
             }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 $res = Release::query()->select(['id', 'guid', 'nzbstatus'])->get();
66 66
 foreach ($res as $row) {
67 67
     $nzbpath = $nzb->getNZBPath($row->guid);
68
-    if (! File::isFile($nzbpath)) {
68
+    if (!File::isFile($nzbpath)) {
69 69
         $deleted++;
70 70
         $releases->deleteSingle(['g' => $row->guid, 'i' => $row->id], $nzb, $releaseImage);
71 71
     } elseif ($row->nzbstatus !== 1) {
Please login to merge, or discard this patch.
misc/testing/Releases/recategorize.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 $colorCli = new ColorCLI;
12 12
 
13
-if (! (isset($argv[1]) && ($argv[1] === 'all' || $argv[1] === 'misc' || preg_match('/\([\d, ]+\)/', $argv[1]) || is_numeric($argv[1])))) {
13
+if (!(isset($argv[1]) && ($argv[1] === 'all' || $argv[1] === 'misc' || preg_match('/\([\d, ]+\)/', $argv[1]) || is_numeric($argv[1])))) {
14 14
     $colorCli->error(
15 15
         "\nThis script will attempt to re-categorize releases and is useful if changes have been made to Category.php.\n"
16 16
         ."No updates will be done unless the category changes\n"
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     $timeStart = now();
41 41
     $chgCount = categorizeRelease($argv, true);
42 42
     $time = now()->diffInSeconds($timeStart, true);
43
-    if (! isset($argv[2])) {
43
+    if (!isset($argv[2])) {
44 44
         $colorCli->header('Finished re-categorizing '.number_format($chgCount).' releases in '.$time.' seconds, using the searchname.').PHP_EOL;
45 45
     } else {
46 46
         $colorCli->header('Finished re-categorizing in '.$time.' seconds , using the searchname.'.PHP_EOL
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     $consoleTools = new ConsoleTools;
69 69
     $relCount = $chgCount = 0;
70 70
     if ($total > 0) {
71
-        $query->chunk('100', function ($results) use ($update, $relCount, $chgCount) {
71
+        $query->chunk('100', function($results) use ($update, $relCount, $chgCount) {
72 72
             $cat = new Categorize;
73 73
             foreach ($results as $result) {
74 74
                 $catId = $cat->determineCategory($result->groups_id, $result->searchname, $result->fromname);
Please login to merge, or discard this patch.