| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3.072 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | 12 | public function process(ContainerBuilder $container) |
|
| 25 | { |
||
| 26 | 12 | if (!$container->hasDefinition('fos_elastica.paginator.subscriber')) { |
|
| 27 | return; |
||
| 28 | } |
||
| 29 | |||
| 30 | 12 | $definition = $container->getDefinition('fos_elastica.paginator.subscriber'); |
|
| 31 | 12 | if ($container->hasDefinition('request_stack')) { |
|
| 32 | 12 | $arguments = array(new Reference('request_stack', ContainerInterface::NULL_ON_INVALID_REFERENCE, false)); |
|
| 33 | 12 | } else { |
|
| 34 | $arguments = array(new Reference('request', ContainerInterface::NULL_ON_INVALID_REFERENCE, false)); |
||
| 35 | } |
||
| 36 | |||
| 37 | 12 | $definition->addMethodCall('setRequest', $arguments); |
|
| 38 | 12 | } |
|
| 39 | } |
||
| 40 |