Skip to content

Commit

Permalink
Deprecated PhpDocInfo::markAsChanged() to ensure doc block is changed…
Browse files Browse the repository at this point in the history
… directly in the Rector rule (#4987)
  • Loading branch information
TomasVotruba committed Sep 11, 2023
1 parent 8b8a0d1 commit 780ef40
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
3 changes: 1 addition & 2 deletions packages/BetterPhpDocParser/PhpDocInfo/PhpDocInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ public function addPhpDocTagNode(PhpDocChildNode $phpDocChildNode): void
$this->phpDocNode->children[] = $phpDocChildNode;
// to give node more space
$this->makeMultiLined();

$this->markAsChanged();
}

public function getPhpDocNode(): PhpDocNode
Expand Down Expand Up @@ -373,6 +371,7 @@ public function getTemplateTagValueNodes(): array
}

/**
* @deprecated Change doc block and print directly in the node instead
* @internal
* Should be handled by attributes of phpdoc node - if stard_and_end is missing in one of nodes, it has been changed
* Similar to missing original node in php-aprser
Expand Down
10 changes: 0 additions & 10 deletions src/PhpParser/Printer/BetterStandardPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,16 +360,6 @@ protected function pScalar_String(String_ $string): string
return parent::pScalar_String($string);
}

/**
* @param Node[] $nodes
*/
protected function pStmts(array $nodes, bool $indent = true): string
{
$this->moveCommentsFromAttributeObjectToCommentsAttribute($nodes);

return parent::pStmts($nodes, $indent);
}

/**
* "...$params) : ReturnType"
* ↓
Expand Down

0 comments on commit 780ef40

Please sign in to comment.