novactive / collection
++ Collection ++ Abstaction library for PHP.
Installs: 47 362
Dependents: 1
Suggesters: 0
Security: 0
Stars: 9
Watchers: 8
Forks: 3
Open Issues: 8
Requires
- php: ^7.4 || ^8.0
- ext-json: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- fzaninotto/faker: ^1.9
- phpdocumentor/reflection-docblock: ^5.2
- phpmd/phpmd: ^2.9
- phpunit/phpunit: ^7.5
- squizlabs/php_codesniffer: ^3.5
- symfony/var-dumper: ^5.1
This package is auto-updated.
Last update: 2024-11-09 05:32:27 UTC
README
Nova Collection
Because we did not find any Collection for PHP as simple as we wanted, we did ours.
Simpler, Better, Faster, Stronger
Using array_* functions against foreach is not an easy pick. As this library is made to manage low level actions. We wanted it to be fast, then we compared and we implemented the best choices. (have a look: PHP7.2)
Fully unit tested it is reliable.
Methods
Advanced Selection by range
$collection = NovaCollection([0,1,2,3,4,5,6,7,8,9,10]); $collection([2,4], 1, 2, '4-2', '3,2;5-2;10')->toArray();
Result: [2,3,4,1,2,4,3,2,3,4,5,4,3,2,10]
Standard Manipulation Methods
Contributing
In order to be accepted, your contribution needs to pass a few controls:
- PHP files should be valid
- PHP files should follow the PSR-2 standard
- PHP files should be phpmd and phpcpd warning/error free
To ease the validation process, you can use these 2 scripts:
Coding Standards and syntax
make codeclean
will check and fix the Coding Standards
Tests
make tests
will run the tests