@@ -8,7 +8,7 @@ |
||
8 | 8 | $fanart = new FanartTV(config('nntmux_api.fanarttv_api_key')); |
9 | 9 | $colorCli = new ColorCLI; |
10 | 10 | |
11 | -if (! empty($argv[1])) { |
|
11 | +if (!empty($argv[1])) { |
|
12 | 12 | // Test if you can fetch Fanart.TV images |
13 | 13 | |
14 | 14 | // Search for a movie/tv |
@@ -7,7 +7,7 @@ |
||
7 | 7 | $c = new Blacklight\ColorCLI; |
8 | 8 | $tvmaze = new TVMaze; |
9 | 9 | |
10 | -if (! empty($argv[1]) && is_numeric($argv[2]) && is_numeric($argv[3])) { |
|
10 | +if (!empty($argv[1]) && is_numeric($argv[2]) && is_numeric($argv[3])) { |
|
11 | 11 | // Test if your TVMaze API configuration is working |
12 | 12 | // If it works you should get a var dumped array of the show/season/episode entered |
13 | 13 |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | |
8 | 8 | $colorCli = new ColorCLI; |
9 | 9 | |
10 | -if (! empty($argv[1]) && is_numeric($argv[2]) && is_numeric($argv[3])) { |
|
10 | +if (!empty($argv[1]) && is_numeric($argv[2]) && is_numeric($argv[3])) { |
|
11 | 11 | // Test if your TMDB API configuration is working |
12 | 12 | // If it works you should get a var dumped array of the show/season/episode entered |
13 | 13 | |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | print_r($series); |
20 | 20 | |
21 | 21 | // Use the first show found (highest match) and get the requested season/episode from $argv |
22 | - if (! empty($series) && $series['total_results'] > 0) { |
|
22 | + if (!empty($series) && $series['total_results'] > 0) { |
|
23 | 23 | $seriesAppends = [ |
24 | 24 | 'networks' => Tmdb::getTvApi()->getTvshow($series['results'][0]['id'])['networks'], |
25 | 25 | 'alternative_titles' => Tmdb::getTvApi()->getAlternativeTitles($series['results'][0]['id']), |
@@ -7,7 +7,7 @@ |
||
7 | 7 | $c = new Blacklight\ColorCLI; |
8 | 8 | $tvDB = new TVDB; |
9 | 9 | |
10 | -if (! empty($argv[1]) && isset($argv[2], $argv[3]) && is_numeric($argv[2]) && is_numeric($argv[3])) { |
|
10 | +if (!empty($argv[1]) && isset($argv[2], $argv[3]) && is_numeric($argv[2]) && is_numeric($argv[3])) { |
|
11 | 11 | // Test if your TvDB API key and configuration are working |
12 | 12 | // If it works you should get a var dumped array of the show/season/episode entered |
13 | 13 |
@@ -8,10 +8,10 @@ |
||
8 | 8 | // Create the connection here and pass |
9 | 9 | $nntp = new NNTP; |
10 | 10 | |
11 | -if (isset($argv[1]) && $argv[1] === 'all' && ! isset($argv[2])) { |
|
11 | +if (isset($argv[1]) && $argv[1] === 'all' && !isset($argv[2])) { |
|
12 | 12 | $backfill = new Backfill(['NNTP' => $nntp]); |
13 | 13 | $backfill->backfillAllGroups(); |
14 | -} elseif (isset($argv[1]) && ! isset($argv[2]) && preg_match('/^alt\.binaries\..+$/i', $argv[1])) { |
|
14 | +} elseif (isset($argv[1]) && !isset($argv[2]) && preg_match('/^alt\.binaries\..+$/i', $argv[1])) { |
|
15 | 15 | $backfill = new Backfill(['NNTP' => $nntp]); |
16 | 16 | $backfill->backfillAllGroups($argv[1]); |
17 | 17 | } elseif (isset($argv[1], $argv[2]) && is_numeric($argv[2]) && preg_match('/^alt\.binaries\..+$/i', $argv[1])) { |
@@ -34,7 +34,7 @@ |
||
34 | 34 | 'false', |
35 | 35 | ]; |
36 | 36 | |
37 | -if (! isset($argv[1], $argv[2]) || ! in_array($argv[1], $args, false) || ! in_array($argv[2], $bool, false)) { |
|
37 | +if (!isset($argv[1], $argv[2]) || !in_array($argv[1], $args, false) || !in_array($argv[2], $bool, false)) { |
|
38 | 38 | exit( |
39 | 39 | (new Blacklight\ColorCLI)->error( |
40 | 40 | "\nIncorrect arguments.\n" |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use Blacklight\ColorCLI; |
6 | 6 | use Blacklight\NameFixer; |
7 | 7 | |
8 | -if (empty($argv[1]) && ($argv[1] !== 'full' || ! is_numeric($argv[1]))) { |
|
8 | +if (empty($argv[1]) && ($argv[1] !== 'full' || !is_numeric($argv[1]))) { |
|
9 | 9 | exit( |
10 | 10 | (new ColorCLI)->error( |
11 | 11 | PHP_EOL |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $this->colorCLI->header('Removing '.($type === '' ? 'All crap releases ' : $type.' crap releases').' - no time limit.', true); |
155 | 155 | } |
156 | 156 | } else { |
157 | - if (! is_numeric($time)) { |
|
157 | + if (!is_numeric($time)) { |
|
158 | 158 | $this->error = 'Error, time must be a number or full.'; |
159 | 159 | |
160 | 160 | return $this->returnError(); |
@@ -630,7 +630,7 @@ discard block |
||
630 | 630 | { |
631 | 631 | $status = sprintf('AND status = %d', Binaries::BLACKLIST_ENABLED); |
632 | 632 | |
633 | - if (! empty($this->blacklistID) && $this->delete === false) { |
|
633 | + if (!empty($this->blacklistID) && $this->delete === false) { |
|
634 | 634 | $status = ''; |
635 | 635 | } |
636 | 636 | |
@@ -727,7 +727,7 @@ discard block |
||
727 | 727 | $searchResult = (new ElasticSearchSiteSearch)->indexSearch($regexMatch, 100); |
728 | 728 | } else { |
729 | 729 | $searchResult = (new ManticoreSearch)->searchIndexes('releases_rt', $regexMatch, ['name,searchname']); |
730 | - if (! empty($searchResult)) { |
|
730 | + if (!empty($searchResult)) { |
|
731 | 731 | $searchResult = Arr::wrap(Arr::get($searchResult, 'id')); |
732 | 732 | } |
733 | 733 | } |
@@ -741,7 +741,7 @@ discard block |
||
741 | 741 | SELECT r.guid, r.searchname, r.id |
742 | 742 | FROM releases r %s %s %s %s', |
743 | 743 | $regexSQL, |
744 | - ! empty($searchResult) ? ' WHERE r.id IN ('.implode(',', $searchResult).')' : '', |
|
744 | + !empty($searchResult) ? ' WHERE r.id IN ('.implode(',', $searchResult).')' : '', |
|
745 | 745 | $groupID, |
746 | 746 | $this->crapTime, |
747 | 747 | ); |
@@ -1107,7 +1107,7 @@ discard block |
||
1107 | 1107 | } |
1108 | 1108 | break; |
1109 | 1109 | case 'size': |
1110 | - if (! is_numeric($args[2])) { |
|
1110 | + if (!is_numeric($args[2])) { |
|
1111 | 1111 | break; |
1112 | 1112 | } |
1113 | 1113 | switch ($args[1]) { |
@@ -1122,7 +1122,7 @@ discard block |
||
1122 | 1122 | } |
1123 | 1123 | break; |
1124 | 1124 | case 'adddate': |
1125 | - if (! is_numeric($args[2])) { |
|
1125 | + if (!is_numeric($args[2])) { |
|
1126 | 1126 | break; |
1127 | 1127 | } |
1128 | 1128 | switch ($args[1]) { |
@@ -1135,7 +1135,7 @@ discard block |
||
1135 | 1135 | } |
1136 | 1136 | break; |
1137 | 1137 | case 'postdate': |
1138 | - if (! is_numeric($args[2])) { |
|
1138 | + if (!is_numeric($args[2])) { |
|
1139 | 1139 | break; |
1140 | 1140 | } |
1141 | 1141 | switch ($args[1]) { |
@@ -1148,7 +1148,7 @@ discard block |
||
1148 | 1148 | } |
1149 | 1149 | break; |
1150 | 1150 | case 'completion': |
1151 | - if (! is_numeric($args[2])) { |
|
1151 | + if (!is_numeric($args[2])) { |
|
1152 | 1152 | break; |
1153 | 1153 | } |
1154 | 1154 | if ($args[1] === 'smaller') { |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $this->colorCli = new ColorCLI; |
76 | 76 | |
77 | 77 | $this->tmpPath = config('nntmux.tmp_unrar_path'); |
78 | - if (! preg_match('/[\/\\\\]$/', $this->tmpPath)) { |
|
78 | + if (!preg_match('/[\/\\\\]$/', $this->tmpPath)) { |
|
79 | 79 | $this->tmpPath .= '/'; |
80 | 80 | } |
81 | 81 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $size = \strlen($possibleNFO); |
137 | 137 | if ($size < 65535 && |
138 | 138 | $size > 11 && |
139 | - ! preg_match( |
|
139 | + !preg_match( |
|
140 | 140 | '/\A(\s*<\?xml|=newz\[NZB\]=|RIFF|\s*[RP]AR|.{0,10}(JFIF|matroska|ftyp|ID3))|;\s*Generated\s*by.*SF\w/i', |
141 | 141 | $possibleNFO |
142 | 142 | )) { |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | |
147 | 147 | // Linux boxes have 'file' (so should Macs), Windows *can* have it too: see GNUWIN.txt in docs. |
148 | 148 | $result = Utility::fileInfo($tmpPath); |
149 | - if (! empty($result)) { |
|
149 | + if (!empty($result)) { |
|
150 | 150 | // Check if it's text. |
151 | 151 | if (preg_match('/(ASCII|ISO-8859|UTF-(8|16|32).*?)\s*text/', $result)) { |
152 | 152 | @File::delete($tmpPath); |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | |
200 | 200 | Release::whereId($release->id)->update(['nfostatus' => self::NFO_FOUND]); |
201 | 201 | |
202 | - if (! isset($release->completion)) { |
|
202 | + if (!isset($release->completion)) { |
|
203 | 203 | $release->completion = 0; |
204 | 204 | } |
205 | 205 |