Shows a return type error when a deterministic function is called twice, once with null check, then with an assignment. A workaround would be to store the result in a variable and do the null check on the variable.
But is there another way to do this, maybe mark the lookup function as deterministic/pure, so Psalm can detect and keep the null check?
https://psalm.dev/r/b95d82f00f
```php
' for allFound
ERROR: InvalidReturnType - 9:12 - The declared return type 'array' for allFound is incorrect, got 'list{0: 'blah', 1?: null|string}'
```
https://psalm.dev/r/b95d82f00f
Shows a return type error when a deterministic function is called twice, once with null check, then with an assignment. A workaround would be to store the result in a variable and do the null check on the variable.
But is there another way to do this, maybe mark the
lookup
function as deterministic/pure, so Psalm can detect and keep the null check?