mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Allowed the use of formats like @param array<>
(#18924)
This commit is contained in:
parent
aab281546c
commit
8b61c49987
1 changed files with 1 additions and 1 deletions
|
@ -4533,7 +4533,7 @@ class DocCommentTag {
|
|||
|
||||
if ($this->name === "param") {
|
||||
// Allow for parsing extended types like callable(string):mixed in docblocks
|
||||
preg_match('/^\s*(?<type>[\w\|\\\\]+(?<parens>\((?<inparens>(?:(?&parens)|[^(){}[\]]*+))++\)|\{(?&inparens)\}|\[(?&inparens)\])*+(?::(?&type))?)\s*\$(?<name>\w+).*$/', $value, $matches);
|
||||
preg_match('/^\s*(?<type>[\w\|\\\\]+(?<parens>\((?<inparens>(?:(?&parens)|[^(){}[\]<>]*+))++\)|\{(?&inparens)\}|\[(?&inparens)\]|<(?&inparens)>)*+(?::(?&type))?)\s*\$(?<name>\w+).*$/', $value, $matches);
|
||||
} elseif ($this->name === "prefer-ref") {
|
||||
preg_match('/^\s*\$(?<name>\w+).*$/', $value, $matches);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue