Skip to content

Commit c1ce34a

Browse files
authored
Merge pull request #1324 from jaapio/param-variadic
Add variadic to param tag
2 parents f833025 + 5976b41 commit c1ce34a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

proposed/phpdoc-tags.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ Mark a function that has been generated using a PHP script.
368368
/**
369369
* @generated function generated using bin/script.php, please DO NOT EDIT!
370370
*
371-
* @params array $params parameters for the index API endpoint
371+
* @param array $params parameters for the index API endpoint
372372
*
373373
* @return array response from Elasticsearch
374374
*/
@@ -594,7 +594,7 @@ The @param tag is used to document a single parameter of a function or method.
594594

595595
#### Syntax
596596

597-
@param ["Type"] $[name] [<description>]
597+
@param ["Type"] [...]$[name] [<description>]
598598

599599
#### Description
600600

@@ -604,6 +604,11 @@ single parameter of a function or method. When provided it MUST contain a
604604
@param tags are omitted due to all useful info already being visible in the
605605
code signature itself. The description is OPTIONAL yet RECOMMENDED.
606606

607+
The name of the parameter MUST be prefixed with a dollar sign (`$`) to indicate
608+
the start of a variable name. OPTIONAL variadic operator (`...`) MAY be used
609+
to indicate that the parameter is variadic. The variadic operator MAY only be
610+
applied to the last parameter.
611+
607612
It is RECOMMENDED when documenting to use this tag with every function and
608613
method.
609614

0 commit comments

Comments
 (0)