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

Html::process()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 4
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\Configuration\OutputPath;
7
use Paraunit\Proxy\Coverage\CodeCoverage;
8
use SebastianBergmann\CodeCoverage\Report\Html\Facade;
9
10
/**
11
 * Class HTMLResult
12
 * @package Paraunit\Proxy\Coverage
13
 */
14 View Code Duplication
class Html implements CoverageProcessorInterface
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
15
{
16
    /** @var Facade */
17
    private $html;
18
19
    /** @var OutputPath */
20
    private $targetPath;
21
22
    /**
23
     * Html constructor.
24
     * @param OutputPath $targetPath
25
     */
26
    public function __construct(OutputPath $targetPath)
27
    {
28
        $this->html = new Facade();
29
        $this->targetPath = $targetPath;
30
    }
31
32
    /**
33
     * @param CodeCoverage $codeCoverage
34
     * @throws \RuntimeException
35
     */
36
    public function process(CodeCoverage $codeCoverage)
37
    {
38
        $this->html->process($codeCoverage, $this->targetPath->getPath());
39
    }
40
}
41