@@ -29,7 +29,7 @@ |
||
| 29 | 29 | { |
| 30 | 30 | $type = $this->argument('type'); |
| 31 | 31 | |
| 32 | - if (! \in_array($type, ['backfill', 'binaries'], true)) { |
|
| 32 | + if (!\in_array($type, ['backfill', 'binaries'], true)) { |
|
| 33 | 33 | $this->error('Type must be either: binaries or backfill'); |
| 34 | 34 | $this->line(''); |
| 35 | 35 | $this->line('binaries => Do Safe Binaries update'); |
@@ -97,7 +97,7 @@ |
||
| 97 | 97 | $this->colorCli->header('Resetting expired collections. This may take some time...'); |
| 98 | 98 | |
| 99 | 99 | try { |
| 100 | - DB::transaction(function () use ($delayTime) { |
|
| 100 | + DB::transaction(function() use ($delayTime) { |
|
| 101 | 101 | Collection::query() |
| 102 | 102 | ->where('dateadded', '<', now()->subHours($delayTime)) |
| 103 | 103 | ->update(['dateadded' => now()]); |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | $firstArticle = (int) $this->argument('first'); |
| 41 | 41 | $lastArticle = (int) $this->argument('last'); |
| 42 | 42 | |
| 43 | - if (! \in_array($mode, ['binaries', 'backfill'], true)) { |
|
| 43 | + if (!\in_array($mode, ['binaries', 'backfill'], true)) { |
|
| 44 | 44 | $this->error('Mode must be either "binaries" or "backfill".'); |
| 45 | 45 | |
| 46 | 46 | return self::FAILURE; |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | $echoArg = $this->argument('echo'); |
| 51 | 51 | $echo = ($echoArg === null || $echoArg === 'true'); |
| 52 | 52 | |
| 53 | - if (! array_key_exists($type, $this->validTypes)) { |
|
| 53 | + if (!array_key_exists($type, $this->validTypes)) { |
|
| 54 | 54 | $this->error("Invalid type: {$type}"); |
| 55 | 55 | $this->showHelp(); |
| 56 | 56 | |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | { |
| 30 | 30 | $type = $this->argument('type'); |
| 31 | 31 | |
| 32 | - if (! \in_array($type, ['standard', 'predbft'], true)) { |
|
| 32 | + if (!\in_array($type, ['standard', 'predbft'], true)) { |
|
| 33 | 33 | $this->error('Type must be either: standard or predbft'); |
| 34 | 34 | $this->line(''); |
| 35 | 35 | $this->line('standard => Attempt to fix release name using standard methods'); |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | $guid = $this->argument('guid'); |
| 39 | 39 | $renamed = $this->argument('renamed') ?? ''; |
| 40 | 40 | |
| 41 | - if (! $this->isValidChar($guid)) { |
|
| 41 | + if (!$this->isValidChar($guid)) { |
|
| 42 | 42 | $this->error('GUID character must be a-f or 0-9.'); |
| 43 | 43 | |
| 44 | 44 | return self::FAILURE; |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | $type = (int) $this->argument('type'); |
| 36 | 36 | $quantity = $this->argument('quantity'); |
| 37 | 37 | |
| 38 | - if (! \in_array($type, [1, 2], true)) { |
|
| 38 | + if (!\in_array($type, [1, 2], true)) { |
|
| 39 | 39 | $this->error('Invalid backfill type. Must be 1 (interval) or 2 (all).'); |
| 40 | 40 | |
| 41 | 41 | return self::FAILURE; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | $nntp = $this->getNntp(); |
| 44 | 44 | $binaries = new Binaries(['NNTP' => $nntp]); |
| 45 | 45 | |
| 46 | - if ($groupName && ! is_numeric($groupName)) { |
|
| 46 | + if ($groupName && !is_numeric($groupName)) { |
|
| 47 | 47 | $this->info("Updating group: {$groupName}"); |
| 48 | 48 | $this->updateSingleGroup($binaries, $groupName, $maxHeaders); |
| 49 | 49 | } else { |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | { |
| 68 | 68 | $group = UsenetGroup::getByName($groupName)->toArray(); |
| 69 | 69 | |
| 70 | - if (! is_array($group)) { |
|
| 70 | + if (!is_array($group)) { |
|
| 71 | 71 | throw new \Exception("Group not found: {$groupName}"); |
| 72 | 72 | } |
| 73 | 73 | |
@@ -102,13 +102,13 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | // Process UID |
| 104 | 104 | if ((int) $release->proc_uid === NameFixer::PROC_UID_NONE && |
| 105 | - (! empty($release->uid) || ! empty($release->mediainfo))) { |
|
| 105 | + (!empty($release->uid) || !empty($release->mediainfo))) { |
|
| 106 | 106 | |
| 107 | - if (! empty($release->uid)) { |
|
| 107 | + if (!empty($release->uid)) { |
|
| 108 | 108 | $this->nameFixer->checkName($release, true, 'UID, ', 1, true); |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | - if (empty($this->nameFixer->matched) && ! empty($release->mediainfo)) { |
|
| 111 | + if (empty($this->nameFixer->matched) && !empty($release->mediainfo)) { |
|
| 112 | 112 | $this->nameFixer->checkName($release, true, 'Mediainfo, ', 1, true); |
| 113 | 113 | } |
| 114 | 114 | } |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | // Process CRC32 |
| 125 | - if ((int) $release->proc_crc32 === NameFixer::PROC_CRC_NONE && ! empty($release->crc)) { |
|
| 125 | + if ((int) $release->proc_crc32 === NameFixer::PROC_CRC_NONE && !empty($release->crc)) { |
|
| 126 | 126 | $this->nameFixer->reset(); |
| 127 | 127 | $this->nameFixer->checkName($release, true, 'CRC32, ', 1, true); |
| 128 | 128 | } |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | // Process PAR2 hash |
| 153 | - if ((int) $release->proc_hash16k === NameFixer::PROC_HASH16K_NONE && ! empty($release->hash)) { |
|
| 153 | + if ((int) $release->proc_hash16k === NameFixer::PROC_HASH16K_NONE && !empty($release->hash)) { |
|
| 154 | 154 | $this->nameFixer->reset(); |
| 155 | 155 | $this->nameFixer->checkName($release, true, 'PAR2 hash, ', 1, true); |
| 156 | 156 | } |
@@ -166,8 +166,8 @@ discard block |
||
| 166 | 166 | // Process NFO |
| 167 | 167 | if ((int) $release->nfostatus === Nfo::NFO_FOUND && |
| 168 | 168 | (int) $release->proc_nfo === NameFixer::PROC_NFO_NONE && |
| 169 | - ! empty($release->textstring) && |
|
| 170 | - ! preg_match('/^=newz\[NZB\]=\w+/', $release->textstring)) { |
|
| 169 | + !empty($release->textstring) && |
|
| 170 | + !preg_match('/^=newz\[NZB\]=\w+/', $release->textstring)) { |
|
| 171 | 171 | |
| 172 | 172 | $this->nameFixer->reset(); |
| 173 | 173 | $this->nameFixer->checkName($release, true, 'NFO, ', 1, true); |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | // Process PAR2 |
| 209 | 209 | if ((int) $release->proc_par2 === NameFixer::PROC_PAR2_NONE) { |
| 210 | 210 | // Initialize NZB contents if needed |
| 211 | - if (! isset($nzbcontents)) { |
|
| 211 | + if (!isset($nzbcontents)) { |
|
| 212 | 212 | $nntp = new NNTP; |
| 213 | 213 | $compressedHeaders = config('nntmux_nntp.compressed_headers'); |
| 214 | 214 | |