$type === UserType::Staff, self::Clients => $type === UserType::Client, self::StaffAndClients => $type !== null, self::Everyone => true, }; } /** * English label — also the translation key. */ public function label(): string { return match ($this) { self::Staff => 'Staff only', self::Clients => 'Clients only', self::StaffAndClients => 'Staff and clients', self::Everyone => 'Anyone, including visitors who are not logged in', }; } }