private function addBasePath($path)
    {
        if (\strpos($path, $this->basePath) === 0) {
            return $path;
        }

        return \str_replace('//', '/', $this->basePath . '/' . $path);
    }