Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: iterable_chunk() #50

Merged
merged 3 commits into from
Jun 4, 2024
Merged

Feat: iterable_chunk() #50

merged 3 commits into from
Jun 4, 2024

Conversation

bpolaszek
Copy link
Owner

@bpolaszek bpolaszek commented May 30, 2024

Just stumbled upon requiring the array_chunk function on a generator - let's introduce iterable_chunk()!

@bpolaszek bpolaszek marked this pull request as ready for review May 30, 2024 13:14
@bpolaszek
Copy link
Owner Author

@simPod would you have a few minutes reviewing this? Thx!

src/iterable-functions.php Outdated Show resolved Hide resolved
Co-authored-by: Simon Podlipsky <simon@podlipsky.net>
@bpolaszek bpolaszek merged commit a8d257b into master Jun 4, 2024
11 checks passed
@bpolaszek bpolaszek deleted the feature/iterable-chunk branch June 4, 2024 13:23
@@ -118,6 +119,16 @@ public function values(): self
return new self(new WithoutKeysTraversable($this->iterable));
}

/** @return iterable<int, array<TKey, TValue>> */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/** @return iterable<int, iterable<TKey, TValue>> */

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shit - didn't notice on time static analysis was failing, will open another PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants