Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
25 | 1 | public function init() : void |
|
26 | { |
||
27 | 1 | Assert::that($this->data) |
|
28 | 1 | ->isArray() |
|
29 | 1 | ->keyExists('status') |
|
30 | 1 | ->keyExists('stat') |
|
31 | 1 | ->keyExists('details') |
|
32 | ; |
||
33 | |||
34 | 1 | $this->status = (int)$this->data['status']; |
|
35 | 1 | $this->stat = new Stat($this->data['stat']); |
|
36 | 1 | $this->details = new Details($this->data['details']); |
|
37 | |||
38 | 1 | $this->successful = $this->status >= 200 && $this->status < 300; |
|
39 | 1 | } |
|
40 | |||
65 |