public function chunk($size)
    {
        $chunked = array_chunk($this->array, $size);

        return new static(array_map(function ($item) {
            return new static($item);
        }, $chunked));
    }
public function chunk($size)
    {
        $chunked = array_chunk($this->array, $size);

        return new static(array_map(function ($item) {
            return new static($item);
        }, $chunked));
    }
public function chunk ( $ size ) { $ chunked = array_chunk ( $ this -> array , $ size ) ; return new static ( array_map ( function ( $ item ) { return new static ( $ item ) ; } , $ chunked ) ) ; }
Splits the array into chunks of the given size.

@param string $size
@return self
Splits the array into chunks of the given size .