expires->isSameDay($date); } public function text(): string { return str($this->type->text())->when( !$this->expiresAt(now()), fn($str) => $str->append(' (fällig am ' . $this->expires->format('d.m.Y') . ')') ); } public function appliesToSettings(PreventionSettings $settings): bool { return in_array($this->type->name, $settings->preventAgainst); } }