array_pop($arr)->foo(); // MixedMethodCall emitted here
}
callFoo(
[new A()]
);
```
## Why this is bad
If Psalm doesn’t know what `array_pop($arr)` is, it can't verify whether `array_pop($arr)->foo()` will work or not.
## How to fix
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