src/GitHubFactory.php
public function make(array $config)
    {
        $client = new Client($this->getBuilder($config), array_get($config, 'version'), array_get($config, 'enterprise'));

        if (!array_key_exists('method', $config)) {
            throw new InvalidArgumentException('The github factory requires an auth method.');
        }

        if ($config['method'] === 'none') {
            return $client;
        }

        return $this->auth->make($config['method'])->with($client)->authenticate($config);
    }
public function make(array $config)
    {
        $client = new Client($this->getBuilder($config), array_get($config, 'version'), array_get($config, 'enterprise'));

        if (!array_key_exists('method', $config)) {
            throw new InvalidArgumentException('The github factory requires an auth method.');
        }

        if ($config['method'] === 'none') {
            return $client;
        }

        return $this->auth->make($config['method'])->with($client)->authenticate($config);
    }
public function make ( array $ config ) { $ client = new Client ( $ this -> getBuilder ( $ config ) , array_get ( $ config , 'version' ) , array_get ( $ config , 'enterprise' ) ) ; if ( ! array_key_exists ( 'method' , $ config ) ) { throw new InvalidArgumentException ( 'The github factory requires an auth method.' ) ; } if ( $ config [ 'method' ] === 'none' ) { return $ client ; } return $ this -> auth -> make ( $ config [ 'method' ] ) -> with ( $ client ) -> authenticate ( $ config ) ; }
Make a new github client.

@param string[] $config

@throws \InvalidArgumentException

@return \Github\Client
Make a new github client .