what looks implausible (empty: plausible) */ public function findings(CaseContext $case): array { $guest = $case->booking->guest; $findings = []; if (blank($guest?->street)) { $findings[] = 'Straße fehlt'; } if (blank($guest?->city)) { $findings[] = 'Ort fehlt'; } if (in_array(mb_strtoupper((string) $guest?->country), ['', 'DE', 'DEUTSCHLAND'], true) && ! preg_match('/^\d{5}$/', trim((string) $guest?->postal_code))) { $findings[] = 'Postleitzahl hat nicht fünf Ziffern'; } return $findings; } public function activities(CaseContext $case): array { $findings = $this->findings($case); return [new Activity('address_check', 'Anschrift auf Plausibilität prüfen', ActivityState::Done, $findings === [] ? 'Anschrift wirkt plausibel' : 'Hinweis: '.implode(', ', $findings))]; } public function state(CaseContext $case): ?StepState { return StepState::Done; } }