nodeTypeResolver = $nodeTypeResolver; } public function isGetterMethodCall(MethodCall $methodCall) : bool { if ($methodCall->var instanceof MethodCall) { return \false; } $methodCallStaticType = $this->nodeTypeResolver->getStaticType($methodCall); $methodCallVarStaticType = $this->nodeTypeResolver->getStaticType($methodCall->var); // getter short call type return !$methodCallStaticType->equals($methodCallVarStaticType); } }