Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 75c6194

Browse files
committed
merged branch 1ed/ref-dumper-tweak-2.1 (PR #7097)
This PR was merged into the 2.1 branch. Commits ------- 18b139d [FrameworkBundle] tweaked reference dumper command (see #7093) Discussion ---------- [FrameworkBundle] tweaked reference dumper command (see #7093) The same as #7093 just for 2.1.
2 parents 98d5750 + 18b139d commit 75c6194

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,12 @@ private function outputNode(NodeInterface $node, $depth = 0)
236236
$default = (string) $default != '' ? ' '.$default : '';
237237
$comments = count($comments) ? '# '.implode(', ', $comments) : '';
238238

239-
$text = sprintf('%-20s %s %s', $node->getName().':', $default, $comments);
239+
$text = rtrim(sprintf('%-20s %s %s', $node->getName() . ':', $default, $comments), ' ');
240240

241241
if ($info = $node->getInfo()) {
242242
$this->outputLine('');
243+
// indenting multi-line info
244+
$info = str_replace("\n", sprintf("\n%" . $depth * 4 . "s# ", ' '), $info);
243245
$this->outputLine('# '.$info, $depth * 4);
244246
}
245247

0 commit comments

Comments
 (0)