Skip to content

Commit

Permalink
[FrameworkBundle] Pretty Ppint json ouput of yaml:lint command
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Jan 20, 2014
1 parent 4ad343b commit 689e9bf
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 689e9bf

Please sign in to comment.