Code Duplication    Length = 9-10 lines in 2 locations

Document/Subscriber/RoutableSubscriber.php 1 location

@@ 427-436 (lines=10) @@
424
     *
425
     * @return string
426
     */
427
    private function getRoutePathPropertyName($structureType, $locale)
428
    {
429
        $metadata = $this->metadataFactory->getStructureMetadata('article', $structureType);
430
431
        if ($metadata->hasTag(self::TAG_NAME)) {
432
            return $this->getPropertyName($locale, $metadata->getPropertyByTagName(self::TAG_NAME)->getName());
433
        }
434
435
        return $this->getPropertyName($locale, self::ROUTE_FIELD);
436
    }
437
438
    /**
439
     * Returns encoded property-name.

Document/Subscriber/PageTreeRouteSubscriber.php 1 location

@@ 230-238 (lines=9) @@
227
     *
228
     * @return PropertyMetadata
229
     */
230
    private function getRoutePathPropertyNameByStructureType($structureType)
231
    {
232
        $metadata = $this->metadataFactory->getStructureMetadata('article', $structureType);
233
        if ($metadata->hasTag(self::TAG_NAME)) {
234
            return $metadata->getPropertyByTagName(self::TAG_NAME);
235
        }
236
237
        return $metadata->getProperty(self::ROUTE_PROPERTY);
238
    }
239
240
    /**
241
     * Returns "routePath" property.