Suppose I have a class
class Class1
{
public function method1(){
return "hello world";
}
}
and I have another class that uses this in a class
class Class2
{
/** @var $firstClass Class1 */
private $firstClass;
public function __construct($firstClass)
{
$this->firstClass = $firstClass;
}
public function method2()
{
return $this->firstClass-> "I want code completion to work here"
}
}
How do I get the code completion to work using PHPDoc. I've searched phpdoc for scope, declaration, all kinds of stuff. I can't figure out the terms or placement of the comment line for phpdoc to pick this up.
I'm using phpstorm. Help!