@@ -136,7 +136,6 @@ |
||
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | return $torrentInList[Torrent\Get::TOTAL_SIZE] < $torrentNotInList[Torrent\Get::TOTAL_SIZE] ? |
| 139 | - $torrentInList : |
|
| 140 | - $torrentNotInList; |
|
| 139 | + $torrentInList : $torrentNotInList; |
|
| 141 | 140 | } |
| 142 | 141 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | return 1; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - $blackTorrentList = array_filter($torrentList, function ($torrent) use ($blacklist) { |
|
| 40 | + $blackTorrentList = array_filter($torrentList, function($torrent) use ($blacklist) { |
|
| 41 | 41 | return in_array($torrent[Torrent\Get::NAME], $blacklist); |
| 42 | 42 | }); |
| 43 | 43 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $client->printTorrentsTable($blackTorrentList, $output); |
| 49 | 49 | $output->writeln('Total size: ' . $sizeInGb . ' Gb'); |
| 50 | 50 | |
| 51 | - $this->dryRun($input, $output, function () use ($logger) { |
|
| 51 | + $this->dryRun($input, $output, function() use ($logger) { |
|
| 52 | 52 | $logger->critical('actual delete not implemented!'); |
| 53 | 53 | //$client->removeTorrents($blackTorrentList, true); |
| 54 | 54 | }, 'dry-run, don\'t really remove'); |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | return 0; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | - $this->dryRun($input, $output, function () use ($logger, $client, $obsoleteList) { |
|
| 35 | + $this->dryRun($input, $output, function() use ($logger, $client, $obsoleteList) { |
|
| 36 | 36 | $client->removeTorrents($obsoleteList); |
| 37 | 37 | $names = $client->getTorrentsField($obsoleteList, Torrent\Get::NAME); |
| 38 | 38 | $logger->info('Removed torrents:' . implode(', ', $names)); |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | $logger->debug('Send point: {point}', ['point' => $point]); |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | - $this->dryRun($input, $output, function () use ($database, $points, $logger) { |
|
| 79 | + $this->dryRun($input, $output, function() use ($database, $points, $logger) { |
|
| 80 | 80 | $isSuccess = $database->writePoints($points, InfluxDB\Database::PRECISION_SECONDS); |
| 81 | 81 | $logger->info('InfluxDB write ' . ($isSuccess ? 'success' : 'failed')); |
| 82 | 82 | }, 'dry-run, don\'t really send points'); |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | $config->loadConfigFile(); |
| 59 | 59 | } catch (\RuntimeException $e) { |
| 60 | 60 | $logger->critical($e->getMessage()); |
| 61 | - $this->setCode(function () { |
|
| 61 | + $this->setCode(function() { |
|
| 62 | 62 | return 1; |
| 63 | 63 | }); |
| 64 | 64 | return; |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | if (!empty($torrentsUrls)) { |
| 68 | - $this->dryRun($input, $output, function () use ($weburgClient, $torrentsDir, $torrentsUrls) { |
|
| 68 | + $this->dryRun($input, $output, function() use ($weburgClient, $torrentsDir, $torrentsUrls) { |
|
| 69 | 69 | foreach ($torrentsUrls as $torrentUrl) { |
| 70 | 70 | $weburgClient->downloadTorrent($torrentUrl, $torrentsDir); |
| 71 | 71 | } |