[Pkg-owncloud-commits] [owncloud] 53/62: Allow multiple whitespace in type hints in AppFramework

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


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

taffit pushed a commit to annotated tag v8.0.5beta
in repository owncloud.

commit b3d223202875f0f7cc5aec5d6dc1e4938077afd6
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 00d6e1f..d5613f1 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()) {

-- 
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