Skip to content

Commit 689e9bf

Browse files
committed
[FrameworkBundle] Pretty Ppint json ouput of yaml:lint command
1 parent 4ad343b commit 689e9bf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Command;
1313

14+
if (!defined('JSON_PRETTY_PRINT')) {
15+
define('JSON_PRETTY_PRINT', 128);
16+
}
17+
1418
use Symfony\Component\Console\Command\Command;
1519
use Symfony\Component\Console\Input\InputInterface;
1620
use Symfony\Component\Console\Input\InputOption;
@@ -151,7 +155,7 @@ private function displayJson(OutputInterface $output, $filesInfo)
151155
}
152156
});
153157

154-
$output->writeln(json_encode($filesInfo));
158+
$output->writeln(json_encode($filesInfo, JSON_PRETTY_PRINT));
155159

156160
return min($errors, 1);
157161
}

0 commit comments

Comments
 (0)