summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@karoshi.org.uk>2015-06-20 23:44:02 +0100
committerRobin McCorkell <rmccorkell@karoshi.org.uk>2015-06-22 12:18:02 +0100
commit8592c0efb749e1ceadda17f19d89ef52bbd60570 (patch)
tree2424976a7a920acec26513d0ac0a808854e21108
parent1e0febe46738e2075d556cc25b8c3e6643f58b67 (diff)
downloadnextcloud-server-8592c0efb749e1ceadda17f19d89ef52bbd60570.tar.gz
nextcloud-server-8592c0efb749e1ceadda17f19d89ef52bbd60570.zip
Allow multiple whitespace in type hints in AppFramework
Type hints such as `@param bool $doSomething` will now correctly get parsed, allowing for alignment of docblock parameters if the app developer so wishes.
-rw-r--r--lib/private/appframework/utility/controllermethodreflector.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/appframework/utility/controllermethodreflector.php b/lib/private/appframework/utility/controllermethodreflector.php
index 045bfc8b9ba..b454640c1ed 100644
--- a/lib/private/appframework/utility/controllermethodreflector.php
+++ b/lib/private/appframework/utility/controllermethodreflector.php
@@ -54,7 +54,7 @@ class ControllerMethodReflector {
$this->annotations = $matches[1];
// extract type parameter information
- preg_match_all('/@param (?P<type>\w+) \$(?P<var>\w+)/', $docs, $matches);
+ preg_match_all('/@param\h+(?P<type>\w+)\h+\$(?P<var>\w+)/', $docs, $matches);
// this is just a fix for PHP 5.3 (array_combine raises warning if called with
// two empty arrays
if($matches['var'] === array() && $matches['type'] === array()) {