Code Duplication    Length = 14-14 lines in 2 locations

src/Type.php 2 locations

@@ 376-389 (lines=14) @@
373
     *
374
     * @return string[]
375
     */
376
    public function getAliases($strict = true)
377
    {
378
        $types = $this->buildTypesList($strict);
379
380
        // Build the array of aliases.
381
        $aliases = [];
382
        foreach ($types as $t) {
383
            foreach ($map->getTypeAliases($t) as $a) {
384
                $aliases[$a] = $a;
385
            }
386
        }
387
388
        return array_keys($aliases);
389
    }
390
391
    /**
392
     * Returns the MIME type's preferred file extension.
@@ 440-453 (lines=14) @@
437
     *
438
     * @return string[]
439
     */
440
    public function getExtensions($strict = true)
441
    {
442
        $types = $this->buildTypesList($strict);
443
444
        // Build the array of extensions.
445
        $extensions = [];
446
        foreach ($types as $t) {
447
            foreach ($map->getTypeExtensions($t) as $e) {
448
                $extensions[$e] = $e;
449
            }
450
        }
451
452
        return array_keys($extensions);
453
    }
454
}
455