Completed
Push — master ( a0d507...b6b7ad )
by Stanislav
02:33
created
src/Command/Command.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/TransmissionClient.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@
 block discarded – undo
47 47
             ];
48 48
         }
49 49
 
50
-        $cleanedIds = array_map(function ($torrentId) {
51
-            return (int)$torrentId;
50
+        $cleanedIds = array_map(function($torrentId) {
51
+            return (int) $torrentId;
52 52
         }, $ids);
53 53
 
54 54
         $this->createSession();
Please login to merge, or discard this patch.
src/Helpers/TorrentUtils.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,7 @@
 block discarded – undo
13 13
     public static function getTorrentAge($torrent)
14 14
     {
15 15
         $date = isset($torrent[Torrent\Get::DONE_DATE]) && $torrent[Torrent\Get::DONE_DATE] ?
16
-            $torrent[Torrent\Get::DONE_DATE] :
17
-            (isset($torrent[Torrent\Get::ADDED_DATE]) ? $torrent[Torrent\Get::ADDED_DATE] : 0);
16
+            $torrent[Torrent\Get::DONE_DATE] : (isset($torrent[Torrent\Get::ADDED_DATE]) ? $torrent[Torrent\Get::ADDED_DATE] : 0);
18 17
         return $date ? time() - $date : 0;
19 18
     }
20 19
 
Please login to merge, or discard this patch.
src/Helpers/TableUtils.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     {
65 65
         $filters = self::parseFilters($filters);
66 66
 
67
-        return array_filter($rows, function ($row) use ($filters) {
67
+        return array_filter($rows, function($row) use ($filters) {
68 68
             foreach ($filters as $columnKey => $filter) {
69 69
                 if (!isset($row[$columnKey])) {
70 70
                     continue;
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
             abs($columnNumber)
111 111
         )) - 1;
112 112
 
113
-        usort($rowsSorted, function ($first, $second) use ($columnIndex, $sortOrder) {
113
+        usort($rowsSorted, function($first, $second) use ($columnIndex, $sortOrder) {
114 114
             return $first[$columnIndex] > $second[$columnIndex] ? $sortOrder : $sortOrder * -1;
115 115
         });
116 116
 
Please login to merge, or discard this patch.
src/Command/TorrentList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 
35 35
         $torrentList = $client->getTorrentData();
36 36
 
37
-        $torrentList = array_map(function ($torrent) {
37
+        $torrentList = array_map(function($torrent) {
38 38
             $torrent['age'] = TorrentUtils::getTorrentAgeInDays($torrent);
39 39
             return $torrent;
40 40
         }, $torrentList);
Please login to merge, or discard this patch.
src/Command/StatsSend.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
                 }
65 65
             }
66 66
 
67
-            $this->dryRun($input, $output, function () use ($influxDbClient, $points) {
67
+            $this->dryRun($input, $output, function() use ($influxDbClient, $points) {
68 68
                 $influxDbClient->writePoints($points);
69 69
             }, 'dry-run, don\'t really send points');
70 70
         } catch (\Exception $e) {
Please login to merge, or discard this patch.
src/Command/TorrentRemove.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
             }
57 57
         }
58 58
 
59
-        $this->dryRun($input, $output, function () use ($config, $torrentList, $client, $input, $output) {
59
+        $this->dryRun($input, $output, function() use ($config, $torrentList, $client, $input, $output) {
60 60
             $influxDbClient = $this->getApplication()->getInfluxDbClient(
61 61
                 $config->get('influxdb-host'),
62 62
                 $config->get('influxdb-port'),
Please login to merge, or discard this patch.
src/Command/TorrentRemoveDuplicates.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
             return 0;
35 35
         }
36 36
 
37
-        $this->dryRun($input, $output, function () use ($client, $obsoleteList, $config, $input, $output) {
37
+        $this->dryRun($input, $output, function() use ($client, $obsoleteList, $config, $input, $output) {
38 38
             $influxDbClient = $this->getApplication()->getInfluxDbClient(
39 39
                 $config->get('influxdb-host'),
40 40
                 $config->get('influxdb-port'),
Please login to merge, or discard this patch.
src/Command/TorrentAdd.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 
49 49
     private function addFile(InputInterface $input, OutputInterface $output, TransmissionClient $client, $torrentFile)
50 50
     {
51
-        $this->dryRun($input, $output, function () use ($torrentFile, $client, $input, $output) {
51
+        $this->dryRun($input, $output, function() use ($torrentFile, $client, $input, $output) {
52 52
             $client->addTorrent($torrentFile);
53 53
         }, 'dry-run, don\'t really add torrents');
54 54
     }
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Popstas\Transmission\Console\Command;
4 4
 
5
-use Martial\Transmission\API\Argument\Torrent;
6 5
 use Popstas\Transmission\Console\TransmissionClient;
7 6
 use Symfony\Component\Console\Input\InputArgument;
8 7
 use Symfony\Component\Console\Input\InputInterface;
Please login to merge, or discard this patch.