Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.0261 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | 3 | public function process(ContainerBuilder $container) |
|
27 | { |
||
28 | 3 | if (!$container->hasDefinition($this->service)) { |
|
29 | return; |
||
30 | } |
||
31 | |||
32 | 3 | if (!$normalizers = $this->findAndSortTaggedServices($this->loaderTag, $container)) { |
|
33 | 1 | throw new RuntimeException(sprintf('You must tag at least one service as "%s" to use the "%s" service.', $this->loaderTag, $this->service)); |
|
34 | } |
||
35 | |||
36 | 2 | $serializerDefinition = $container->getDefinition($this->service); |
|
37 | 2 | $serializerDefinition->replaceArgument(0, $normalizers); |
|
38 | } |
||
40 |