| Conditions | 5 |
| Paths | 5 |
| Total Lines | 23 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 5.0091 |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 20 | 5 | public function process(ContainerBuilder $container) |
|
| 21 | { |
||
| 22 | 5 | foreach ($container->getServiceIds() as $serviceId) { |
|
| 23 | 5 | if (!$container->hasDefinition($serviceId)) { |
|
| 24 | 1 | continue; |
|
| 25 | } |
||
| 26 | |||
| 27 | 4 | $definition = $container->getDefinition($serviceId); |
|
| 28 | |||
| 29 | try { |
||
| 30 | 4 | $reflection = new ReflectionClass($definition->getClass()); |
|
| 31 | 4 | } catch (ReflectionException $e) { |
|
| 32 | 3 | continue; |
|
| 33 | } |
||
| 34 | |||
| 35 | 3 | $filename = $reflection->getFileName(); |
|
| 36 | 3 | if (empty($filename)) { |
|
| 37 | continue; |
||
| 38 | } |
||
| 39 | |||
| 40 | 3 | $definition->setFile($filename); |
|
| 41 | 5 | } |
|
| 42 | 5 | } |
|
| 43 | } |
||
| 44 |