summaryrefslogtreecommitdiffstats
path: root/lib/private
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-20 23:52:01 +0100
commit04b6f67f07802f4a4b580f74cf2502f5e0cbbb24 (patch)
treeef759ea9f0ebd35e89f7c030806bb86d45fca9e2 /lib/private
parent183bd6dd49040644d64013c56e9f4a48aa9b8ceb (diff)
downloadnextcloud-server-04b6f67f07802f4a4b580f74cf2502f5e0cbbb24.tar.gz
nextcloud-server-04b6f67f07802f4a4b580f74cf2502f5e0cbbb24.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.
Diffstat (limited to 'lib/private')
-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 93510093c08..e013a74253a 100644
--- a/lib/private/appframework/utility/controllermethodreflector.php
+++ b/lib/private/appframework/utility/controllermethodreflector.php
@@ -59,7 +59,7 @@ class ControllerMethodReflector implements IControllerMethodReflector{
$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()) {