` abilities. */ enum MoneyPermission: string { /** Hourly rates and other than consumer product prices. */ case Prices = 'prices'; /** Amounts of expenses. */ case Expenses = 'expenses'; /** Budgets and quoted amounts. */ case Quotes = 'quotes'; /** Billing material and billed amounts. */ case Billing = 'billing'; /** * @param list $values * @return list */ public static function listFrom(array $values): array { $permissions = array_map(fn (self|string $value): self => $value instanceof self ? $value : self::from($value), $values); return array_values(array_filter(self::cases(), fn (self $case): bool => in_array($case, $permissions, true))); } }