@@ -10,7 +10,7 @@ discard block |
||
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 |
||
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 |
||
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); |
@@ -7,7 +7,7 @@ |
||
7 | 7 | $c = new Blacklight\ColorCLI; |
8 | 8 | $trakt = new TraktTv; |
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 Trakt API key and configuration are working |
12 | 12 | // If it works you should get a printed array of the show/season/episode entered |
13 | 13 |
@@ -8,7 +8,7 @@ |
||
8 | 8 | $omdb = new OMDbAPI(config('nntmux_api.omdb_api_key')); |
9 | 9 | $colorCli = new ColorCLI; |
10 | 10 | |
11 | -if (! empty($argv[1]) && ! empty($argv[2]) && ($argv[2] !== 'series' || $argv[2] !== 'movie')) { |
|
11 | +if (!empty($argv[1]) && !empty($argv[2]) && ($argv[2] !== 'series' || $argv[2] !== 'movie')) { |
|
12 | 12 | // Test if your OMDb API key and configuration are working |
13 | 13 | // If it works you should get a printed array of the show entered |
14 | 14 |
@@ -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" |