@@ -41,7 +41,7 @@ |
||
| 41 | 41 | |
| 42 | 42 | $qry = ConsoleInfo::query()->where('cover', '=', 1)->value('id'); |
| 43 | 43 | foreach ($qry as $rows) { |
| 44 | - if (! is_file($path2covers.$rows['id'].'.jpg')) { |
|
| 44 | + if (!is_file($path2covers.$rows['id'].'.jpg')) { |
|
| 45 | 45 | ConsoleInfo::query()->where( |
| 46 | 46 | [ |
| 47 | 47 | ['cover' => 1], |
@@ -28,12 +28,12 @@ |
||
| 28 | 28 | |
| 29 | 29 | foreach ($res as $row) { |
| 30 | 30 | $nzbpath = $path2cover.$row->imdbid.'-cover.jpg'; |
| 31 | - if (! file_exists($nzbpath)) { |
|
| 31 | + if (!file_exists($nzbpath)) { |
|
| 32 | 32 | $counterfixed++; |
| 33 | 33 | $colorCli->warning('Missing cover '.$nzbpath); |
| 34 | 34 | if ($argv[1] === 'true') { |
| 35 | 35 | $cover = $movie->updateMovieInfo($row->imdbid); |
| 36 | - if ($cover === false || ! file_exists($nzbpath)) { |
|
| 36 | + if ($cover === false || !file_exists($nzbpath)) { |
|
| 37 | 37 | DB::update(sprintf('UPDATE movieinfo m SET m.cover = 0 WHERE m.imdbid = %d', $row->imdbid)); |
| 38 | 38 | } |
| 39 | 39 | } |
@@ -18,13 +18,13 @@ |
||
| 18 | 18 | $neededPerms = ['preview', 'hideads', 'edit release', 'view console', 'view movies', 'view audio', 'view pc', 'view tv', 'view adult', 'view books', 'view other']; |
| 19 | 19 | |
| 20 | 20 | foreach ($neededPerms as $neededPerm) { |
| 21 | - if (! in_array($neededPerm, $permissions, false)) { |
|
| 21 | + if (!in_array($neededPerm, $permissions, false)) { |
|
| 22 | 22 | Permission::create(['name' => $neededPerm]); |
| 23 | 23 | } |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | foreach ($oldRoles as $oldRole) { |
| 27 | - if (! in_array($oldRole->name, $roles, false)) { |
|
| 27 | + if (!in_array($oldRole->name, $roles, false)) { |
|
| 28 | 28 | $role = Role::create( |
| 29 | 29 | [ |
| 30 | 30 | 'name' => $oldRole->name, |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Blacklight\IRCScraper; |
| 6 | 6 | |
| 7 | -if (! isset($argv[1]) || $argv[1] !== 'true') { |
|
| 7 | +if (!isset($argv[1]) || $argv[1] !== 'true') { |
|
| 8 | 8 | exit( |
| 9 | 9 | 'Argument 1: (required) false|true ; false prints this help screen, true runs the scraper.'.PHP_EOL. |
| 10 | 10 | 'Argument 2: (optional) false|true ; true runs in silent mode (no text output)'.PHP_EOL. |
@@ -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])) { |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | //reset collections dateadded to now if dateadded > delay time check |
| 21 | 21 | $colorCli->header('Resetting collections that have expired to this moment. This could take some time if many collections need to be reset'); |
| 22 | 22 | |
| 23 | -DB::transaction(function () use ($delaytime) { |
|
| 23 | +DB::transaction(function() use ($delaytime) { |
|
| 24 | 24 | Collection::query()->where('dateadded', '<', now()->subHours($delaytime))->update(['dateadded' => now()]); |
| 25 | 25 | }, 10); |
| 26 | 26 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | //check for apps |
| 35 | 35 | $apps = ['time', 'tmux', 'nice', 'tee']; |
| 36 | 36 | foreach ($apps as &$value) { |
| 37 | - if (! command_exist($value)) { |
|
| 37 | + if (!command_exist($value)) { |
|
| 38 | 38 | $colorCli->error('Tmux scripts require '.$value.' but its not installed. Aborting.'); |
| 39 | 39 | exit(); |
| 40 | 40 | } |
@@ -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 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | if (preg_match('/[a-fA-F0-9]{32,40}/i', $release->name, $hits)) { |
| 94 | 94 | $nameFixer->matchPredbHash($hits[0], $release, true, 1, true); |
| 95 | 95 | } |
| 96 | - if ($nameFixer->matched === false && ! empty($release->filehash) && preg_match('/[a-fA-F0-9]{32,40}/i', $release->filehash, $hits)) { |
|
| 96 | + if ($nameFixer->matched === false && !empty($release->filehash) && preg_match('/[a-fA-F0-9]{32,40}/i', $release->filehash, $hits)) { |
|
| 97 | 97 | $colorCli->primaryOver('h'); |
| 98 | 98 | $nameFixer->matchPredbHash($hits[0], $release, true, 1, true); |
| 99 | 99 | } |
@@ -104,12 +104,12 @@ discard block |
||
| 104 | 104 | } |
| 105 | 105 | $nameFixer->reset(); |
| 106 | 106 | |
| 107 | - if ((int) $release->proc_uid === NameFixer::PROC_UID_NONE && (! empty($release->uid) || ! empty($release->mediainfo))) { |
|
| 107 | + if ((int) $release->proc_uid === NameFixer::PROC_UID_NONE && (!empty($release->uid) || !empty($release->mediainfo))) { |
|
| 108 | 108 | $colorCli->primaryOver('U'); |
| 109 | - if (! empty($release->uid)) { |
|
| 109 | + if (!empty($release->uid)) { |
|
| 110 | 110 | $nameFixer->checkName($release, true, 'UID, ', 1, true); |
| 111 | 111 | } |
| 112 | - if (empty($nameFixer->matched) && ! empty($release->mediainfo)) { |
|
| 112 | + if (empty($nameFixer->matched) && !empty($release->mediainfo)) { |
|
| 113 | 113 | $nameFixer->checkName($release, true, 'Mediainfo, ', 1, true); |
| 114 | 114 | } |
| 115 | 115 | } |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | } |
| 122 | 122 | $nameFixer->reset(); |
| 123 | 123 | |
| 124 | - if ((int) $release->proc_crc32 === NameFixer::PROC_CRC_NONE && ! empty($release->crc)) { |
|
| 124 | + if ((int) $release->proc_crc32 === NameFixer::PROC_CRC_NONE && !empty($release->crc)) { |
|
| 125 | 125 | $colorCli->primaryOver('C'); |
| 126 | 126 | $nameFixer->checkName($release, true, 'CRC32, ', 1, true); |
| 127 | 127 | } |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | } |
| 146 | 146 | $nameFixer->reset(); |
| 147 | 147 | |
| 148 | - if ((int) $release->proc_hash16k === NameFixer::PROC_HASH16K_NONE && ! empty($release->hash)) { |
|
| 148 | + if ((int) $release->proc_hash16k === NameFixer::PROC_HASH16K_NONE && !empty($release->hash)) { |
|
| 149 | 149 | $colorCli->primaryOver('H'); |
| 150 | 150 | $nameFixer->checkName($release, true, 'PAR2 hash, ', 1, true); |
| 151 | 151 | } |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | } |
| 158 | 158 | $nameFixer->reset(); |
| 159 | 159 | |
| 160 | - 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)) { |
|
| 160 | + 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)) { |
|
| 161 | 161 | $colorCli->primaryOver('n'); |
| 162 | 162 | $nameFixer->done = $nameFixer->matched = false; |
| 163 | 163 | $nameFixer->checkName($release, true, 'NFO, ', 1, true); |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | |
| 196 | 196 | if ((int) $release->proc_par2 === NameFixer::PROC_PAR2_NONE) { |
| 197 | 197 | $colorCli->primaryOver('p'); |
| 198 | - if (! isset($nzbcontents)) { |
|
| 198 | + if (!isset($nzbcontents)) { |
|
| 199 | 199 | $nntp = new NNTP(); |
| 200 | 200 | if (((int) Settings::settingValue('..alternate_nntp') === 1 ? $nntp->doConnect(true, true) : $nntp->doConnect()) !== true) { |
| 201 | 201 | $colorCli->error('Unable to connect to usenet.'); |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | $runVar['settings'] = (array) Arr::first(DB::select($tRun->getMonitorSettings())); |
| 78 | 78 | $runVar['timers']['query']['tmux_time'] = (time() - $timer01); |
| 79 | 79 | |
| 80 | - $runVar['settings']['book_reqids'] = (! empty($runVar['settings']['book_reqids']) |
|
| 80 | + $runVar['settings']['book_reqids'] = (!empty($runVar['settings']['book_reqids']) |
|
| 81 | 81 | ? $runVar['settings']['book_reqids'] : Category::BOOKS_ROOT); |
| 82 | 82 | |
| 83 | 83 | //get usenet connection info |
@@ -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" |