Code Duplication    Length = 5-5 lines in 2 locations

src/Middleware/FormatNegotiator.php 2 locations

@@ 184-188 (lines=5) @@
181
            return;
182
        }
183
184
        foreach ($this->formats as $format => $data) {
185
            if (in_array($extension, $data[0], true)) {
186
                return $format;
187
            }
188
        }
189
    }
190
191
    /**
@@ 220-224 (lines=5) @@
217
        $mime = $this->negotiateHeader($accept, new Negotiator(), $headers);
218
219
        if ($mime !== null) {
220
            foreach ($this->formats as $format => $data) {
221
                if (in_array($mime, $data[1], true)) {
222
                    return $format;
223
                }
224
            }
225
        }
226
    }
227
}