Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
59 | 4 | public static function create(array $entry): self |
|
60 | { |
||
61 | 4 | $events = []; |
|
62 | |||
63 | 4 | foreach (self::CHANNELS as $channel) { |
|
64 | 4 | if (isset($entry[$channel])) { |
|
65 | 4 | foreach ($entry[$channel] as $event) { |
|
66 | 4 | $events[] = EventFactory::create($event); |
|
67 | } |
||
68 | } |
||
69 | } |
||
70 | |||
71 | 4 | return new self($entry['id'], $entry['time'], $events); |
|
72 | } |
||
73 | } |
||
74 |