| Conditions | 4 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4 |
| Changes | 2 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 24 | 7 | public static function fromArray(array $data): self |
|
| 25 | { |
||
| 26 | 7 | $contacts = []; |
|
| 27 | |||
| 28 | 7 | if (isset($data['contact_list']) && is_array($data['contact_list'])) { |
|
| 29 | 5 | foreach ($data['contact_list'] as $contactData) { |
|
| 30 | 4 | $contacts[] = Contact::fromArray($contactData); |
|
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 34 | 7 | return new self($contacts); |
|
| 35 | } |
||
| 47 |