Skip to content

Commit 85bfa22

Browse files
committed
gen_stub: Allow additional text after @return
In case the stub file also contains documentation.
1 parent 43d5cef commit 85bfa22

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
@@ -1027,7 +1027,7 @@ public function getType(): string {
10271027
if ($this->name === "param") {
10281028
preg_match('/^\s*([\w\|\\\\\[\]]+)\s*\$\w+.*$/', $value, $matches);
10291029
} elseif ($this->name === "return") {
1030-
preg_match('/^\s*([\w\|\\\\\[\]]+)\s*$/', $value, $matches);
1030+
preg_match('/^\s*([\w\|\\\\\[\]]+)(\s+|$)/', $value, $matches);
10311031
}
10321032

10331033
if (isset($matches[1]) === false) {

0 commit comments

Comments
 (0)