Bug report
Stan seems can not derive correct type if ternary operator used like this:
$test->test() ? $test->test()->format('d') : null
Code snippet that reproduces the problem
https://phpstan.org/r/ff44c8c8-06ca-470a-a716-ebd334aee215
Expected output
Stan should not complain about type.