Code Duplication    Length = 15-17 lines in 2 locations

src/PH/Bundle/WebhookBundle/DependencyInjection/PHWebhookExtension.php 1 location

@@ 12-26 (lines=15) @@
9
use Symfony\Component\DependencyInjection\ContainerBuilder;
10
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
11
12
final class PHWebhookExtension extends AbstractResourceExtension
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17
    public function load(array $config, ContainerBuilder $container)
18
    {
19
        $config = $this->processConfiguration($this->getConfiguration([], $container), $config);
20
        $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
21
22
        $this->registerResources('ph', $config['driver'], $config['resources'], $container);
23
24
        $loader->load('forms.yml');
25
    }
26
}
27

src/PH/Bundle/CoreBundle/DependencyInjection/PHCoreExtension.php 1 location

@@ 17-33 (lines=17) @@
14
 *
15
 * @see http://symfony.com/doc/current/cookbook/bundles/extension.html
16
 */
17
final class PHCoreExtension extends AbstractResourceExtension
18
{
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function load(array $configs, ContainerBuilder $container)
23
    {
24
        $configuration = new Configuration();
25
        $config = $this->processConfiguration($configuration, $configs);
26
27
        $this->registerResources('ph', $config['driver'], [], $container);
28
29
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
30
        $loader->load('services.yml');
31
        $loader->load('listeners.yml');
32
    }
33
}
34