10000 [Printer] Remove kind short array check on BetterStandardPrinter::pEx… · rectorphp/rector-src@8a158c4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8a158c4

Browse files
authored
[Printer] Remove kind short array check on BetterStandardPrinter::pExpr_Array() (#6948)
1 parent b5e2b49 commit 8a158c4

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/PhpParser/Printer/BetterStandardPrinter.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -314,15 +314,10 @@ protected function pExpr_Yield(Yield_ $yield, int $precedence, int $lhsPrecedenc
314314
}
315315

316316
/**
317-
* Print arrays in short [] by default,
318-
* to prevent manual explicit array shortening.
317+
* Print new lined array items when newlined_array_print is set to true
319318
*/
320319
protected function pExpr_Array(Array_ $array): string
321320
{
322-
if (! $array->hasAttribute(AttributeKey::KIND)) {
323-
$array->setAttribute(AttributeKey::KIND, Array_::KIND_SHORT);
324-
}
325-
326321
if ($array->getAttribute(AttributeKey::NEWLINED_ARRAY_PRINT) === true) {
327322
$printedArray = '[';
328323
$printedArray .= $this->pCommaSeparatedMultiline($array->items, true);

0 commit comments

Comments
 (0)
0