Community
Participate
Working Groups
Right now @param have just class name and @return have FQN in generated phpDoc. To reproduce: <?php namespace buspacex { class Onetx {} } namespace myspace { use buspacex\Onetx; | // generate phpDoc function function_name(Onetx $param) { return $param; } } Result: <?php namespace buspacex { class Onetx {} } namespace myspace { use buspacex\Onetx; /** * * @param Onetx $param <- OK * @return \buspacex\Onetx <- NOT OK */ function function_name(Onetx $param) { return $param; } }
*** Bug 467768 has been marked as a duplicate of this bug. ***
Hi Michal, @param has just class name because there was only a class name before the $param declaration, it was just "bad luck" in your case that @param and @return tags looked different :) Both @param and @return don't take "use" statements in account and you can have such cases: /** * * @param \buspacex\Onetx $param * @return \buspacex\Onetx */ function function_name(\buspacex\Onetx $param) { return $param; } For @return tags we could add a minimal fix by checking if returned types are in same namespace than the function or method and removing the namespace part when unnecessary. I'll propose a patch, but it can be rejected if not accurate, it's just a proposition ;) Thierry.
New Gerrit change created: https://git.eclipse.org/r/51391