| Conditions | 5 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 14 | public static function fromArray(array $addresses): array |
||
| 15 | { |
||
| 16 | $return = []; |
||
| 17 | foreach ($addresses as $key => $value) { |
||
| 18 | if (is_int($key)) { |
||
| 19 | $return[$key] = static::fromString($value); |
||
| 20 | continue; |
||
| 21 | } |
||
| 22 | if (is_string($key) && is_string($value)) { |
||
| 23 | $return[] = static::create($key, $value); |
||
| 24 | continue; |
||
| 25 | } |
||
| 26 | } |
||
| 27 | |||
| 28 | return $return; |
||
| 29 | } |
||
| 45 |