Search code examples
phpphpdocphpstorm

Prepend return type with slash for constructor


Is there a specific reason that PhpStorm prepends the return type of a constructor with a slash?

class MyTest
{
    /**
     * Constructor
     *
     * @return \MyTest
     **/
    public function __construct(){}
}

Does it have a special meaning within PHPDoc itself? Or some specific IDE functionality?


Solution

  • It basically means that MyTest resides in the global namespace.