Bug report
According to PHP, traversable can only be implemented by Iterator and IteratorAggregate
https://www.php.net/manual/en/class.traversable.php
Code snippet that reproduces the problem
https://phpstan.org/r/3c5c004f-6b91-4c05-894f-e9303871ab35
Expected output
When doing !$traversable instanceof IteratorAggregate check, it should reduce the type to Iterator.
I assume the fix is easy I'll try to take a look.
Did PHPStan help you today? Did it make you happy in any way?
No response
Bug report
According to PHP, traversable can only be implemented by Iterator and IteratorAggregate
https://www.php.net/manual/en/class.traversable.php
Code snippet that reproduces the problem
https://phpstan.org/r/3c5c004f-6b91-4c05-894f-e9303871ab35
Expected output
When doing
!$traversable instanceof IteratorAggregatecheck, it should reduce the type to Iterator.I assume the fix is easy I'll try to take a look.
Did PHPStan help you today? Did it make you happy in any way?
No response