PHPDoc: Documenting a function with a variable number of arguments

前端 未结 4 1966
渐次进展
渐次进展 2021-01-07 16:57

What is the recommended method for documenting a class method that accepts a variable number of arguments?

Maybe something like this?



        
4条回答
  •  一个人的身影
    2021-01-07 17:24

    /**
     * @param mixed $numbers,... Description
     */
    Public function sum ($numbers)
    

    In the method, $numbers will not be used.

提交回复
热议问题