Skip to content

Commit

Permalink
Remove unneeded variable assignations.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Sep 8, 2020
1 parent 5a392f3 commit 8ae26f6
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Operation/Contains.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static function (...$values): Closure {
* @psalm-return Generator<int, bool>
*/
static function (Iterator $iterator) use ($values): Generator {
foreach ($iterator as $key => $value) {
foreach ($iterator as $value) {
foreach ($values as $k => $v) {
if ($v === $value) {
unset($values[$k]);
Expand Down
2 changes: 1 addition & 1 deletion src/Operation/Falsy.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __invoke(): Closure
* @psalm-return Generator<int, bool> $iterator
*/
static function (Iterator $iterator): Generator {
foreach ($iterator as $key => $value) {
foreach ($iterator as $value) {
if (false !== (bool) $value) {
return yield false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Operation/Nullsy.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __invoke(): Closure
* @psalm-return Generator<int, bool>
*/
static function (Iterator $iterator): Generator {
foreach ($iterator as $key => $value) {
foreach ($iterator as $value) {
if (null !== $value) {
return yield false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Operation/Truthy.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __invoke(): Closure
* @psalm-return Generator<int, bool> $iterator
*/
static function (Iterator $iterator): Generator {
foreach ($iterator as $key => $value) {
foreach ($iterator as $value) {
if (false === (bool) $value) {
return yield false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Operation/Unpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __invoke(): Closure
* @psalm-return Generator<T, T, mixed, void>
*/
static function (Iterator $iterator): Generator {
foreach ($iterator as $key => $value) {
foreach ($iterator as $value) {
if (!is_iterable($value)) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Operation/Unwrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __invoke(): Closure
* @psalm-return Generator<TKey, T>
*/
static function (Iterator $iterator): Generator {
foreach ($iterator as $key => $value) {
foreach ($iterator as $value) {
foreach ((array) $value as $k => $v) {
yield $k => $v;
}
Expand Down

0 comments on commit 8ae26f6

Please sign in to comment.