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 descriptionnote: 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
Post a Comment