Code Duplication    Length = 7-7 lines in 2 locations

src/GuzzleAdapter.php 2 locations

@@ 283-289 (lines=7) @@
280
     * @return string
281
     */
282
    protected function getMimetypeFromResponse($path, ResponseInterface $response) {
283
        if ($response->hasHeader('Content-Type')) {
284
285
            $mimetype = reset($response->getHeader('Content-Type'));
286
            list($mimetype) = explode(';', $mimetype, 2);
287
288
            return trim($mimetype);
289
        }
290
291
        // Try to guess from file extension.
292
        $uri = new Uri($path);
@@ 318-324 (lines=7) @@
315
            }
316
        }
317
318
        if ($response->hasHeader('Content-Length')) {
319
            $length = reset($response->getHeader('Content-Length'));
320
321
            if (is_numeric($length)) {
322
                $metadata['size'] = (int) $length;
323
            }
324
        }
325
326
        return $metadata;
327
    }