CoverageReporter   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
lcom 1
cbo 3
dl 0
loc 48
ccs 15
cts 15
cp 1
rs 10
c 1
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A clover() 0 5 1
A html() 0 5 1
A php() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ParaTest\Coverage;
6
7
use SebastianBergmann\CodeCoverage\CodeCoverage;
8
use SebastianBergmann\CodeCoverage\Report\Clover;
9
use SebastianBergmann\CodeCoverage\Report\Html;
10
use SebastianBergmann\CodeCoverage\Report\PHP;
11
12
class CoverageReporter implements CoverageReporterInterface
13
{
14
    /**
15
     * @var CodeCoverage
16
     */
17
    private $coverage;
18
19
    /**
20
     * @param CodeCoverage $coverage
21
     */
22 6
    public function __construct(CodeCoverage $coverage)
23
    {
24 6
        $this->coverage = $coverage;
25 6
    }
26
27
    /**
28
     * Generate clover coverage report.
29
     *
30
     * @param string $target Report filename
31
     */
32 1
    public function clover(string $target)
33
    {
34 1
        $clover = new Clover();
35 1
        $clover->process($this->coverage, $target);
36 1
    }
37
38
    /**
39
     * Generate html coverage report.
40
     *
41
     * @param string $target Report filename
42
     */
43 1
    public function html(string $target)
44
    {
45 1
        $html = new Html\Facade();
46 1
        $html->process($this->coverage, $target);
47 1
    }
48
49
    /**
50
     * Generate php coverage report.
51
     *
52
     * @param string $target Report filename
53
     */
54 3
    public function php(string $target)
55
    {
56 3
        $php = new PHP();
57 3
        $php->process($this->coverage, $target);
58 3
    }
59
}
60