protected function buildStacks()
    {
        $stacks   = [];
        $stackNo  = 0;
        $currSize = 0;

        foreach ($this->requests as $request) {
            if ($currSize === $this->stackSize) {
                $currSize = 0;
                $stackNo++;
            }

            $stacks[$stackNo][] = $request;
            $currSize++;
        }

        return $stacks;
    }
protected function buildStacks()
    {
        $stacks   = [];
        $stackNo  = 0;
        $currSize = 0;

        foreach ($this->requests as $request) {
            if ($currSize === $this->stackSize) {
                $currSize = 0;
                $stackNo++;
            }

            $stacks[$stackNo][] = $request;
            $currSize++;
        }

        return $stacks;
    }
protected function buildStacks ( ) { $ stacks = [ ] ; $ stackNo = 0 ; $ currSize = 0 ; foreach ( $ this -> requests as $ request ) { if ( $ currSize === $ this -> stackSize ) { $ currSize = 0 ; $ stackNo ++ ; } $ stacks [ $ stackNo ] [ ] = $ request ; $ currSize ++ ; } return $ stacks ; }
Builds stacks of requests.

@return array
Builds stacks of requests .