A collection class for working with arrays
- Immutable - Most methods return a new collection, leaving the previous untouched
- Chainable - Methods can be chained to create fluent mapping and reduce original collection
- PHP >=7.2
- Composer
$ composer require jjgrainger/collection
$collection = new Collection([1, 2, 3]);
$total = $collection->sum(); // 6
- This project was created to learn unit testing, not intended for production use.
- Inspired by Laravel Collections
- Licensed under the MIT License
- Maintained under the Semantic Versioning Guide
Joe Grainger