Code Duplication    Length = 14-14 lines in 2 locations

bridge/doctrine-orm/lib/OrmAgent.php 1 location

@@ 99-112 (lines=14) @@
96
    /**
97
     * {@inheritdoc}
98
     */
99
    public function supports(string $class): bool
100
    {
101
        $metadataFactory = $this->entityManager->getMetadataFactory();
102
103
        $supports = false;
104
        try {
105
            $metadataFactory->getMetadataFor(ClassUtils::getRealClass($class));
106
            $supports = true;
107
        } catch (MappingException $exception) {
108
            // no metadata - class is not known to phpcr-odm
109
        }
110
111
        return $supports;
112
    }
113
114
    /**
115
     * {@inheritdoc}

bridge/doctrine-phpcr-odm/lib/PhpcrOdmAgent.php 1 location

@@ 104-117 (lines=14) @@
101
    /**
102
     * {@inheritdoc}
103
     */
104
    public function supports(string $class): bool
105
    {
106
        $metadataFactory = $this->documentManager->getMetadataFactory();
107
108
        $supports = false;
109
        try {
110
            $metadataFactory->getMetadataFor(ClassUtils::getRealClass($class));
111
            $supports = true;
112
        } catch (MappingException $exception) {
113
            // no metadata - class is not known to phpcr-odm
114
        }
115
116
        return $supports;
117
    }
118
119
    /**
120
     * {@inheritdoc}