-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
chore: more specific return type for chunk() method #351
base: master
Are you sure you want to change the base?
chore: more specific return type for chunk() method #351
Conversation
PR Summary
|
I think there are some new errors to fix. |
5f228d2
to
1da16de
Compare
$chunkIndex = 0; | ||
$chunk = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drupol , I have slightly changed the variables names here, since it took me around 15 minutes to figure out what $i
, $values
, and $sizes
variables mean and what the code below does. If you wish, I could revert it back to the previous version, but in my opinion the current implementation is better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No no it's fine, it's actually a good idea.
src/Operation/Chunk.php
Outdated
/** @var non-empty-list<T> $chunk */ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without this @var
annotation psalm won't be able to infer the fact that chunk is never empty when it is yielded
@@ -18,47 +18,49 @@ | |||
final class Chunk extends AbstractOperation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drupol , frankly speaking I have no clue what these errors are all about
1da16de
to
ce28b5a
Compare
Follows from #350