Total Complexity | 3 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class RunResult |
||
9 | { |
||
10 | /** |
||
11 | * @var Result[] |
||
12 | */ |
||
13 | private $singleResults = []; |
||
14 | |||
15 | private $globalStatus = Result::STATUS_PASS; |
||
16 | |||
17 | /** |
||
18 | * @param Check $check |
||
19 | * @param Result $result |
||
20 | * @param false $identifier |
||
21 | * @param string $description |
||
22 | * @param string $group |
||
23 | */ |
||
24 | public function addResult(Check $check, Result $result, $identifier = false, $description = "", $group = "") |
||
25 | { |
||
26 | $this->singleResults[] = [ |
||
27 | 'check' => $check, |
||
28 | 'result' => $result, |
||
29 | 'identifier' => $identifier, |
||
30 | 'description' => $description, |
||
31 | 'group' => $group |
||
32 | ]; |
||
33 | |||
34 | $this->globalStatus = Result::getHigherWeightedStatus($this->globalStatus, $result->getStatus()); |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @return array |
||
39 | */ |
||
40 | public function getResults(): array |
||
43 | } |
||
44 | |||
45 | public function getStatus() |
||
48 | } |
||
49 | } |
||
50 |