Code Duplication    Length = 17-17 lines in 2 locations

src/SourceLocator/Type/Composer/Psr/Psr0Mapping.php 1 location

@@ 28-44 (lines=17) @@
25
    }
26
27
    /** @param array<string, array<int, string>> $mappings */
28
    public static function fromArrayMappings(array $mappings) : self
29
    {
30
        self::assertValidMapping($mappings);
31
32
        $instance = new self();
33
34
        $instance->mappings = array_map(
35
            static function (array $directories) : array {
36
                return array_map(static function (string $directory) : string {
37
                    return rtrim($directory, '/');
38
                }, $directories);
39
            },
40
            $mappings
41
        );
42
43
        return $instance;
44
    }
45
46
    /** {@inheritDoc} */
47
    public function resolvePossibleFilePaths(Identifier $identifier) : array

src/SourceLocator/Type/Composer/Psr/Psr4Mapping.php 1 location

@@ 34-50 (lines=17) @@
31
    }
32
33
    /** @param array<string, array<int, string>> $mappings */
34
    public static function fromArrayMappings(array $mappings) : self
35
    {
36
        self::assertValidMapping($mappings);
37
38
        $instance = new self();
39
40
        $instance->mappings = array_map(
41
            static function (array $directories) : array {
42
                return array_map(static function (string $directory) : string {
43
                    return rtrim($directory, '/');
44
                }, $directories);
45
            },
46
            $mappings
47
        );
48
49
        return $instance;
50
    }
51
52
    /** {@inheritDoc} */
53
    public function resolvePossibleFilePaths(Identifier $identifier) : array