Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4.1755 |
Changes | 4 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
20 | 2 | public function process(ContainerBuilder $container) |
|
21 | { |
||
22 | 2 | foreach ($container->getDefinitions() as $serviceId => $definition) { |
|
23 | try { |
||
24 | 2 | $reflection = new ReflectionClass($definition->getClass()); |
|
25 | } catch (ReflectionException $e) { |
||
26 | continue; |
||
27 | } |
||
28 | |||
29 | 2 | $filename = $reflection->getFileName(); |
|
30 | 2 | if (!empty($filename)) { |
|
31 | 2 | $definition->setFile($filename); |
|
32 | } |
||
33 | } |
||
34 | 2 | } |
|
35 | } |
||
36 |