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

This commit is contained in:
Grégoire Pineau 2014-01-20 10:15:51 +01:00
parent 4ad343bd0f
commit 689e9bf001

View File

@ -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 @@ EOF
}
});
$output->writeln(json_encode($filesInfo));
$output->writeln(json_encode($filesInfo, JSON_PRETTY_PRINT));
return min($errors, 1);
}