Skip to content

Commit 8b61c49

Browse files
Allowed the use of formats like @param array<> (#18924)
1 parent aab2815 commit 8b61c49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build/gen_stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4533,7 +4533,7 @@ public function getVariableName(): string {
45334533

45344534
if ($this->name === "param") {
45354535
// Allow for parsing extended types like callable(string):mixed in docblocks
4536-
preg_match('/^\s*(?<type>[\w\|\\\\]+(?<parens>\((?<inparens>(?:(?&parens)|[^(){}[\]]*+))++\)|\{(?&inparens)\}|\[(?&inparens)\])*+(?::(?&type))?)\s*\$(?<name>\w+).*$/', $value, $matches);
4536+
preg_match('/^\s*(?<type>[\w\|\\\\]+(?<parens>\((?<inparens>(?:(?&parens)|[^(){}[\]<>]*+))++\)|\{(?&inparens)\}|\[(?&inparens)\]|<(?&inparens)>)*+(?::(?&type))?)\s*\$(?<name>\w+).*$/', $value, $matches);
45374537
} elseif ($this->name === "prefer-ref") {
45384538
preg_match('/^\s*\$(?<name>\w+).*$/', $value, $matches);
45394539
}

0 commit comments

Comments
 (0)