Skip to content

Commit 363a282

Browse files
committed
Extractor update
1 parent db0e6ec commit 363a282

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

extractor/extract.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,27 @@ private function compareFunctions(Node\FunctionLike $old, Node\FunctionLike $new
574574
}
575575
}
576576

577+
$oldPhpDocParameters = [];
578+
$newPhpDocParameters = [];
579+
if ($old->getDocComment() !== null) {
580+
$oldPhpDocNode = $this->parseDocComment($old->getDocComment()->getText());
581+
$oldParamTags = $oldPhpDocNode->getParamTagValues();
582+
foreach ($oldParamTags as $paramTag) {
583+
$oldPhpDocParameters[$paramTag->parameterName] = $paramTag->__toString();
584+
}
585+
}
586+
if ($new->getDocComment() !== null) {
587+
$newPhpDocNode = $this->parseDocComment($new->getDocComment()->getText());
588+
$newParamTags = $newPhpDocNode->getParamTagValues();
589+
foreach ($newParamTags as $paramTag) {
590+
$newPhpDocParameters[$paramTag->parameterName] = $paramTag->__toString();
591+
}
592+
}
593+
594+
if ($oldPhpDocParameters !== $newPhpDocParameters) {
595+
return $this->functionDiff($old, $new, $updateTo);
596+
}
597+
577598
return [$old];
578599
}
579600

0 commit comments

Comments
 (0)