documentation - Is is still proper to include the @param varname in a PHP docblock? -


according wikipedia format @param docblock parameters type [$varname] description $varname optional. seems backed phpdocumentor project which states:

@param datatype $paramname description @param datatype1|datatype2 $paramname description 

note: of 0.4.1, @param can document phpdoc.de-style, optional $paramname

so still proper form include $paramname or should left out?

/**  * have foo!  *  * @param string $foo string  * @param string string  * @return string  */ function haveafoo($foo, $bar) { ... } 

more "proper form" include $paramname. ensures 0 ambiguity in matching @param line matching argument in function signature. listed "optional" as old backwards-compatibility issue "phpdoc.de style". doubt optional handling remains available in phpdocumentor2.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -