ResultPrinter   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 6
dl 0
loc 16
c 0
b 0
f 0
ccs 0
cts 6
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getOutput() 0 3 1
A __construct() 0 4 1
1
<?php declare(strict_types=1);
2
3
/**
4
 * @license  http://opensource.org/licenses/mit-license.php MIT
5
 * @link     https://github.com/nicoSWD
6
 * @author   Nicolas Oelgart <[email protected]>
7
 */
8
namespace nicoSWD\SecHeaderCheck\Domain\ResultPrinter;
9
10
use nicoSWD\SecHeaderCheck\Domain\Result\AuditionResult;
11
12
final class ResultPrinter
13
{
14
    /** @var ResultPrinterInterface */
15
    private $resultPrinter;
16
    /** @var OutputOptions */
17
    private $outputOptions;
18
19
    public function __construct(ResultPrinterInterface $resultPrinter, OutputOptions $outputOptions)
20
    {
21
        $this->resultPrinter = $resultPrinter;
22
        $this->outputOptions = $outputOptions;
23
    }
24
25
    public function getOutput(AuditionResult $auditionResult): string
26
    {
27
        return $this->resultPrinter->getOutput($auditionResult, $this->outputOptions);
28
    }
29
}
30