public function each(Closure $callback)
    {
        if (!is_callable($callback)) {
            return;
        }
        $data = [];
        $this->items ? $data = &$this->items : (!$this->data ?: $data = &$this->data);
        foreach ($data as $k => $v) {
            call_user_func_array($callback, [$k, $v]);
        }
    }
public function each(Closure $callback)
    {
        if (!is_callable($callback)) {
            return;
        }
        $data = [];
        $this->items ? $data = &$this->items : (!$this->data ?: $data = &$this->data);
        foreach ($data as $k => $v) {
            call_user_func_array($callback, [$k, $v]);
        }
    }
public function each ( Closure $ callback ) { if ( ! is_callable ( $ callback ) ) { return ; } $ data = [ ] ; $ this -> items ? $ data = & $ this -> items : ( ! $ this -> data ? : $ data = & $ this -> data ) ; foreach ( $ data as $ k => $ v ) { call_user_func_array ( $ callback , [ $ k , $ v ] ) ; } }
This method takes Closure as argument, so every element from response will go into this Closure.

@param Closure $callback
This method takes Closure as argument so every element from response will go into this Closure .