src/Client/OAuthClient.php
private function processThrottleData(ResponseInterface $response)
    {
        if (empty($rateLimit = $response->getHeader('X-RateLimit-Limit'))) {
            return;
        }

        if (empty($remaining = $response->getHeader('X-RateLimit-Remaining'))) {
            return;
        }

        if (!empty($reset = $response->getHeader('X-RateLimit-Reset'))) {
            $this->rateLimit->setEndOfThrottle(intval($reset[0]));
        } else {
            $this->rateLimit->setEndOfThrottle(null);
        }

        $this->rateLimit->setMaxPerMinute(intval($rateLimit[0]))->setRemaining(intval($remaining[0]));
    }
private function processThrottleData(ResponseInterface $response)
    {
        if (empty($rateLimit = $response->getHeader('X-RateLimit-Limit'))) {
            return;
        }

        if (empty($remaining = $response->getHeader('X-RateLimit-Remaining'))) {
            return;
        }

        if (!empty($reset = $response->getHeader('X-RateLimit-Reset'))) {
            $this->rateLimit->setEndOfThrottle(intval($reset[0]));
        } else {
            $this->rateLimit->setEndOfThrottle(null);
        }

        $this->rateLimit->setMaxPerMinute(intval($rateLimit[0]))->setRemaining(intval($remaining[0]));
    }
private function processThrottleData ( ResponseInterface $ response ) { if ( empty ( $ rateLimit = $ response -> getHeader ( 'X-RateLimit-Limit' ) ) ) { return ; } if ( empty ( $ remaining = $ response -> getHeader ( 'X-RateLimit-Remaining' ) ) ) { return ; } if ( ! empty ( $ reset = $ response -> getHeader ( 'X-RateLimit-Reset' ) ) ) { $ this -> rateLimit -> setEndOfThrottle ( intval ( $ reset [ 0 ] ) ) ; } else { $ this -> rateLimit -> setEndOfThrottle ( null ) ; } $ this -> rateLimit -> setMaxPerMinute ( intval ( $ rateLimit [ 0 ] ) ) -> setRemaining ( intval ( $ remaining [ 0 ] ) ) ; }
Process the rate limit.

@param ResponseInterface $response
Process the rate limit .