FormProcessReport::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace WebTheory\Saveyour\Report;
4
5
use WebTheory\Saveyour\Contracts\Report\FormProcessReportInterface;
6
7
class FormProcessReport implements FormProcessReportInterface
8
{
9
    /**
10
     * @var array<string,mixed>
11
     */
12
    protected array $results = [];
13
14
    /**
15
     * @param array<string,mixed> $results
16
     */
17 9
    public function __construct(array $results = [])
18
    {
19 9
        $this->results = $results;
20
    }
21
22
    public function results(): array
23
    {
24
        return $this->results;
25
    }
26
27 3
    public function resultFor(string $process)
28
    {
29 3
        return $this->results[$process] ?? null;
30
    }
31
}
32