mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-14 19:02:41 +01:00
Improve atomizing of PHP @return
annotation
Summary: Fixes T6890. This doesn't feel like a perfect solution, but I can't think of any cases in which this will produce the wrong result either. Test Plan: Ran `./bin/diviner generate` and checked the generated documentation for `PhabricatorCommonPasswords::loadWordlist()`. The return type was corrected shown as `map<string, bool>`. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T6890 Differential Revision: https://secure.phabricator.com/D11469
This commit is contained in:
parent
25ee2d4508
commit
7bd2994c2e
1 changed files with 1 additions and 1 deletions
|
@ -293,7 +293,7 @@ final class DivinerPHPAtomizer extends DivinerAtomizer {
|
|||
'this implicitly.');
|
||||
}
|
||||
} else if ($return) {
|
||||
$split = preg_split('/\s+/', trim($return), $limit = 2);
|
||||
$split = preg_split('/(?<!,)\s+/', trim($return), $limit = 2);
|
||||
if (!empty($split[0])) {
|
||||
$type = $split[0];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue