===description===
Calling a method on a variable assigned null reports NullMethodCall.
===file===
<?php
function test(): void {
    $x = null;
    $x->foo();
}
===expect===
NullMethodCall: Cannot call method foo() on null
