In short: Why does this work:
/* @var ArbitraryClassName $wonderfulVariableName */
$wonderfulVariableName = $this->classVariable;
But this won't?
/* @var ArbitraryClassName $this->classVariable */
$this->classVariable = $externalObject; // externalObject is of type ArbitraryClassName
Both in case of trying to get autocomplete with:
$this->[autocomplete] or $wonderfulVariableName->[autocomplete]
The object of $this->classVariable can change and as such a declaration at the top won't be sufficient.
A plugin-name, which adds this functionality to PHPStorm would be great too, if there're no settings or syntax for this.
Thank you very much :),