Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@karoshi.org.uk>2015-06-21 01:44:02 +0300
committerRobin McCorkell <rmccorkell@karoshi.org.uk>2015-06-22 14:17:17 +0300
commitb3d223202875f0f7cc5aec5d6dc1e4938077afd6 (patch)
treea18f947b18b29c9d6eee5277ec429ad6dcaac51c /lib
parent74ce46a8c8a41c8ed218be4037361ddbaca61538 (diff)
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')
-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 00d6e1f1573..d5613f1feb8 100644
--- a/lib/private/appframework/utility/controllermethodreflector.php
+++ b/lib/private/appframework/utility/controllermethodreflector.php
@@ -56,7 +56,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()) {