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

AbstractText::getTextCoverage()   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
3
namespace Paraunit\Coverage\Processor;
4
5
use Paraunit\Proxy\Coverage\CodeCoverage;
6
use SebastianBergmann\CodeCoverage\Report\Text as PHPUnitText;
7
8
abstract class AbstractText implements CoverageProcessorInterface
9
{
10
    /** @var PHPUnitText */
11
    private $text;
12
13
    /** @var bool */
14
    private $showColors;
15
16
    public function __construct(bool $showColors = false)
17
    {
18
        $this->text = new PHPUnitText(50, 90, false, false);
19
        $this->showColors = $showColors;
20
    }
21
22
    protected function getTextCoverage(CodeCoverage $codeCoverage): string
23
    {
24
        return $this->text->process($codeCoverage, $this->showColors);
25
    }
26
}
27