Completed
Pull Request — master (#214)
by Mikhail
04:39
created

CoverageReporter3   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 46.67%

Importance

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

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
namespace ParaTest\Coverage;
4
5
class CoverageReporter3 implements CoverageReporterInterface
6
{
7
    /**
8
     * @var \PHP_CodeCoverage
9
     */
10
    private $coverage;
11
12
    /**
13
     * @param \PHP_CodeCoverage $coverage
14
     */
15 2
    public function __construct(\PHP_CodeCoverage $coverage)
16
    {
17 2
        $this->coverage = $coverage;
18 2
    }
19
20
    /**
21
     * Generate clover coverage report
22
     *
23
     * @param string $target Report filename
24
     */
25
    public function clover($target)
26
    {
27
        $clover = new \PHP_CodeCoverage_Report_Clover();
28
        $clover->process($this->coverage, $target);
29
    }
30
31
    /**
32
     * Generate html coverage report
33
     *
34
     * @param string $target Report filename
35
     */
36
    public function html($target)
37
    {
38
        $html = new \PHP_CodeCoverage_Report_HTML();
39
        $html->process($this->coverage, $target);
40
    }
41
42
    /**
43
     * Generate php co
44
     * @param string $target
45
     */
46 2
    public function php($target)
47
    {
48 2
        $php = new \PHP_CodeCoverage_Report_PHP();
49 2
        $php->process($this->coverage, $target);
50 2
    }
51
52
}
53