original_string: protected function newGenerator($type, $length = null)
  	{
  		$generator = GeneratorFactory::create($type)->mutate($this)->length($length ?: $this->length);
  
  		if (isset($this->prefix)) {
  			$generator->prefix($this->prefix);
  		}
  
  		if (isset($this->suffix)) {
  			$generator->suffix($this->suffix);
  		}
  
  		return $generator;
  	}
code: protected function newGenerator($type, $length = null)
  	{
  		$generator = GeneratorFactory::create($type)->mutate($this)->length($length ?: $this->length);
  
  		if (isset($this->prefix)) {
  			$generator->prefix($this->prefix);
  		}
  
  		if (isset($this->suffix)) {
  			$generator->suffix($this->suffix);
  		}
  
  		return $generator;
  	}
code_tokens: protected function newGenerator ( $ type , $ length = null ) { $ generator = GeneratorFactory :: create ( $ type ) -> mutate ( $ this ) -> length ( $ length ? : $ this -> length ) ; if ( isset ( $ this -> prefix ) ) { $ generator -> prefix ( $ this -> prefix ) ; } if ( isset ( $ this -> suffix ) ) { $ generator -> suffix ( $ this -> suffix ) ; } return $ generator ; }
docstring: Creates a new generator instance of the given type.
  
  @param string $type Generator type
  @param mixed $length
  @return Keygen\Generator
  
  @throws \InvalidArgumentException
docstring_tokens: Creates a new generator instance of the given type .