src/Generator/GeneratorFactory.php
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;
    }
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;
    }
Remove a registered generator path.

@param  type $prefixOrPath The prefix or directory path to remove.
@return self Returns an instance of self for method chaining.