Best way to document Array options in PHPDoc?

前端 未结 9 600
天命终不由人
天命终不由人 2020-12-04 09:57

I\'m struggling to write readable and easy to understand documentation that describes the multi-tree structure for Array options that are passed to a function.

Here

9条回答
  •  我在风中等你
    2020-12-04 10:09

    I kinda like this better:

     * @param array $doc
     *          'type'=>Doc::MY_DOC_TYPE,
     *          'created'=>$now,
     *          'modified'=>$now
    

    I just paste in the code from where it gets initialized, quick and easy.

提交回复
热议问题