[Pkg-owncloud-commits] [owncloud] 24/36: Allow multiple whitespace in type hints in AppFramework

David Prévot taffit at moszumanska.debian.org
Tue Jun 23 23:12:25 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 8592c0efb749e1ceadda17f19d89ef52bbd60570
Author: Robin McCorkell <rmccorkell at karoshi.org.uk>
Date:   Sat Jun 20 23:44:02 2015 +0100

    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.
---
 lib/private/appframework/utility/controllermethodreflector.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/private/appframework/utility/controllermethodreflector.php b/lib/private/appframework/utility/controllermethodreflector.php
index 045bfc8..b454640 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()) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list