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.
This commit is contained in:
Fabien Potencier 2013-02-17 13:59:26 +01:00
commit 75c61944a3

View File

@ -236,10 +236,12 @@ EOF
$default = (string) $default != '' ? ' '.$default : '';
$comments = count($comments) ? '# '.implode(', ', $comments) : '';
$text = sprintf('%-20s %s %s', $node->getName().':', $default, $comments);
$text = rtrim(sprintf('%-20s %s %s', $node->getName() . ':', $default, $comments), ' ');
if ($info = $node->getInfo()) {
$this->outputLine('');
// indenting multi-line info
$info = str_replace("\n", sprintf("\n%" . $depth * 4 . "s# ", ' '), $info);
$this->outputLine('# '.$info, $depth * 4);
}