Code Duplication    Length = 15-15 lines in 2 locations

DependencyInjection/Compiler/DoctrineMappingsCompilerPass.php 2 locations

@@ 59-73 (lines=15) @@
56
     *
57
     * @return CompilerPassInterface
58
     */
59
    protected function getORMCompilerPass(array $config)
60
    {
61
        $nameSpace = 'Gesdinet\JWTRefreshTokenBundle\Entity';
62
        $mappings = array(
63
            realpath(dirname(__DIR__, 2).'/Resources/config/orm/doctrine-orm') => $nameSpace,
64
        );
65
66
        if (isset($config['refresh_token_class']) || isset($config['refresh_token_entity'])) {
67
            $mappings[realpath(dirname(__DIR__, 2).'/Resources/config/orm/doctrine-superclass')] = $nameSpace;
68
        } else {
69
            $mappings[realpath(dirname(__DIR__, 2).'/Resources/config/orm/doctrine-entity')] = $nameSpace;
70
        }
71
72
        return DoctrineOrmMappingsPass::createYamlMappingDriver($mappings);
73
    }
74
75
    /**
76
     * @param array $config
@@ 80-94 (lines=15) @@
77
     *
78
     * @return CompilerPassInterface
79
     */
80
    protected function getODMCompilerPass(array $config)
81
    {
82
        $nameSpace = 'Gesdinet\JWTRefreshTokenBundle\Document';
83
        $mappings = array(
84
            realpath(dirname(__DIR__, 2).'/Resources/config/mongodb/doctrine-mongodb') => $nameSpace,
85
        );
86
87
        if (isset($config['refresh_token_class']) || isset($config['refresh_token_entity'])) {
88
            $mappings[realpath(dirname(__DIR__, 2).'/Resources/config/mongodb/doctrine-superclass')] = $nameSpace;
89
        } else {
90
            $mappings[realpath(dirname(__DIR__, 2).'/Resources/config/mongodb/doctrine-document')] = $nameSpace;
91
        }
92
93
        return DoctrineMongoDBMappingsPass::createYamlMappingDriver($mappings, array());
94
    }
95
}
96