Completed
Push — master ( bf487d...84f230 )
by Alessandro
10:10
created

AbstractText::getTextCoverage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
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 5
    public function __construct(bool $showColors = false)
17
    {
18 5
        $this->text = new PHPUnitText(50, 90, false, false);
19 5
        $this->showColors = $showColors;
20
    }
21
22 2
    protected function getTextCoverage(CodeCoverage $codeCoverage): string
23
    {
24 2
        return $this->text->process($codeCoverage, $this->showColors);
25
    }
26
}
27