src/Api/BaseApi.php
private function injectPager(array $response, $method, $url, array $params = [])
    {
        while (next($response)) {
            if ('paging' === key($response)) {
                prev($response);
                break;
            }
        }

        $pageableKey = key($response);

        $response[$pageableKey] = new Pager($response, $pageableKey, $this->client, $method, $url, $params);

        reset($response);

        return $response;
    }
private function injectPager(array $response, $method, $url, array $params = [])
    {
        while (next($response)) {
            if ('paging' === key($response)) {
                prev($response);
                break;
            }
        }

        $pageableKey = key($response);

        $response[$pageableKey] = new Pager($response, $pageableKey, $this->client, $method, $url, $params);

        reset($response);

        return $response;
    }
private function injectPager ( array $ response , $ method , $ url , array $ params = [ ] ) { while ( next ( $ response ) ) { if ( 'paging' === key ( $ response ) ) { prev ( $ response ) ; break ; } } $ pageableKey = key ( $ response ) ; $ response [ $ pageableKey ] = new Pager ( $ response , $ pageableKey , $ this -> client , $ method , $ url , $ params ) ; reset ( $ response ) ; return $ response ; }
converts the pageable data into a real pager.

@param array  $response
@param string $method
@param string $url
@param array  $params

@return array
converts the pageable data into a real pager .