sclable / array-functions
An array wrapper to normalize php array functions, give them an ObjectOriented and functional programming approach.
Installs: 121
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 5
Forks: 0
pkg:composer/sclable/array-functions
Requires (Dev)
- phpunit/phpunit: ^4
- sclable/coding-standards: 0.1.0.2
This package is not auto-updated.
Last update: 2022-02-01 12:57:41 UTC
README
An array wrapper to normalize php array functions, give them an ObjectOriented and functional programming approach.
Installation
With Composer:
composer require sclable/array-functions
Usage
echo ArrayWrap::range(0, 10) ->filter(function ($nr) { return $nr < 3; }) ->map(function ($nr) { return "Number: $nr\n"; }) ->reverse(); // echoes // Number: 2 // Number: 1 // Number: 0
Contribute
Clone/fork the repository as you like. To get started, run composer install
.
- PHPUnit Tests preferred
- PSR-2 Coding style must apply
License
see LICENSE.