Error when integrating new API

/**
 * Get the base uri for a given server in the current environment
 *
 * @param  string $server Server name
 *
 * @return string         Base URI
 */
public function getBaseUri(string $server = Server::DEFAULT_): string
{
    return ApiHelper::appendUrlWithTemplateParameters(
        static::ENVIRONMENT_MAP[$this->environment][$server],
        [
            'custom_url' => $this->customUrl,
        ],
        false
    );
}