Browse Source

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.
tags/v8.1RC2
Robin McCorkell 9 years ago
parent
commit
04b6f67f07
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      lib/private/appframework/utility/controllermethodreflector.php

+ 1
- 1
lib/private/appframework/utility/controllermethodreflector.php View File

@@ -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()) {

Loading…
Cancel
Save