phpstan / phpstan-strict-rules

Extra strict and opinionated rules for PHPStan
MIT License
595 stars 46 forks source link

Incorrect generics on Iterator #155

Closed nusje2000 closed 2 years ago

nusje2000 commented 2 years ago

https://phpstan.org/r/642defe4-682f-4216-b8c7-6c36a9dfff67

When using the current function on an Iterator, the return should be T|null since null is returned when the iterator is empty.

ondrejmirtes commented 2 years ago

Duplicate of https://github.com/phpstan/phpstan/issues/3674

github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.