phpdoctor icon indicating copy to clipboard operation
phpdoctor copied to clipboard

missing namespace handling in DocBlock

Open KampfCaspar opened this issue 15 years ago • 1 comments

As it is now, unqualified / relative class names in a DocBlock seem to be resolved relative to the namespace root:

namespace A; ...

  • @return SomeClass

PHPDoctor interprets this as \SomeClass. It would be more "intuitive" (and conforming to javadoc spec, IMHO) if it would be interpreted as \A\SomeClass. If the coder wanted to refer to \SomeClass, he could/should write so...

Also: use some/namespace as b;

  • @return b/SomeClass should be resolved.

How should those be documented? I suppose, the full/absolute class name woud be best - but I'm not sure.

KampfCaspar avatar Jun 28 '10 06:06 KampfCaspar

agree to that. but the second confuses me a bit

beikov avatar Aug 16 '10 20:08 beikov