Skip to content

Commit

Permalink
Add missing return statements.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Aug 15, 2020
1 parent 1c9e929 commit 119cdfe
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Operation/Cycle.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static function (Iterator $iterator, int $length): Generator {
return yield from [];
}

yield from new LimitIterator(
return yield from new LimitIterator(
new InfiniteIterator($iterator),
0,
$length
Expand Down
2 changes: 1 addition & 1 deletion src/Operation/Explode.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __invoke(): Closure
* @psalm-return \Generator<int, list<T>>
*/
static function (Iterator $iterator, array $explodes): Generator {
yield from (new Run(
return yield from (new Run(
new Split(
...array_map(
/**
Expand Down
2 changes: 1 addition & 1 deletion src/Operation/Limit.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function __invoke(): Closure
* @psalm-return \Generator<TKey, T>
*/
static function (Iterator $iterator, int $limit, int $offset): Generator {
yield from new LimitIterator($iterator, $offset, $limit);
return yield from new LimitIterator($iterator, $offset, $limit);
};
}
}
2 changes: 1 addition & 1 deletion src/Operation/Random.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function __invoke(): Closure
* @psalm-return \Generator<TKey, T>
*/
static function (Iterator $iterator, int $size): Generator {
yield from (new Run(new Limit($size), new Shuffle()))($iterator);
return yield from (new Run(new Limit($size), new Shuffle()))($iterator);
};
}
}

0 comments on commit 119cdfe

Please sign in to comment.