Code Duplication    Length = 11-11 lines in 2 locations

src/Plugin/DecoderPlugin.php 1 location

@@ 39-49 (lines=11) @@
36
     *    @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).
37
     * }
38
     */
39
    public function __construct(array $config = [])
40
    {
41
        $resolver = new OptionsResolver();
42
        $resolver->setDefaults([
43
            'use_content_encoding' => true,
44
        ]);
45
        $resolver->setAllowedTypes('use_content_encoding', 'bool');
46
        $options = $resolver->resolve($config);
47
48
        $this->useContentEncoding = $options['use_content_encoding'];
49
    }
50
51
    /**
52
     * {@inheritdoc}

src/Plugin/ErrorPlugin.php 1 location

@@ 45-55 (lines=11) @@
42
     *    @var bool only_server_exception Whether this plugin should only throw 5XX Exceptions (default to false).
43
     * }
44
     */
45
    public function __construct(array $config = [])
46
    {
47
        $resolver = new OptionsResolver();
48
        $resolver->setDefaults([
49
            'only_server_exception' => false,
50
        ]);
51
        $resolver->setAllowedTypes('only_server_exception', 'bool');
52
        $options = $resolver->resolve($config);
53
54
        $this->onlyServerException = $options['only_server_exception'];
55
    }
56
57
    /**
58
     * {@inheritdoc}