Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | 5 | public function __invoke(ContainerInterface $container, string $requestedName, array $options = null): JsonFormatter |
|
29 | { |
||
30 | 5 | $options = $options ?? $this->getServiceOptions($container, $requestedName); |
|
31 | |||
32 | 5 | $formatter = new JsonFormatter( |
|
33 | 5 | $options['batch_mode'] ?? JsonFormatter::BATCH_MODE_JSON, |
|
34 | 5 | $options['append_new_line'] ?? true, |
|
35 | 5 | $options['ignore_empty_context_and_extra'] ?? false, |
|
36 | 5 | $options['include_stack_traces'] ?? false, |
|
37 | ); |
||
38 | |||
39 | 5 | $this->configureNormalizerFormatter($formatter, $options); |
|
40 | |||
41 | 5 | return $formatter; |
|
42 | } |
||
44 |