Uncertain type detection.


Given the following code, my current inspection profiles in phpstorm don't pick up any issues:

$wrapper2 = ['foo'=>['bar'=>[]]];
foreach($wrapper2 as $item){ 

Is there an inspection setting that anyone knows of that would notify me of the fact that PHPStorm is uncertain if $item is an object, or if it has the ::foobar() method?

1 comment

Unfortunately, currently there's no a way to detect this as we can't recover a proper type for $item.
Please vote: https://youtrack.jetbrains.com/issue/WI-26667


Please sign in to leave a comment.