I'm using phpstorm 2016.2 and recently I got this really weird behaviour in most of my projects. For some reason almost all autocomplete / typehinting (or generated phpdocs) will link to one or more semi random classes. The ones occuring most seem to be the Symfony Domcrawler.
As you can see in the attached screenshot, I have an object called `$domain` which obviously is a `Mockery::mock` object (and it's phpdoc is correct), but for some weird reason phpstorm thinks it's something completely different, unless I do another explicit `/** @var Mock $domain */` line above the definition.
This behaviour is really driving me nuts :(