@@ -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 | |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | use Illuminate\Support\Facades\DB; |
| 17 | 17 | |
| 18 | 18 | $colorCli = new ColorCLI; |
| 19 | -if (! isset($argv[1])) { |
|
| 19 | +if (!isset($argv[1])) { |
|
| 20 | 20 | $colorCli->error('This script is not intended to be run manually, it is called from Multiprocessing.'); |
| 21 | 21 | exit(); |
| 22 | 22 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | if (preg_match('/[a-fA-F0-9]{32,40}/i', $release->name, $hits)) { |
| 89 | 89 | $nameFixer->matchPredbHash($hits[0], $release, true, 1, true); |
| 90 | 90 | } |
| 91 | - if ($nameFixer->matched === false && ! empty($release->filehash) && preg_match('/[a-fA-F0-9]{32,40}/i', $release->filehash, $hits)) { |
|
| 91 | + if ($nameFixer->matched === false && !empty($release->filehash) && preg_match('/[a-fA-F0-9]{32,40}/i', $release->filehash, $hits)) { |
|
| 92 | 92 | $colorCli->primaryOver('h'); |
| 93 | 93 | $nameFixer->matchPredbHash($hits[0], $release, true, 1, true); |
| 94 | 94 | } |
@@ -99,12 +99,12 @@ discard block |
||
| 99 | 99 | } |
| 100 | 100 | $nameFixer->reset(); |
| 101 | 101 | |
| 102 | - if ((int) $release->proc_uid === NameFixer::PROC_UID_NONE && (! empty($release->uid) || ! empty($release->mediainfo))) { |
|
| 102 | + if ((int) $release->proc_uid === NameFixer::PROC_UID_NONE && (!empty($release->uid) || !empty($release->mediainfo))) { |
|
| 103 | 103 | $colorCli->primaryOver('U'); |
| 104 | - if (! empty($release->uid)) { |
|
| 104 | + if (!empty($release->uid)) { |
|
| 105 | 105 | $nameFixer->checkName($release, true, 'UID, ', 1, true); |
| 106 | 106 | } |
| 107 | - if (empty($nameFixer->matched) && ! empty($release->mediainfo)) { |
|
| 107 | + if (empty($nameFixer->matched) && !empty($release->mediainfo)) { |
|
| 108 | 108 | $nameFixer->checkName($release, true, 'Mediainfo, ', 1, true); |
| 109 | 109 | } |
| 110 | 110 | } |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | } |
| 117 | 117 | $nameFixer->reset(); |
| 118 | 118 | |
| 119 | - if ((int) $release->proc_crc32 === NameFixer::PROC_CRC_NONE && ! empty($release->crc)) { |
|
| 119 | + if ((int) $release->proc_crc32 === NameFixer::PROC_CRC_NONE && !empty($release->crc)) { |
|
| 120 | 120 | $colorCli->primaryOver('C'); |
| 121 | 121 | $nameFixer->checkName($release, true, 'CRC32, ', 1, true); |
| 122 | 122 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | } |
| 141 | 141 | $nameFixer->reset(); |
| 142 | 142 | |
| 143 | - if ((int) $release->proc_hash16k === NameFixer::PROC_HASH16K_NONE && ! empty($release->hash)) { |
|
| 143 | + if ((int) $release->proc_hash16k === NameFixer::PROC_HASH16K_NONE && !empty($release->hash)) { |
|
| 144 | 144 | $colorCli->primaryOver('H'); |
| 145 | 145 | $nameFixer->checkName($release, true, 'PAR2 hash, ', 1, true); |
| 146 | 146 | } |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | } |
| 153 | 153 | $nameFixer->reset(); |
| 154 | 154 | |
| 155 | - if ((int) $release->nfostatus === Nfo::NFO_FOUND && (int) $release->proc_nfo === NameFixer::PROC_NFO_NONE && ! empty($release->textstring) && ! preg_match('/^=newz\[NZB\]=\w+/', $release->textstring)) { |
|
| 155 | + if ((int) $release->nfostatus === Nfo::NFO_FOUND && (int) $release->proc_nfo === NameFixer::PROC_NFO_NONE && !empty($release->textstring) && !preg_match('/^=newz\[NZB\]=\w+/', $release->textstring)) { |
|
| 156 | 156 | $colorCli->primaryOver('n'); |
| 157 | 157 | $nameFixer->done = $nameFixer->matched = false; |
| 158 | 158 | $nameFixer->checkName($release, true, 'NFO, ', 1, true); |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | |
| 191 | 191 | if ((int) $release->proc_par2 === NameFixer::PROC_PAR2_NONE) { |
| 192 | 192 | $colorCli->primaryOver('p'); |
| 193 | - if (! isset($nzbcontents)) { |
|
| 193 | + if (!isset($nzbcontents)) { |
|
| 194 | 194 | $nntp = new NNTP; |
| 195 | 195 | if (((int) Settings::settingValue('..alternate_nntp') === 1 ? $nntp->doConnect(true, true) : $nntp->doConnect()) !== true) { |
| 196 | 196 | $colorCli->error('Unable to connect to usenet.'); |
@@ -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 |