Skip to content
Permalink
Browse files

Use existing method in functiondocblockmanipulator

  • Loading branch information...
muglug committed Jun 1, 2019
1 parent c569f39 commit a8046376ddf8ef77e1603adf59d16cd328b1b562
Showing with 1 addition and 9 deletions.
  1. +1 −9 src/Psalm/Internal/FileManipulation/FunctionDocblockManipulator.php
@@ -286,19 +286,11 @@ private function getDocblock()
$docblock = $this->stmt->getDocComment();
if ($docblock) {
$parsed_docblock = DocComment::parsePreservingLength($docblock);
$parsed_docblock = DocComment::parse($docblock);
} else {
$parsed_docblock = ['description' => '', 'specials' => []];
}
foreach ($parsed_docblock['specials'] as $type => $blocks) {
foreach ($blocks as $i => $block) {
$parsed_docblock['specials'][$type][$i] = preg_replace('@^[ \t]*\*@m', '', $block);
}
}
$parsed_docblock['description'] = trim(preg_replace('@^[ \t]*\* ?@m', '', $parsed_docblock['description']));
foreach ($this->new_phpdoc_param_types as $param_name => $phpdoc_type) {
$found_in_params = false;
$new_param_block = $phpdoc_type . ' ' . '$' . $param_name;

0 comments on commit a804637

Please sign in to comment.
You can’t perform that action at this time.