Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2.004 |
Changes | 0 |
1 | <?php |
||
28 | 1 | public static function from(array $attributes): self |
|
29 | { |
||
30 | 1 | $included = []; |
|
31 | 1 | if (array_key_exists('included', $attributes)) { |
|
32 | $included = $attributes['included']; |
||
33 | } |
||
34 | |||
35 | 1 | $data = array_map(fn (array $result): RetrieveResponse => RetrieveResponse::from( |
|
36 | 1 | $result, |
|
37 | 1 | $included |
|
38 | 1 | ), $attributes['data']); |
|
39 | |||
40 | 1 | return new self( |
|
41 | 1 | $data, |
|
42 | 1 | ); |
|
45 |