Skip to content

Commit

Permalink
sa: Improve static analysis score.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Dec 17, 2021
1 parent 47eb342 commit d11d032
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Operation/Equals.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@ final class Equals extends AbstractOperation
/**
* @pure
*
* @return Closure(Iterator<TKey, T>): Closure(Iterator<TKey, T>): Generator<int, bool>
* @return Closure(Iterator<TKey, T>): Closure(Iterator<TKey, T>): Generator<int|TKey, bool>
*/
public function __invoke(): Closure
{
return
/**
* @param Iterator<TKey, T> $other
*
* @return Closure(Iterator<TKey, T>): Generator<int, bool>
* @return Closure(Iterator<TKey, T>): Generator<int|TKey, bool>
*/
static function (Iterator $other): Closure {
/**
* @param Iterator<TKey, T> $iterator
*
* @return Generator<int, bool>
* @return Generator<int|TKey, bool>
*/
return static function (Iterator $iterator) use ($other): Generator {
while ($other->valid() && $iterator->valid()) {
Expand All @@ -54,9 +54,9 @@ static function (Iterator $other): Closure {
/**
* @param T $current
*/
static fn ($current): bool => Contains::of()($current)($other)->current();
static fn ($current): bool => (new Contains())()($current)($other)->current();

return yield from Every::of()(static fn (): bool => false)($containsCallback)($iterator);
return yield from (new Every())()(static fn (): bool => false)($containsCallback)($iterator);
};
};
}
Expand Down

0 comments on commit d11d032

Please sign in to comment.