| @@ -23,19 +23,19 @@ discard block | ||
| 23 | 23 | } | 
| 24 | 24 | |
| 25 | 25 | // Verify arguments. | 
| 26 | -if (! is_dir($argv[1])) { | |
| 26 | +if (!is_dir($argv[1])) { | |
| 27 | 27 |      exit('Error: arg1 must be a path (you might not have read access to this path)'.$n); | 
| 28 | 28 | } | 
| 29 | -if (! in_array($argv[2], ['true', 'false'], false)) { | |
| 29 | +if (!in_array($argv[2], ['true', 'false'], false)) { | |
| 30 | 30 |      exit('Error: arg2 must be true or false'.$n); | 
| 31 | 31 | } | 
| 32 | -if (! in_array($argv[3], ['true', 'false'], false)) { | |
| 32 | +if (!in_array($argv[3], ['true', 'false'], false)) { | |
| 33 | 33 |      exit('Error: arg3 must be true or false'.$n); | 
| 34 | 34 | } | 
| 35 | -if (! in_array($argv[4], ['true', 'false'], false)) { | |
| 35 | +if (!in_array($argv[4], ['true', 'false'], false)) { | |
| 36 | 36 |      exit('Error: arg4 must be true or false'.$n); | 
| 37 | 37 | } | 
| 38 | -if (! is_numeric($argv[5])) { | |
| 38 | +if (!is_numeric($argv[5])) { | |
| 39 | 39 |      exit('Error: arg5 must be a number'.$n); | 
| 40 | 40 | } | 
| 41 | 41 |  if ($argv[5] < 0) { | 
| @@ -44,7 +44,7 @@ discard block | ||
| 44 | 44 | |
| 45 | 45 | $path = $argv[1]; | 
| 46 | 46 | // Check if path ends with dir separator. | 
| 47 | -if (! Str::endsWith($path, '/')) { | |
| 47 | +if (!Str::endsWith($path, '/')) { | |
| 48 | 48 | $path .= '/'; | 
| 49 | 49 | } | 
| 50 | 50 | |
| @@ -4,7 +4,7 @@ discard block | ||
| 4 | 4 | |
| 5 | 5 | use Illuminate\Support\Facades\File; | 
| 6 | 6 | |
| 7 | -if (! isset($argv[1]) || ! isset($argv[2])) { | |
| 7 | +if (!isset($argv[1]) || !isset($argv[2])) { | |
| 8 | 8 | exit( | 
| 9 | 9 | 'Argument 1 is a input string. ie PRE name.'.PHP_EOL. | 
| 10 | 10 | 'Argument 2 is a expected hash or encoding. ie MD5 string. Passing true on Argument 3 ignores this.'.PHP_EOL. | 
| @@ -74,7 +74,7 @@ discard block | ||
| 74 | 74 | |
| 75 | 75 | $secondArray = []; | 
| 76 | 76 |          foreach ($firstArray as $key => $value) { | 
| 77 | -            if (! $this->_writeToFile) { | |
| 77 | +            if (!$this->_writeToFile) { | |
| 78 | 78 |                  if (\in_array($value, $this->_expectedString, false)) { | 
| 79 | 79 | exit( | 
| 80 | 80 | '['. | 
| @@ -96,7 +96,7 @@ discard block | ||
| 96 | 96 | $thirdArray = []; | 
| 97 | 97 |          foreach ($secondArray as $key => $value) { | 
| 98 | 98 |              foreach ($value as $key2 => $value2) { | 
| 99 | -                if (! $this->_writeToFile) { | |
| 99 | +                if (!$this->_writeToFile) { | |
| 100 | 100 |                      if (\in_array($value2, $this->_expectedString, false)) { | 
| 101 | 101 | exit( | 
| 102 | 102 | '['. | 
| @@ -123,7 +123,7 @@ discard block | ||
| 123 | 123 |          foreach ($thirdArray as $key => $value) { | 
| 124 | 124 |              foreach ($value as $key2 => $value2) { | 
| 125 | 125 |                  foreach ($value2 as $key3 => $value3) { | 
| 126 | -                    if (! $this->_writeToFile) { | |
| 126 | +                    if (!$this->_writeToFile) { | |
| 127 | 127 |                          if (in_array($value3, $this->_expectedString)) { | 
| 128 | 128 | exit( | 
| 129 | 129 | '['. | 
| @@ -19,10 +19,10 @@ | ||
| 19 | 19 |  if ($argc < 5) { | 
| 20 | 20 | exit($message); | 
| 21 | 21 | } | 
| 22 | -if (! is_numeric($argv[2]) || ! is_numeric($argv[4])) { | |
| 22 | +if (!is_numeric($argv[2]) || !is_numeric($argv[4])) { | |
| 23 | 23 | exit($message); | 
| 24 | 24 | } | 
| 25 | -if (! in_array($argv[3], ['true', 'false'], false)) { | |
| 25 | +if (!in_array($argv[3], ['true', 'false'], false)) { | |
| 26 | 26 | exit($message); | 
| 27 | 27 | } | 
| 28 | 28 | |
| @@ -65,7 +65,7 @@ discard block | ||
| 65 | 65 | } | 
| 66 | 66 | |
| 67 | 67 |      $qry = DB::select('SELECT id FROM releases'.$where); | 
| 68 | -    if (! empty($qry)) { | |
| 68 | +    if (!empty($qry)) { | |
| 69 | 69 | $total = \count($qry); | 
| 70 | 70 |      } else { | 
| 71 | 71 | $total = 0; | 
| @@ -93,7 +93,7 @@ discard block | ||
| 93 | 93 |      $qry = DB::select('SELECT id FROM releases'.$where); | 
| 94 | 94 | |
| 95 | 95 | $total = 0; | 
| 96 | -    if (! empty($qry)) { | |
| 96 | +    if (!empty($qry)) { | |
| 97 | 97 | $total = \count($qry); | 
| 98 | 98 | } | 
| 99 | 99 | |
| @@ -118,7 +118,7 @@ discard block | ||
| 118 | 118 | } | 
| 119 | 119 | |
| 120 | 120 |      $qry = DB::select('SELECT id FROM releases'.$where); | 
| 121 | -    if (! empty($qry)) { | |
| 121 | +    if (!empty($qry)) { | |
| 122 | 122 | $total = \count($qry); | 
| 123 | 123 |      } else { | 
| 124 | 124 | $total = 0; | 
| @@ -166,7 +166,7 @@ discard block | ||
| 166 | 166 | |
| 167 | 167 |      $colorCli->primary('SELECT id FROM releases'.$where); | 
| 168 | 168 |      $qry = DB::select('SELECT id FROM releases'.$where); | 
| 169 | -    if (! empty($qry)) { | |
| 169 | +    if (!empty($qry)) { | |
| 170 | 170 | $total = \count($qry); | 
| 171 | 171 |      } else { | 
| 172 | 172 | $total = 0; | 
| @@ -194,7 +194,7 @@ discard block | ||
| 194 | 194 | } | 
| 195 | 195 | |
| 196 | 196 |      $qry = DB::select('SELECT id FROM releases'.$where); | 
| 197 | -    if (! empty($qry)) { | |
| 197 | +    if (!empty($qry)) { | |
| 198 | 198 | $total = \count($qry); | 
| 199 | 199 |      } else { | 
| 200 | 200 | $total = 0; | 
| @@ -221,7 +221,7 @@ discard block | ||
| 221 | 221 | } | 
| 222 | 222 | |
| 223 | 223 |      $qry = DB::select('SELECT id FROM releases'.$where); | 
| 224 | -    if (! empty($qry)) { | |
| 224 | +    if (!empty($qry)) { | |
| 225 | 225 | $total = \count($qry); | 
| 226 | 226 |      } else { | 
| 227 | 227 | $total = 0; | 
| @@ -5,7 +5,7 @@ | ||
| 5 | 5 | use Blacklight\ConsoleTools; | 
| 6 | 6 | use Blacklight\NZB; | 
| 7 | 7 | |
| 8 | -if (! isset($argv[1]) || ! isset($argv[2])) { | |
| 8 | +if (!isset($argv[1]) || !isset($argv[2])) { | |
| 9 | 9 |      exit("ERROR: You must supply the level you want to reorganize it to, and the source directory  (You would use: 3 .../newznab/resources/nzb/ to move it to 3 levels deep)\n"); | 
| 10 | 10 | } | 
| 11 | 11 | |
| @@ -36,7 +36,7 @@ | ||
| 36 | 36 | |
| 37 | 37 |  $qry = MusicInfo::query()->where('cover', '=', 1)->select(['id'])->get(); | 
| 38 | 38 |  foreach ($qry as $rows) { | 
| 39 | -    if (! is_file($path2covers.$rows['id'].'.jpg')) { | |
| 39 | +    if (!is_file($path2covers.$rows['id'].'.jpg')) { | |
| 40 | 40 | MusicInfo::query()->where(['cover' => 1, 'id' => $rows['id']])->update(['cover' => 0]); | 
| 41 | 41 | $colorCli->info($path2covers.$rows['id'].'.jpg does not exist.'); | 
| 42 | 42 | $deleted++; | 
| @@ -38,7 +38,7 @@ | ||
| 38 | 38 | |
| 39 | 39 |  $qry = GamesInfo::query()->where('cover', '=', 1)->select(['id'])->get(); | 
| 40 | 40 |  foreach ($qry as $rows) { | 
| 41 | -    if (! is_file($path2covers.$rows['id'].'.jpg')) { | |
| 41 | +    if (!is_file($path2covers.$rows['id'].'.jpg')) { | |
| 42 | 42 | GamesInfo::query()->where(['cover' => 1, 'id' => $rows['id']])->update(['cover' => 0]); | 
| 43 | 43 | $colorCli->info($path2covers.$rows['id'].'.jpg does not exist.'); | 
| 44 | 44 | $deleted++; | 
| @@ -50,7 +50,7 @@ discard block | ||
| 50 | 50 | |
| 51 | 51 |  $qry = XxxInfo::query()->where('cover', '=', 1)->select(['id'])->get(); | 
| 52 | 52 |  foreach ($qry as $rows) { | 
| 53 | -    if (! is_file($path2covers.$rows['id'].'-cover.jpg')) { | |
| 53 | +    if (!is_file($path2covers.$rows['id'].'-cover.jpg')) { | |
| 54 | 54 | XxxInfo::query()->where(['cover' => 1, 'id' => $rows['id']])->update(['cover' => 0]); | 
| 55 | 55 | $colorCli->info($path2covers.$rows['id'].'-cover.jpg does not exist.'); | 
| 56 | 56 | $deleted++; | 
| @@ -58,7 +58,7 @@ discard block | ||
| 58 | 58 | } | 
| 59 | 59 |  $qry1 = XxxInfo::query()->where('backdrop', '=', 1)->select(['id'])->get(); | 
| 60 | 60 |  foreach ($qry1 as $rows) { | 
| 61 | -    if (! is_file($path2covers.$rows['id'].'-backdrop.jpg')) { | |
| 61 | +    if (!is_file($path2covers.$rows['id'].'-backdrop.jpg')) { | |
| 62 | 62 | XxxInfo::query()->where(['backdrop' => 1, 'id' => $rows['id']])->update(['backdrop' => 0]); | 
| 63 | 63 | $colorCli->info($path2covers.$rows['id'].'-backdrop.jpg does not exist.'); | 
| 64 | 64 | $deleted++; | 
| @@ -36,7 +36,7 @@ | ||
| 36 | 36 | |
| 37 | 37 |  $qry = BookInfo::query()->where('cover', '=', 1)->select(['id'])->get(); | 
| 38 | 38 |  foreach ($qry as $rows) { | 
| 39 | -    if (! is_file($path2covers.$rows['id'].'.jpg')) { | |
| 39 | +    if (!is_file($path2covers.$rows['id'].'.jpg')) { | |
| 40 | 40 | BookInfo::query()->where(['cover' => 1, 'id' => $rows['id']])->update(['cover' => 0]); | 
| 41 | 41 | $colorCli->info($path2covers.$rows['id'].'.jpg does not exist.'); | 
| 42 | 42 | $deleted++; |