Completed
Push — master ( 7fed73...b0b4e8 )
by Stanislav
03:44
created
src/Command/StatsGet.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -85,12 +85,12 @@  discard block
 block discarded – undo
85 85
                 $config->get('influxdb-database')
86 86
             );
87 87
 
88
-            $lastDays = (int)$input->getOption('days') ? (int)$input->getOption('days') : 0;
89
-            $limit = (int)$input->getOption('limit') ? (int)$input->getOption('limit') : 0;
88
+            $lastDays = (int) $input->getOption('days') ? (int) $input->getOption('days') : 0;
89
+            $limit = (int) $input->getOption('limit') ? (int) $input->getOption('limit') : 0;
90 90
 
91 91
             $torrentList = $client->getTorrentData();
92 92
 
93
-            $torrentList = array_map(function ($torrent) {
93
+            $torrentList = array_map(function($torrent) {
94 94
                 $torrent['age'] = TorrentUtils::getTorrentAgeInDays($torrent);
95 95
                 return $torrent;
96 96
             }, $torrentList);
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
             $transmissionHost = $config->get('transmission-host');
104 104
 
105
-            $torrentList = array_map(function ($torrent) use ($influxDbClient, $transmissionHost, $lastDays) {
105
+            $torrentList = array_map(function($torrent) use ($influxDbClient, $transmissionHost, $lastDays) {
106 106
                 $torrent['uploaded'] = $influxDbClient->getTorrentSum(
107 107
                     $torrent,
108 108
                     'uploaded_last',
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         TableUtils::printTable($tableData, $output);
134 134
 
135 135
         $freeSpace = $client->getFreeSpace();
136
-        $output->writeln('Free space: ' . TorrentUtils::getSizeInGb($freeSpace) . ' GB');
136
+        $output->writeln('Free space: '.TorrentUtils::getSizeInGb($freeSpace).' GB');
137 137
 
138 138
         if ($input->getOption('rm') && count($torrentList) > 0) {
139 139
             return $this->removeTorrents($input, $output, $tableData['rows']);
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
             'headers' => ['Name', 'Id', 'Age, days', 'Size, GB', 'Uploaded, GB', 'Per day, GB', 'Profit, %'],
182 182
             'rows' => $rows,
183 183
             'totals' => [
184
-                'Total: ' . count($rows),
184
+                'Total: '.count($rows),
185 185
                 '',
186 186
                 '',
187 187
                 TorrentListUtils::sumArrayField($rows, 3),
Please login to merge, or discard this patch.