diff options
Diffstat (limited to 'app/class/Flywheel')
-rw-r--r-- | app/class/Flywheel/Formatter/JSON.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/class/Flywheel/Formatter/JSON.php b/app/class/Flywheel/Formatter/JSON.php index 108c756..8ed8a66 100644 --- a/app/class/Flywheel/Formatter/JSON.php +++ b/app/class/Flywheel/Formatter/JSON.php @@ -2,12 +2,19 @@ namespace Wcms\Flywheel\Formatter; +use JsonException; + class JSON implements \JamesMoss\Flywheel\Formatter\FormatInterface { public function getFileExtension() { return 'json'; } + + /** + * @throws JsonException if json_encode fails in PHP7.3 + * @phpstan-ignore-next-line + */ public function encode(array $data) { $options = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE : null; |