FormProcessReport   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 66.67%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 5
c 1
b 0
f 1
dl 0
loc 23
ccs 4
cts 6
cp 0.6667
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A resultFor() 0 3 1
A results() 0 3 1
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