Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
18 | 2 | public static function fromResponse(array $data) |
|
19 | { |
||
20 | 2 | $currencies = []; |
|
21 | |||
22 | 2 | foreach ($data as $currency) { |
|
23 | 2 | $self = new self(); |
|
24 | 2 | $self->properties['id'] = $currency['id']; |
|
25 | 2 | $self->properties['name'] = $currency['name']; |
|
26 | |||
27 | 2 | $currencies[] = $self; |
|
28 | } |
||
29 | |||
30 | 2 | return $currencies; |
|
31 | } |
||
33 |