Hi-Folks / array

Arr class is built on top of the PHP array functions. Arr exposes methods for creating, managing, accessing to the array data structure.
https://packagist.org/packages/hi-folks/array
MIT License
15 stars 9 forks source link

#10 Implement entries method #37

Closed LeoVie closed 2 years ago

LeoVie commented 2 years ago

This solves #10

I could think of change the behaviour of entries to returning a nested Arr object instead of returning an Arr object with arrays in it. But I'm not sure, if this would be somehow practical. The expectation in the test would be then

expect($entries)->toEqual(Arr::make([
        Arr::make([7, '🥝']),
        Arr::make([-1, '🍓']),
        Arr:make([1, '🍋']),
        ...
    ]));

What do you think about it?

roberto-butti commented 2 years ago

thank you @LeoVie amazing Pull Request! I'm going to merge it! Thank you