Total Complexity | 6 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Coverage | 84.21% |
Changes | 0 |
1 | <?php |
||
12 | class ProcessedFormReportBuilder implements ProcessedFormReportBuilderInterface |
||
13 | { |
||
14 | protected array $inputReports = []; |
||
15 | |||
16 | protected array $processReports = []; |
||
17 | |||
18 | protected FormShieldReportInterface $shieldReport; |
||
19 | |||
20 | 45 | public function __construct(ProcessedFormReportInterface $previous = null) |
|
26 | } |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @return $this |
||
31 | */ |
||
32 | 45 | public function withShieldReport(FormShieldReportInterface $report): ProcessedFormReportBuilderInterface |
|
33 | { |
||
34 | 45 | $this->shieldReport = $report; |
|
35 | |||
36 | 45 | return $this; |
|
37 | } |
||
38 | |||
39 | /** |
||
40 | * @return $this |
||
41 | */ |
||
42 | 39 | public function withInputReport(string $input, ProcessedInputReportInterface $report): ProcessedFormReportBuilderInterface |
|
43 | { |
||
44 | 39 | $this->inputReports[$input] = $report; |
|
45 | |||
46 | 39 | return $this; |
|
47 | } |
||
48 | |||
49 | /** |
||
50 | * @return $this |
||
51 | */ |
||
52 | 24 | public function withProcessReport(string $process, FormProcessReportInterface $report): ProcessedFormReportBuilderInterface |
|
57 | } |
||
58 | |||
59 | 45 | public function build(): ProcessedFormReportInterface |
|
68 |