theseer / phpdox

Documentation generator for PHP Code using standard technology (SRC, DOCBLOCK, XML and XSLT)
http://phpdox.de
Other
599 stars 121 forks source link

Type hinting factory methods with "self" results in "Unexpected return type" error #309

Closed apemsel closed 7 years ago

apemsel commented 7 years ago

A static factory method type hinted with "self" like this:

public static function createFromFoo() : self 
{
    /* ... */ 
}

results in

"(Unexpected return type definition [UnitCollectingVisitor.php:279])"