You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By using the `wrap()` operation at the end, we make sure to not lose any values when converting into a regular array.
398
402
399
-
When you use the `sort()` operation, it relies on the [ArrayIterator::uasort()](https://www.php.net/manual/en/arrayiterator.uasort.php) underneath.
403
+
When you use the [`sort()` operation](https://github.com/loophp/collection/blob/master/src/Operation/Sort.php), it relies on the [ArrayIterator::uasort()](https://www.php.net/manual/en/arrayiterator.uasort.php) underneath.
400
404
But the `sort()` operation has all the logic to wrap all values prior and then unwrap them once they are sorted.
401
405
402
406
That was something hard to figure out at first, which in the end seemed completely logic.
407
+
408
+
# What's next?
409
+
410
+
Now that I'm acquainted with that non-exhaustive list of oddities, I still have some work to do.
411
+
412
+
What I'm trying to achieve with [loophp/collection](https://github.com/loophp/collection) is to focus on the algorithms.
413
+
414
+
[loophp/collection](https://github.com/loophp/collection) contains a list of [Operation](https://github.com/loophp/collection/tree/master/src/Operation) and [Transformation](https://github.com/loophp/collection/tree/master/src/Transformation) classes.
415
+
416
+
Those classes are basically classes wrapping a function that does something on the original collection.
417
+
Operations returns a Generator, Transformation returns usually a simple value.
418
+
419
+
My todo list for the next major version of the library:
420
+
421
+
* Get rid of Transformation and use Operation exclusively (_work in progress in [PR #12](https://github.com/loophp/collection/pull/12)_)
422
+
* Try to reach a better typing coverage,
423
+
* Provide a better documentation with real life examples of use for each Operation.
0 commit comments