mirror of
https://github.com/danog/endtoend-test-psl.git
synced 2024-12-04 10:39:57 +01:00
[Iter] cs fix
This commit is contained in:
parent
1aad753ca2
commit
4e8c2ffaf7
@ -4,8 +4,8 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Psl\Iter;
|
namespace Psl\Iter;
|
||||||
|
|
||||||
use Psl\Internal;
|
|
||||||
use Generator;
|
use Generator;
|
||||||
|
use Psl\Internal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter out null values from the given iterable.
|
* Filter out null values from the given iterable.
|
||||||
@ -24,7 +24,7 @@ function filter_nulls(iterable $iterable): Iterator
|
|||||||
{
|
{
|
||||||
return Internal\lazy_iterator(static function () use ($iterable): Generator {
|
return Internal\lazy_iterator(static function () use ($iterable): Generator {
|
||||||
foreach ($iterable as $value) {
|
foreach ($iterable as $value) {
|
||||||
if ($value !== null) {
|
if (null !== $value) {
|
||||||
yield $value;
|
yield $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -83,5 +83,6 @@ function range($start, $end, $step = null): Iterator
|
|||||||
yield $i;
|
yield $i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user