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

AbstractText   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 19
ccs 0
cts 9
cp 0
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
    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