diff --git a/src/applications/diviner/atomizer/DivinerPHPAtomizer.php b/src/applications/diviner/atomizer/DivinerPHPAtomizer.php index 36616897f2..201055a15c 100644 --- a/src/applications/diviner/atomizer/DivinerPHPAtomizer.php +++ b/src/applications/diviner/atomizer/DivinerPHPAtomizer.php @@ -141,7 +141,7 @@ final class DivinerPHPAtomizer extends DivinerAtomizer { $docs = idx($metadata, 'param'); if ($docs) { - $docs = explode("\n", $docs); + $docs = (array)$docs; $docs = array_filter($docs); } else { $docs = array(); @@ -283,6 +283,15 @@ final class DivinerPHPAtomizer extends DivinerAtomizer { } } + $return = (array)$return; + if (count($return) > 1) { + $atom->addWarning( + pht( + 'Documentation specifies `%s` multiple times.', + '@return')); + } + $return = head($return); + if ($atom->getName() == '__construct' && $atom->getType() == 'method') { $return_spec = array( 'doctype' => 'this',