JsonReporter.php 324 B

123456789101112131415161718
  1. <?php
  2. namespace Fgm\ComposerCheck;
  3. /**
  4. * Class YamlReporter formats a requirements set as YAML.
  5. */
  6. class JsonReporter extends ReporterBase {
  7. /**
  8. * {@inheritdoc}
  9. */
  10. public function report(MergeBox $mergeBox) : string {
  11. $json = json_encode($mergeBox->getRows(), JSON_PRETTY_PRINT);
  12. return $json;
  13. }
  14. }