Conditions | 4 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
25 | 2 | public static function fromAmazonRequest(array $amazonRequest): AbstractRequest |
|
26 | { |
||
27 | 2 | $errors = []; |
|
28 | 2 | if (isset($amazonRequest['errors']) && is_array($amazonRequest['errors'])) { |
|
29 | 2 | foreach ($amazonRequest['errors'] as $errorData) { |
|
30 | 2 | $errors[] = RuntimeError::fromAmazonRequest($errorData); |
|
31 | } |
||
32 | } |
||
33 | |||
34 | 2 | return new self( |
|
35 | 2 | token: PropertyHelper::checkNullValueString($amazonRequest, 'token'), |
|
36 | 2 | errors: $errors, |
|
37 | 2 | ); |
|
45 |