Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ private function haveDocCommentOrCommentsChanged(Node $node, string $phpDoc): bo
if ($node->getComments() !== []) {
$commentsContent = implode(PHP_EOL, $node->getComments());

if ($this->removeSpaces($commentsContent) === $this->removeSpaces($phpDoc)) {
if ($this->removeSpacesAndAsterisks($commentsContent) === $this->removeSpacesAndAsterisks($phpDoc)) {
return false;
}
}
Expand Down Expand Up @@ -180,8 +180,8 @@ private function completeSimpleCommentsToPhpDoc(Node $node, string $phpDoc): str
return $startComments . PHP_EOL . $phpDoc;
}

private function removeSpaces(string $content): string
private function removeSpacesAndAsterisks(string $content): string
{
return Strings::replace($content, '#\s+#');
return Strings::replace($content, '#(\s|\*)+#');
}
}