@@ 14-40 (lines=27) @@ | ||
11 | * Class HTMLResult |
|
12 | * @package Paraunit\Proxy\Coverage |
|
13 | */ |
|
14 | class Html implements CoverageProcessorInterface |
|
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 |
@@ 15-41 (lines=27) @@ | ||
12 | * Class XMLResult |
|
13 | * @package Paraunit\Proxy\Coverage |
|
14 | */ |
|
15 | class Xml implements CoverageProcessorInterface |
|
16 | { |
|
17 | /** @var Facade */ |
|
18 | private $xml; |
|
19 | ||
20 | /** @var OutputPath */ |
|
21 | private $targetPath; |
|
22 | ||
23 | /** |
|
24 | * Xml constructor. |
|
25 | * @param OutputPath $targetPath |
|
26 | */ |
|
27 | public function __construct(OutputPath $targetPath) |
|
28 | { |
|
29 | $this->xml = new Facade(Version::id()); |
|
30 | $this->targetPath = $targetPath; |
|
31 | } |
|
32 | ||
33 | /** |
|
34 | * @param CodeCoverage $codeCoverage |
|
35 | * @throws \RuntimeException |
|
36 | */ |
|
37 | public function process(CodeCoverage $codeCoverage) |
|
38 | { |
|
39 | $this->xml->process($codeCoverage, $this->targetPath->getPath()); |
|
40 | } |
|
41 | } |
|
42 |