Best way to document Array options in PHPDoc?

前端 未结 9 586
天命终不由人
天命终不由人 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:33

    Markdown Syntax for Object Notation (MSON) may be a better choice.

    example

    /**
     * @param array $config
     *   + app (string, required) - app directory name
     *   + view (string, required) - view directory name
     *   + type (enum[string]) - site type
     *     + pc - PC version
     *     + wap - mobile version
     *     + other - other, default value
     *   + table_prefix (string) - database table prefix
     */
    

提交回复
热议问题