Skip to content

Commit

Permalink
Merge pull request #31 from WyriHaximus/ensure-lowest-phpstan-underst…
Browse files Browse the repository at this point in the history
…ands-current-and-key-have-return-types

Ensure lowest PHPStan understands current and key have return types
  • Loading branch information
WyriHaximus authored Jul 17, 2022
2 parents 962d9d6 + c57b7ce commit d5ad7a9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/AwaitingIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,30 @@ private function complete(): void
$valid->resolve(false);
}

// phpcs:disable
/**
* @return mixed
*/
public function current(): mixed
{
return $this->queue->dequeue();
}
// phpcs:enable

public function next(): void
{
// no-op
}

// phpcs:disable
/**
* @return mixed
*/
public function key(): mixed
{
return $this->key++;
}
// phpcs:enable

/**
* @psalm-suppress MixedInferredReturnType
Expand Down

0 comments on commit d5ad7a9

Please sign in to comment.