*/ use BaseEnum; case NotFound = 'not-found'; case ValidationError = 'validation-error'; case BadRequest = 'bad-request'; case TooManyRequests = 'too-many-requests'; case InternalError = 'internal-error'; public function title(): string { return match ($this) { self::NotFound => 'Resource Not Found', self::ValidationError => 'Unprocessable Entity', self::BadRequest => 'Bad Request', self::TooManyRequests => 'Too Many Requests', self::InternalError => 'Internal Server Error', }; } }