In PHPStorm, I can type-hint a variable this way:
/** @var Point $point */
$point->x();
However, say I inherited a variable from a parent class, and want to type-hint it:
class PointProxy extends Proxy
{
public function x()
{
...
/** @var Point $this->geometry */
return $this->geometry->x();
}
}
This doesn't work, PHPStorm acts as if I had type-hinted $this, and not $this->geometry.
Is there a way to make such a type-hint work without redeclaring the $geometry property in the subclass, or is this unsupported?

/** @var Point $this->geometry */makes no sense .. as PHPDoc comment will be applied to first level ($thisin this case) only. Right now you may try to declare it via@propertyin PHPDoc comment for the class -- should only make sense if it's a public property and not private/protected.Geometry. The child class should document that it is in fact aPoint, descendant ofGeometry.