Code Duplication    Length = 11-11 lines in 2 locations

src/Plugin/DecoderPlugin.php 1 location

@@ 38-48 (lines=11) @@
35
     *    @var bool $use_content_encoding Whether this plugin should look at the Content-Encoding header first or only at the Transfer-Encoding (defaults to true).
36
     * }
37
     */
38
    public function __construct(array $config = [])
39
    {
40
        $resolver = new OptionsResolver();
41
        $resolver->setDefaults([
42
            'use_content_encoding' => true,
43
        ]);
44
        $resolver->setAllowedTypes('use_content_encoding', 'bool');
45
        $options = $resolver->resolve($config);
46
47
        $this->useContentEncoding = $options['use_content_encoding'];
48
    }
49
50
    /**
51
     * {@inheritdoc}

src/Plugin/RetryPlugin.php 1 location

@@ 42-52 (lines=11) @@
39
     *     @var int $retries Number of retries to attempt if an exception occurs before letting the exception bubble up.
40
     * }
41
     */
42
    public function __construct(array $config = [])
43
    {
44
        $resolver = new OptionsResolver();
45
        $resolver->setDefaults([
46
            'retries' => 1,
47
        ]);
48
        $resolver->setAllowedTypes('retries', 'int');
49
        $options = $resolver->resolve($config);
50
51
        $this->retry = $options['retries'];
52
    }
53
54
    /**
55
     * {@inheritdoc}