Require package
composer require gusarov112/abstract-collection
This is just recommendation how to use and how to implement.
/**
* @method Bar[] getIterator()
*/
class BarCollection extends \Gusarov112\AbstractCollection\AbstractCollection
{
public function __construct(Bar ...$items)
{
$this->items = $items;
}
public function addItem(Bar $item)
{
$this->items[] = $item;
}
}
- Write tests
- Make SplFixedArray benchmark again and post results in readme