Skip to content

Commit

Permalink
Removed unsafe json_encode() call
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Jan 27, 2025
1 parent 473e31d commit ee0096e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Formatter/JsonFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Roave\BackwardCompatibility\Git\CheckedOutRepository;
use Symfony\Component\Console\Output\OutputInterface;

use function json_encode;
use function Psl\Json\encode;

/** @internal */
final class JsonFormatter implements OutputFormatter
Expand All @@ -34,6 +34,6 @@ public function write(Changes $changes): void
];
}

$this->output->writeln(json_encode(['errors' => $result]));
$this->output->writeln(encode(['errors' => $result]));
}
}

0 comments on commit ee0096e

Please sign in to comment.