Code Duplication    Length = 8-10 lines in 2 locations

src/Mapping/MappingFactory.php 2 locations

@@ 139-148 (lines=10) @@
136
     *
137
     * @return mixed
138
     */
139
    protected static function getSelfUrl(array &$mappedClass)
140
    {
141
        if (empty($mappedClass[static::URLS_KEY][static::SELF_KEY])) {
142
            throw new MappingException(
143
                'Could not find "self" property under "urls". This is required in order to make the resource to be reachable.'
144
            );
145
        }
146
147
        return $mappedClass[static::URLS_KEY][static::SELF_KEY];
148
    }
149
150
    /**
151
     * @param array $mappedClass
@@ 295-302 (lines=8) @@
292
     *
293
     * @return mixed
294
     */
295
    protected static function getOtherUrls(array $mappedClass)
296
    {
297
        if (!empty($mappedClass[static::URLS_KEY][static::SELF_KEY])) {
298
            unset($mappedClass[static::URLS_KEY][static::SELF_KEY]);
299
        }
300
301
        return $mappedClass[static::URLS_KEY];
302
    }
303
}
304