Conditions | 2 |
Paths | 2 |
Total Lines | 22 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
29 | protected function displayResult(Result $result): void |
||
30 | { |
||
31 | if (!$result->isSuccess()) { |
||
32 | $this->line(PHP_EOL . "<error>✘</error> {$result->getError()}"); |
||
33 | |||
34 | return; |
||
35 | } |
||
36 | |||
37 | $this->info(PHP_EOL . '----------'); |
||
38 | $this->comment("<info>✔</info> Done. {$result->getMessage()}"); |
||
39 | |||
40 | $this->line(''); |
||
41 | $headers = ['Time', 'Versions', 'Published', 'Updated']; |
||
42 | $data = $result->getExtra() ?? new stdClass(); |
||
43 | $rows = [[ |
||
44 | $data->executionTime ?? '?', |
||
45 | count($data->versions ?? []), |
||
46 | count($data->versionsPublished ?? []), |
||
47 | count($data->versionsUpdated ?? []), |
||
48 | ]]; |
||
49 | $this->table($headers, $rows); |
||
50 | $this->line(PHP_EOL); |
||
51 | } |
||
53 |