| Conditions | 4 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 72 | public static function create(array $entry): Entry |
||
| 73 | { |
||
| 74 | $events = []; |
||
| 75 | |||
| 76 | foreach (self::CHANNELS as $channel) { |
||
| 77 | if (isset($entry[$channel])) { |
||
| 78 | foreach ($entry[$channel] as $event) { |
||
| 79 | $events[] = EventFactory::create($event); |
||
| 80 | } |
||
| 81 | } |
||
| 82 | } |
||
| 83 | |||
| 84 | return new static($entry['id'], $entry['time'], $events); |
||
| 85 | } |
||
| 86 | } |
||
| 87 |