Code Duplication    Length = 15-15 lines in 2 locations

DependencyInjection/JWKSource/JWK.php 1 location

@@ 24-38 (lines=15) @@
21
    /**
22
     * {@inheritdoc}
23
     */
24
    public function create(ContainerBuilder $container, $id, array $config)
25
    {
26
        $service_id = sprintf('jose.key.%s', $id);
27
28
        $definition = new Definition('Jose\Object\JWK');
29
        $definition->setFactory([
30
            new Reference('jose.factory.jwk'),
31
            'createFromValues',
32
        ]);
33
        $definition->setArguments([
34
            json_decode($config['value'], true),
35
        ]);
36
37
        $container->setDefinition($service_id, $definition);
38
    }
39
40
    /**
41
     * {@inheritdoc}

DependencyInjection/JWKSource/Values.php 1 location

@@ 24-38 (lines=15) @@
21
    /**
22
     * {@inheritdoc}
23
     */
24
    public function create(ContainerBuilder $container, $id, array $config)
25
    {
26
        $service_id = sprintf('jose.key.%s', $id);
27
28
        $definition = new Definition('Jose\Object\JWK');
29
        $definition->setFactory([
30
            new Reference('jose.factory.jwk'),
31
            'createFromValues',
32
        ]);
33
        $definition->setArguments([
34
            $config['values'],
35
        ]);
36
37
        $container->setDefinition($service_id, $definition);
38
    }
39
40
    /**
41
     * {@inheritdoc}