GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 24-24 lines in 2 locations

src/Reader/MapperFactory.php 2 locations

@@ 55-78 (lines=24) @@
52
     *
53
     * @return ExifMapper
54
     */
55
    private static function getExifMapper()
56
    {
57
        $exifMapper = new ExifMapper();
58
59
        // find all classes
60
        $reflClass = new \ReflectionClass(self::class);
61
        $namespace = $reflClass->getNamespaceName();
62
        $namespace .= '\\Mapper\\Exif';
63
64
        $path = realpath(__DIR__ . '/Mapper/Exif');
65
66
        foreach (glob($path . '/*Mapper.php') as $classPath) {
67
            $className = str_replace('.php', '', array_reverse(
68
                explode(DIRECTORY_SEPARATOR, $classPath)
69
            )[0]);
70
            $fqcn = $namespace . '\\' . $className;
71
72
            $fieldMapper = new $fqcn();
73
74
            $exifMapper->registerFieldMapper($fieldMapper);
75
        }
76
77
        return $exifMapper;
78
    }
79
80
    /**
81
     * Returns the mapper for Iptc data
@@ 85-108 (lines=24) @@
82
     *
83
     * @return IptcMapper
84
     */
85
    private static function getIptcMapper()
86
    {
87
        $iptcMapper = new IptcMapper();
88
89
        // find all classes
90
        $reflClass = new \ReflectionClass(self::class);
91
        $namespace = $reflClass->getNamespaceName();
92
        $namespace .= '\\Mapper\\Iptc';
93
94
        $path = realpath(__DIR__ . '/Mapper/Iptc');
95
96
        foreach (glob($path . '/*Mapper.php') as $classPath) {
97
            $className = str_replace('.php', '', array_reverse(
98
                explode(DIRECTORY_SEPARATOR, $classPath)
99
            )[0]);
100
            $fqcn = $namespace . '\\' . $className;
101
102
            $fieldMapper = new $fqcn();
103
104
            $iptcMapper->registerFieldMapper($fieldMapper);
105
        }
106
107
        return $iptcMapper;
108
    }
109
}
110