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

AbstractText   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 19
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getTextCoverage() 0 4 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