änderungen->änderung as $item) { $attributes = $item->attributes(); $type = match ((string) $attributes['art']) { 'anzahl_teilnehmer' => 'participant_count', 'beförderung' => 'transportation', 'zustieg' => 'pickup', 'unterbringung' => 'accommodation', 'zusatzleistung' => 'services', 'teilnehmerdaten' => 'participant_data', default => false, }; if (false === $type) { continue; } $mutableField = new MutableField($type, $this->stringToBool((string) $attributes['möglich'])); if ($attributes['möglichbiszum']) { $mutableField->mutableBefore = $this->stringToDate((string) $attributes['möglichbiszum']); } $mutableFields[$type] = $mutableField; } return new BaseData($mutableFields); } }