Total Complexity | 5 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
21 | class Console implements ConsoleIO |
||
22 | { |
||
23 | /** |
||
24 | * @var StyleInterface |
||
25 | */ |
||
26 | private $style; |
||
27 | |||
28 | /** |
||
29 | * Console constructor. |
||
30 | * |
||
31 | * @todo Change this to only accept style interface |
||
32 | * |
||
33 | * @param InputInterface|StyleInterface $style |
||
34 | * @param OutputInterface|null $output |
||
35 | */ |
||
36 | 6 | public function __construct($style, OutputInterface $output = null) |
|
37 | { |
||
38 | 6 | if ($style instanceof InputInterface) { |
|
39 | 2 | $style = new SymfonyStyle($style, $output); |
|
|
|||
40 | } |
||
41 | 6 | $this->style = $style; |
|
42 | } |
||
43 | |||
44 | 2 | public function coverageSection(string $section) |
|
45 | { |
||
46 | 2 | $this->style->section('coverage: '.$section); |
|
47 | } |
||
48 | |||
49 | 2 | public function coverageInfo(string $message) |
|
50 | { |
||
51 | 2 | $this->style->text($message); |
|
52 | } |
||
53 | |||
54 | 1 | public function coverageError(string $message) |
|
57 | } |
||
58 | } |
||
59 |