__('auth.scope_type_self'), self::Role => __('auth.scope_type_role'), }; } /** * 모든 케이스 값 배열을 반환합니다. * * @return array */ public static function values(): array { return array_column(self::cases(), 'value'); } /** * 값의 유효성을 검증합니다. * * @param string $value 검증할 스코프 값 * @return bool 유효 여부 */ public static function isValid(string $value): bool { return in_array($value, self::values(), true); } }