]> granicus.if.org Git - php/commitdiff
gen_stub: Allow additional text after @return
authorNikita Popov <nikita.ppv@gmail.com>
Mon, 18 Jan 2021 12:11:35 +0000 (13:11 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 18 Jan 2021 12:13:32 +0000 (13:13 +0100)
In case the stub file also contains documentation.

build/gen_stub.php

index a952f6160484ec36e520d8848e204e1d4e3e7499..c765102999ea84ed7ef11326410062e479811f66 100755 (executable)
@@ -1027,7 +1027,7 @@ class DocCommentTag {
         if ($this->name === "param") {
             preg_match('/^\s*([\w\|\\\\\[\]]+)\s*\$\w+.*$/', $value, $matches);
         } elseif ($this->name === "return") {
-            preg_match('/^\s*([\w\|\\\\\[\]]+)\s*$/', $value, $matches);
+            preg_match('/^\s*([\w\|\\\\\[\]]+)(\s+|$)/', $value, $matches);
         }
 
         if (isset($matches[1]) === false) {