src/ParameterValidator.php
private function createGeneratorFactory($generatorClass, \Closure $factory = null)
    {
        return function ($sourceClass, $prefixClass) use ($factory, $generatorClass) {
            if ($factory) {
                return $factory($sourceClass, $prefixClass, $this->generationIo, $this->definedClasses, $generatorClass);
            }

            return new $generatorClass($sourceClass, $prefixClass, $this->generationIo, null, $this->definedClasses);
        };
    }
private function createGeneratorFactory($generatorClass, \Closure $factory = null)
    {
        return function ($sourceClass, $prefixClass) use ($factory, $generatorClass) {
            if ($factory) {
                return $factory($sourceClass, $prefixClass, $this->generationIo, $this->definedClasses, $generatorClass);
            }

            return new $generatorClass($sourceClass, $prefixClass, $this->generationIo, null, $this->definedClasses);
        };
    }
private function createGeneratorFactory ( $ generatorClass , \ Closure $ factory = null ) { return function ( $ sourceClass , $ prefixClass ) use ( $ factory , $ generatorClass ) { if ( $ factory ) { return $ factory ( $ sourceClass , $ prefixClass , $ this -> generationIo , $ this -> definedClasses , $ generatorClass ) ; } return new $ generatorClass ( $ sourceClass , $ prefixClass , $ this -> generationIo , null , $ this -> definedClasses ) ; } ; }
Returns generator factory

@param string $generatorClass
@param \Closure|null $factory

@return \Closure
Returns generator factory