iterators icon indicating copy to clipboard operation
iterators copied to clipboard

add RecursiveIteratorAggregateIterator

Open mastir opened this issue 1 year ago • 2 comments

One more missing iterator.

I made it to travel deep tree Traversable structure without RecursiveIterator interface

mastir avatar Jul 26 '24 11:07 mastir

PR Summary

  • Introduction of New Recursive Iterator Class A new class called 'RecursiveIteratorAggregateIterator' has been created and included in a new file. This class is designed to handle how lists or other sets of data are stepped through, especially if these sets contain other nested sets.
  • Unit Test for New Recursive Iterator Class To validate the functionality of the new Recursive Iterator class, a series of unit tests have been created and captured in a file called 'RecursiveIteratorAggregateIteratorTest'.
  • Expansion of Unit Test to Cover New Cases The already-existing 'RecursiveIteratorAggregateIteratorTest' was updated to include a new case called 'testRecursiveIteratorAggregateIterator'. This additional test is designed to ensure that the new class correctly handles a series of nested objects.

what-the-diff[bot] avatar Jul 26 '24 11:07 what-the-diff[bot]

hey hi first contributor!

Thanks for the PR! Can you please fix the static analysis issue and code style?

Once it's done, I'll review it manually.

Thanks again!

drupol avatar Jul 26 '24 12:07 drupol

Does this PR is similar to https://github.com/loophp/iterators/pull/61 ?

drupol avatar Oct 09 '24 11:10 drupol

Yes, #61 has same logic, but for different structeres. this iterator provides recursive iteration over tree-like structure of objects implementing Itrator or IteratorArgregate interface. RecursiveIterableAggregate in #61 adds iteration over traversable tree-like structures (like deep array or array of object tree).

mastir avatar Oct 09 '24 12:10 mastir

Since this pull request has not had any activity within the last 5 days, I have marked it as stale. I will close it if no further activity occurs within the next 5 days.

github-actions[bot] avatar Oct 15 '24 12:10 github-actions[bot]