Conditions | 1 |
Paths | 1 |
Total Lines | 22 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
11 | public function create(ContainerBuilder $container, $channel, array $config = []) |
||
|
|||
12 | { |
||
13 | $definition = new Definition(); |
||
14 | $definition->setClass('IrishDan\NotificationBundle\Channel\DirectChannel'); |
||
15 | $definition->setArguments( |
||
16 | [ |
||
17 | '%notification.channel.' . $channel . '.enabled%', |
||
18 | '%notification.channel.' . $channel . '.configuration%', |
||
19 | ] |
||
20 | ); |
||
21 | |||
22 | $adapter = new Reference('notification.adapter.' . $channel); |
||
23 | $eventDispatcher = new Reference('event_dispatcher'); |
||
24 | |||
25 | $definition->setMethodCalls( |
||
26 | [ |
||
27 | ['setAdapter', [$adapter]], |
||
28 | ['setEventDispatcher', [$eventDispatcher]], |
||
29 | ] |
||
30 | ); |
||
31 | $container->setDefinition('notification.channel.' . $channel, $definition); |
||
32 | } |
||
33 | } |
||
34 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.