Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | protected function defaultFormatters() |
||
24 | { |
||
25 | $formatters = parent::defaultFormatters(); |
||
26 | |||
27 | foreach ([self::FORMAT_JSON25519, self::FORMAT_NCRYPTF_JSON] as $format) { |
||
28 | $formatters[$format] = [ |
||
29 | 'class' => \yrc\web\ncryptf\JsonResponseFormatter::class, |
||
30 | 'prettyPrint' => YII_DEBUG, |
||
31 | 'encodeOptions' => JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION, |
||
32 | ]; |
||
33 | } |
||
34 | |||
35 | $formatters[self::FORMAT_JSON] = [ |
||
36 | 'class' => \yrc\web\JsonResponseFormatter::class, |
||
37 | 'prettyPrint' => YII_DEBUG, |
||
38 | 'encodeOptions' => JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION, |
||
39 | ]; |
||
40 | |||
41 | return $formatters; |
||
42 | } |
||
44 |