Code Duplication    Length = 9-10 lines in 2 locations

src/DecoderManager.php 2 locations

@@ 118-126 (lines=9) @@
115
    /**
116
     * @param DecoderInterface $decoder
117
     */
118
    public function registerJsonDecoder(DecoderInterface $decoder = null)
119
    {
120
        $decoder = $decoder ?: new JsonDecoder();
121
122
        $this->registerDecoder('json', $decoder);
123
        $this->registerDecoder('text/json', $decoder);
124
        $this->registerDecoder('application/json', $decoder);
125
        $this->registerDecoder('+json', $decoder);
126
    }
127
128
    /**
129
     * @param DecoderInterface $decoder
@@ 131-140 (lines=10) @@
128
    /**
129
     * @param DecoderInterface $decoder
130
     */
131
    public function registerYamlDecoder(DecoderInterface $decoder = null)
132
    {
133
        $decoder = $decoder ?: new YamlDecoder();
134
135
        $this->registerDecoder('yml', $decoder);
136
        $this->registerDecoder('yaml', $decoder);
137
        $this->registerDecoder('text/yaml', $decoder);
138
        $this->registerDecoder('application/x-yaml', $decoder);
139
        $this->registerDecoder('+yaml', $decoder);
140
    }
141
}
142