for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Ds;
/**
* Vector
*
* @package Ds
*/
final class Vector implements \IteratorAggregate, \ArrayAccess, Sequence
{
use Traits\Collection;
use Traits\Sequence;
use Traits\Capacity;
const MIN_CAPACITY = 10;
* Increase capacity
protected function increaseCapacity()
$size = count($this);
if ($size > $this->capacity) {
$this->capacity = max(intval($this->capacity * 1.5), $size);
}