Make sure that to provide as much type information as possible to Psalm so that it can perform inference. For example, you could add a docblock to the `callFoo` function:
```php
<?php
class A {
public function foo() : void {}
}
/**
*@param array<A> $arr
*/
function callFoo(array $arr) : void {
array_pop($arr)->foo(); // MixedMethodCall emitted here