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