original_string: protected function newGeneratorFromAlias($alias, $length = null)
  	{
  		$generatorAliases = [
  			'numeric' => 'numeric',
  			'alphanum' => 'alphaNumeric',
  			'token' => 'token',
  			'bytes' => 'randomByte'
  		];
  
  		if (array_key_exists($alias, $generatorAliases)) {
  			return $this->newGenerator($generatorAliases[$alias], $length);
  		}
  	}
code: protected function newGeneratorFromAlias($alias, $length = null)
  	{
  		$generatorAliases = [
  			'numeric' => 'numeric',
  			'alphanum' => 'alphaNumeric',
  			'token' => 'token',
  			'bytes' => 'randomByte'
  		];
  
  		if (array_key_exists($alias, $generatorAliases)) {
  			return $this->newGenerator($generatorAliases[$alias], $length);
  		}
  	}
code_tokens: protected function newGeneratorFromAlias ( $ alias , $ length = null ) { $ generatorAliases = [ 'numeric' => 'numeric' , 'alphanum' => 'alphaNumeric' , 'token' => 'token' , 'bytes' => 'randomByte' ] ; if ( array_key_exists ( $ alias , $ generatorAliases ) ) { return $ this -> newGenerator ( $ generatorAliases [ $ alias ] , $ length ) ; } }
docstring: Creates a new generator instance from the given alias.
  
  @param string $alias Generator type alias
  @param mixed $length
  @return Keygen\Generator | null
  
  @throws \InvalidArgumentException
docstring_tokens: Creates a new generator instance from the given alias .