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