Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 1 |
Changes | 2 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
24 | 6 | public static function fromArray(array $data): self |
|
25 | { |
||
26 | 6 | $dto = new self(); |
|
27 | 6 | $dto->currency = $data['currency'] ?? ''; |
|
28 | 6 | $dto->unit = $data['unit'] ?? ''; |
|
29 | 6 | $dto->registration = $data['registration'] ?? ''; |
|
30 | 6 | $dto->renewal = $data['renewal'] ?? ''; |
|
31 | 6 | $dto->transfer = $data['transfer'] ?? ''; |
|
32 | 6 | $dto->restore = $data['restore'] ?? ''; |
|
33 | |||
34 | 6 | return $dto; |
|
35 | } |
||
52 |