diff --git a/extractor/extract.php b/extractor/extract.php index 20e36f3..6529706 100755 --- a/extractor/extract.php +++ b/extractor/extract.php @@ -664,7 +664,15 @@ private function stmtDiff(Node $old, Node $new, string $updateTo): array */ private function compareConstants(Node\Stmt\ClassConst $old, Node\Stmt\ClassConst $new, string $updateTo): array { - if ($old->getDocComment() !== $new->getDocComment()) { + if ($old->getDocComment() !== null) { + if ($new->getDocComment() === null) { + return $this->stmtDiff($old, $new, $updateTo); + } + + if ($old->getDocComment()->getText() !== $new->getDocComment()->getText()) { + return $this->stmtDiff($old, $new, $updateTo); + } + } elseif ($new->getDocComment() !== null) { return $this->stmtDiff($old, $new, $updateTo); } if ($old->flags !== $new->flags) {