| Conditions | 4 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 30 | public function createFromFormat(string $format, OutputOptions $outputOptions): ResultPrinter |
||
| 31 | { |
||
| 32 | switch ($format) { |
||
| 33 | case OutputFormat::CONSOLE: |
||
| 34 | return new ResultPrinter($this->consolePrinter, $outputOptions); |
||
| 35 | case OutputFormat::JSON: |
||
| 36 | return new ResultPrinter($this->jsonPrinter, $outputOptions); |
||
| 37 | case OutputFormat::XML: |
||
| 38 | return new ResultPrinter($this->xmlPrinter, $outputOptions); |
||
| 39 | default: |
||
| 40 | throw new Exception\InvalidOutputFormatException(); |
||
| 41 | } |
||
| 44 |