Code Duplication    Length = 8-14 lines in 2 locations

DependencyInjection/NotificationExtension.php 2 locations

@@ 122-129 (lines=8) @@
119
        $container->setDefinition('notification.channel_subscriber', $definition);
120
    }
121
122
    private function createChannel(ContainerBuilder $container, string $id, $adapter = null)
123
    {
124
        $definition = new Definition();
125
        $definition->setClass('IrishDan\NotificationBundle\Channel\Channel');
126
        $definition->addMethodCall('setEventDispatcher', [new Reference('event_dispatcher')]);
127
128
        $container->setDefinition($id, $definition);
129
    }
130
131
    private function createChannelService($channel, ContainerBuilder $container, array $config)
132
    {
@@ 144-157 (lines=14) @@
141
        $broadcastFactory->create($container, $name, $config);
142
    }
143
144
    private function createNotificationManagerService(ContainerBuilder $container)
145
    {
146
        $definition = new Definition();
147
        $definition->setClass('IrishDan\NotificationBundle\NotificationManager');
148
        $definition->setArguments(
149
            [
150
                new Reference('notification.channel_manager'),
151
                new Reference('notification.database_notification_manager'),
152
            ]
153
        );
154
        $definition->setPublic(true);
155
156
        $container->setDefinition('notification.manager', $definition);
157
    }
158
159
    private function createChannelManagerService(array $enabledChannels, ContainerBuilder $container)
160
    {