ResultPrinter::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
c 0
b 0
f 0
ccs 0
cts 3
cp 0
rs 10
cc 1
nc 1
nop 2
crap 2
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