php-collections
php-collections copied to clipboard
A PHP implementation of a templated list. The Collection class allows one object type and its subtypes to be added to the collection. Many standard PHP array functions are encapsulated in the collecti...
php 8
`Deprecated: Return type of Collections\CollectionInterface::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/vendor/danielgsims/php-collections/src/CollectionInterface.php on line 121`
At work we use this collections to improve type hinting. Example: ```php use \Foo\Bar\UrlCollection; class SomeClass { /** @var \Foo\Bar\UrlCollection */ private $urls; public function __construct(UrlCollection $urls) { $this->urls =...