Code Duplication    Length = 11-11 lines in 2 locations

src/Plugin/DecoderPlugin.php 1 location

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

src/Plugin/ErrorPlugin.php 1 location

@@ 34-44 (lines=11) @@
31
     *    @var bool only_server_exception Whether this plugin should only throw 5XX Exceptions (default to false).
32
     * }
33
     */
34
    public function __construct(array $config = [])
35
    {
36
        $resolver = new OptionsResolver();
37
        $resolver->setDefaults([
38
            'only_server_exception' => false,
39
        ]);
40
        $resolver->setAllowedTypes('only_server_exception', 'bool');
41
        $options = $resolver->resolve($config);
42
43
        $this->onlyServerException = $options['only_server_exception'];
44
    }
45
46
    /**
47
     * {@inheritdoc}