Conditions | 5 |
Paths | 8 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 0 |
1 | <?php |
||
27 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
||
28 | { |
||
29 | $log = isset($options['log']) ? $options['log'] : null; |
||
30 | |||
31 | if ($log && $container->has($log)) { |
||
32 | $log = $container->get($log); |
||
33 | } |
||
34 | |||
35 | if (!$log instanceOf LoggerInterface) { |
||
36 | $log = null; |
||
37 | } |
||
38 | |||
39 | $service = new LogStrategy($log); |
||
40 | |||
41 | return $service; |
||
42 | } |
||
44 |