public function removeGeneratorPath($prefixOrPath)
    {
        if (array_key_exists($prefixOrPath, $this->generatorPaths)) {
            $prefix = $prefixOrPath;
            unset($this->generatorPaths[$prefix]);
        } elseif (($prefixOrPath = realpath($prefixOrPath)) && in_array($prefixOrPath, $this->generatorPaths)) {
            $path = $prefixOrPath;
            $generatorPaths = $this->generatorPaths;
            $this->generatorPaths = array_filter($generatorPaths, function ($value) use ($path) {
                return ($value != $path);
            });
        }

        return $this;
    }