Upgrade some PrettyPrinter methods to protected

I noticed some methods in the Standard PrettyPrinter is private, can they be upgraded to `protected` to ease when extending it?
This commit is contained in:
Anders Jürisoo 2020-10-10 17:41:52 +02:00 committed by Nikita Popov
parent d520bc9e1d
commit 1d1bc8a364

View File

@ -1040,7 +1040,7 @@ class Standard extends PrettyPrinterAbstract
* @param Node[] $nodes
* @return bool
*/
private function hasNodeWithComments(array $nodes) {
protected function hasNodeWithComments(array $nodes) {
foreach ($nodes as $node) {
if ($node && $node->getComments()) {
return true;
@ -1049,7 +1049,7 @@ class Standard extends PrettyPrinterAbstract
return false;
}
private function pMaybeMultiline(array $nodes, bool $trailingComma = false) {
protected function pMaybeMultiline(array $nodes, bool $trailingComma = false) {
if (!$this->hasNodeWithComments($nodes)) {
return $this->pCommaSeparated($nodes);
} else {
@ -1057,7 +1057,7 @@ class Standard extends PrettyPrinterAbstract
}
}
private function pAttrGroups(array $nodes, bool $inline = false): string {
protected function pAttrGroups(array $nodes, bool $inline = false): string {
$result = '';
$sep = $inline ? ' ' : $this->nl;
foreach ($nodes as $node) {