protected function getClient(array $settings)
    {
        if (empty($settings['credential_id'])) {
            throw new OutOfRangeException('Credential ID is empty in Google client settings');
        }

        $client = $this->getApiModule()->getGoogleClient($settings['credential_id']);
        $client->setApplicationName('Analytics Reporting');
        $client->setScopes(array('https://www.googleapis.com/auth/analytics.readonly'));

        return $client;
    }
protected function getClient(array $settings)
    {
        if (empty($settings['credential_id'])) {
            throw new OutOfRangeException('Credential ID is empty in Google client settings');
        }

        $client = $this->getApiModule()->getGoogleClient($settings['credential_id']);
        $client->setApplicationName('Analytics Reporting');
        $client->setScopes(array('https://www.googleapis.com/auth/analytics.readonly'));

        return $client;
    }
protected function getClient ( array $ settings ) { if ( empty ( $ settings [ 'credential_id' ] ) ) { throw new OutOfRangeException ( 'Credential ID is empty in Google client settings' ) ; } $ client = $ this -> getApiModule ( ) -> getGoogleClient ( $ settings [ 'credential_id' ] ) ; $ client -> setApplicationName ( 'Analytics Reporting' ) ; $ client -> setScopes ( array ( 'https://www.googleapis.com/auth/analytics.readonly' ) ) ; return $ client ; }
Returns Google Client class instance
@param array $settings
@return \Google_Client
@throws OutOfRangeException
Returns Google Client class instance