Chunk the underlying collection array.

@param int|float $size

@return static
972697
public function chunk($size): Collection
    {
        $chunks = [];

        foreach (array_chunk($this->items, (int) $size, true) as $chunk) {
            $chunks[] = new static($chunk);
        }

        return new static($chunks);
    }
384315
public function size($size = null)
    {
        /* To do: function should be called ratio() */
        if (is_null($size)) {
            if (isset($this->size_attribute)) {
                return $this->size_attribute;
            } else {
                return;
            }
        }
        $size = $this->parseSize($size)->raw;
        $this->size_attribute = $size;
        $this->todo('resize');

        return $this;
    }
545818
public function divide(Size $size): Size
    {
        if (0 === $size->get('b')) {
            throw new \OutOfBoundsException('Could not divide by zero.');
        }

        $this->bit = \ceil($this->bit / $size->get('b'));

        return $this;
    }
1025250
public function median(int $size): Image
    {
        return $this->rank($size, $size, ($size * $size) / 2);
    }
1083606
public function setSize(int $size)
    {
        $sizes = [
            1,
            2,
            3,
            4,
            5,
            6
        ];

        if (! in_array((int) $size, $sizes)) {
            Throw new ElementException('Size "' . $size . '" is not an allowed size for heading html elements');
        }

        $this->element = 'h' . $size;

        return $this;
    }
835546
def _chunk(self, size):
        
        items = self.items

        return [items[i:i + size] for i in range(0, len(items), size)]
616041
public function pad(int $size, $value): self
    {
        return new static(array_pad($this->storage, $size, $value));
    }
210524
public function chunk(int $size): self
    {
        return Factory::create(array_chunk($this->items, $size, true));
    }
1155274
public function chunk($size, $offset = 0) {
		$data      = $this->createClone();
		$availSize = count($this->_map) - $offset;
		
		if ($size > $availSize) {
			$size = $availSize;
		}
		
		$last = $size + $offset;
		
		for ($i = $offset; $i < $last; ++$i) {
			$key = $this->_map[$i];
			
			if (isset($this->_models[$key])) {
				$data->setItem($key, $this->_models[$key]);
			} else {
				$data->setItem($key, $this->_data[$key]);
			}
		}
		
		return $data;
	}
625441
public function setPageSize($size)
    {
        $this->pageSize = ($size === null ? self::PAGE_SIZE : (int)$size);
        if ($this->pageSize < 0)
            $this->pageSize = self::PAGE_SIZE;

        return $this;
    }
449180
public function setSize($size)
    {
        $this->cachedParams = null;

        $this->checkSize($size);

        $this->size = $size;

        return $this;
    }
32173
public function withMaximumSizeInBytes($size) {
		$size = (int) $size;

		if ($size > $this->maxTotalSize) {
			throw new TotalSizeExceededError();
		}

		$this->maxIndividualSize = $size;

		return $this;
	}
956411
public function chunk($chunksize)
    {
        if ($chunksize < 1) {
            throw new \InvalidArgumentException("'{$chunksize}' is not a valid chunk size.");
        }

        return Linq::from(new ChunkIterator($this->iterator, $chunksize));
    }
35834
public function fromIntSize(int $size):ByteArray{

		if(!$this->isAllowedInt($size)){
			throw new TraitException('invalid size');
		}

		return new $this->byteArrayClass($size);
	}
240587
public function generate($size)
    {
        if ($size == 0) {
            return static::emptyValue($size);
        }
        $file = fopen(static::$file, 'rb');
        if (!$file) {
            return static::emptyValue($size);
        }
        if (function_exists('stream_set_read_buffer')) {
            stream_set_read_buffer($file, 0);
        }
        $result = fread($file, $size);
        fclose($file);

        return $result;
    }
1314061
public function chunk($length)
    {
        $chunkedData = array_chunk($this->toArray(), $length, true);

        return new static(empty($chunkedData) ? array() : $chunkedData[0]);
    }
487437
public function setPageSize($size)
    {
        if ( ! $size) {
            return $this->clearPageSize();
        }

        session()->put($this->getSessionKey(static::TYPE_PAGESIZE), $size);

        return $this;
    }