Completed
Push — master ( 9a7b87...ad20a3 )
by Alessandro
03:07
created

TextToConsole::process()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
declare(strict_types=1);
3
4
namespace Paraunit\Coverage\Processor;
5
6
use Paraunit\Proxy\Coverage\CodeCoverage;
7
use Symfony\Component\Console\Output\OutputInterface;
8
9
/**
10
 * Class TextToConsole
11
 * @package Paraunit\Proxy\Coverage
12
 */
13
class TextToConsole extends AbstractText
14
{
15
    /** @var  OutputInterface */
16
    private $output;
17
18
    /**
19
     * TextToConsole constructor.
20
     * @param OutputInterface $output
21
     * @param bool $showColors
22
     */
23
    public function __construct(OutputInterface $output, bool $showColors)
24
    {
25
        parent::__construct($showColors);
26
        $this->output = $output;
27
    }
28
29
    public function process(CodeCoverage $codeCoverage)
30
    {
31
        $this->output->writeln($this->getTextCoverage($codeCoverage));
32
    }
33
}
34