Bug report
Code snippet that reproduces the problem
https://phpstan.org/r/4ac12ab2-b5be-4d0e-911b-d55264f521ab
Expected output
No issue reported. !$scanner->isDone() can change value, as scanChar() and readChar() are modifying the state of the scanner.
Did PHPStan help you today? Did it make you happy in any way?
After upgrading to PHPStan 1.x, it allowed finding some dead code (a ternary being always true) in scssphp. So definitely good that it improves.