Bug report
PhpStan is reporting error Using nullsafe method call on non-nullable type UserObject. Use -> instead..
But removing nullsafe operator leads to a fatal PHP error Call to a member function getUsername() on null.
Code snippet that reproduces the problem
https://phpstan.org/r/80f8009c-ab8a-4dde-825f-4bd5c9eea6e5
Expected output
Do not report any error.