You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The param requires a paramname, however, this could be omitted when the param tag is describing just a single argument method or all other params are adequately documented. For example:
/**
* @param int
* /
public function foo($arg): void
{}
/**
* @param int $arg
* @param int Optional description
* /
public function foo($arg, $second): void
{}
I do see this as edge cased, but it makes makes more sense when you align this with other tags for example the @var tag. Which has the same behavior.
class Foo {
/** @var int */
public $bar
}
class Foo {
/**
* @var int
* @var string $foo
*/
public $bar $foo
}
I'm working on a pr to support this.
The text was updated successfully, but these errors were encountered:
jaapio
added a commit
to jaapio/phpdoc-parser
that referenced
this issue
Nov 15, 2022
Accoring to the PRS-5 standard paramnames are optional. The
parser does not force docblocks to be fully valid, so it's ok to
have multiple param tags without variable name. However this should
never happen in real world docblocks.
Fixesphpstan#164
The param requires a paramname, however, this could be omitted when the param tag is describing just a single argument method or all other params are adequately documented. For example:
I do see this as edge cased, but it makes makes more sense when you align this with other tags for example the
@var
tag. Which has the same behavior.I'm working on a pr to support this.
The text was updated successfully, but these errors were encountered: