Permalink
Browse files

[FrameworkBundle] Pretty Ppint json ouput of yaml:lint command

  • Loading branch information...
lyrixx committed Jan 20, 2014
1 parent 4ad343b commit 689e9bf001d68b6555b3be31596ba7935d78c862
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php
@@ -11,6 +11,10 @@
namespace Symfony\Bundle\FrameworkBundle\Command;
if (!defined('JSON_PRETTY_PRINT')) {
define('JSON_PRETTY_PRINT', 128);
}
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
@@ -151,7 +155,7 @@ private function displayJson(OutputInterface $output, $filesInfo)
}
});
$output->writeln(json_encode($filesInfo));
$output->writeln(json_encode($filesInfo, JSON_PRETTY_PRINT));
return min($errors, 1);
}

0 comments on commit 689e9bf

Please sign in to comment.