Skip to content

Commit

Permalink
Tweak coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Sep 12, 2021
1 parent 632ead3 commit b5234ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/PhpParser/PrettyPrinterAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -826,8 +826,8 @@ protected function pArray(

// We go multiline if the original code was multiline,
// or if it's an array item with a comment above it.
if ($insertStr === ', ' && (
$this->isMultiline($origNodes) || !empty($arrItem->getAttribute('comments')))
if ($insertStr === ', ' &&
($this->isMultiline($origNodes) || $arrItem->getComments())
) {
$insertStr = ',';
$insertNewline = true;
Expand Down

0 comments on commit b5234ea

Please sign in to comment.