sfneal/array-helpers

Array helpers for PHP applications

3.3.1 2021-08-16 16:20 UTC

This package is auto-updated.

Last update: 2024-10-16 23:20:20 UTC


README

Packagist PHP support Latest Version on Packagist Build Status Scrutinizer Code Quality StyleCI Total Downloads

Array helpers for PHP applications.

Installation

You can install the package via composer:

composer require sfneal/array-helpers

In order to autoload to the helper functions add the following path to the autoload.files section in your composer.json.

"autoload": {
    "files": [
        "vendor/sfneal/array-helpers/src/arrays.php"
    ]
},

Usage

Here's an example use of the arrayRemoveKeys method.

$array = ['red' => 36, 'black' => 88, 'white' => 72];

// Remove a key from the array
use Sfneal\Helpers\Arrays\ArrayHelpers;
(new ArrayHelpers($array))->arrayRemoveKeys('red');
>>> ['black' => 88, 'white' => 72,];

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email stephen.neal14@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

PHP Package Boilerplate

This package was generated using the PHP Package Boilerplate.