src/Client.php
private function parseRateLimitFromResponse(Response $response)
    {
        $rateLimitHeaders = array_filter([
            $response->getHeader('X-Rate-Limit-Limit'),
            $response->getHeader('X-Rate-Limit-Remaining'),
            $response->getHeader('X-Rate-Limit-Reset')
        ]);

        if (count($rateLimitHeaders) == 3) {
            $rateLimitClass = new ReflectionClass(RateLimit::class);
            $this->rate_limit = $rateLimitClass->newInstanceArgs($rateLimitHeaders);
        }
    }
private function parseRateLimitFromResponse(Response $response)
    {
        $rateLimitHeaders = array_filter([
            $response->getHeader('X-Rate-Limit-Limit'),
            $response->getHeader('X-Rate-Limit-Remaining'),
            $response->getHeader('X-Rate-Limit-Reset')
        ]);

        if (count($rateLimitHeaders) == 3) {
            $rateLimitClass = new ReflectionClass(RateLimit::class);
            $this->rate_limit = $rateLimitClass->newInstanceArgs($rateLimitHeaders);
        }
    }
private function parseRateLimitFromResponse ( Response $ response ) { $ rateLimitHeaders = array_filter ( [ $ response -> getHeader ( 'X-Rate-Limit-Limit' ) , $ response -> getHeader ( 'X-Rate-Limit-Remaining' ) , $ response -> getHeader ( 'X-Rate-Limit-Reset' ) ] ) ; if ( count ( $ rateLimitHeaders ) == 3 ) { $ rateLimitClass = new ReflectionClass ( RateLimit :: class ) ; $ this -> rate_limit = $ rateLimitClass -> newInstanceArgs ( $ rateLimitHeaders ) ; } }
Attempts to pull rate limit headers from response and add to client.

@param    Response $response

@return   void
Attempts to pull rate limit headers from response and add to client .