| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types = 1); |
||
| 24 | public function renderResults(string $format, OutputInterface $output, ResultCollection $results) |
||
| 25 | { |
||
| 26 | if ($format === self::FORMAT_JSON) { |
||
| 27 | (new JsonResultsRenderer())->render($output, $results); |
||
| 28 | return; |
||
| 29 | } |
||
| 30 | |||
| 31 | if ($format === self::FORMAT_TEXT) { |
||
| 32 | (new ConsoleResultsRenderer())->render($output, $results); |
||
| 33 | return; |
||
| 34 | } |
||
| 35 | |||
| 36 | throw new InvalidArgumentException('Invalid output format provided'); |
||
| 37 | } |
||
| 38 | } |
||
| 39 |