Code Duplication    Length = 11-11 lines in 3 locations

lib/Doctrine/ORM/Cache/DefaultCache.php 3 locations

@@ 93-103 (lines=11) @@
90
    /**
91
     * {@inheritdoc}
92
     */
93
    public function getCollectionCacheRegion($className, $association)
94
    {
95
        $metadata  = $this->em->getClassMetadata($className);
96
        $persister = $this->uow->getCollectionPersister($metadata->getAssociationMapping($association));
97
98
        if ( ! ($persister instanceof CachedPersister)) {
99
            return null;
100
        }
101
102
        return $persister->getCacheRegion();
103
    }
104
105
    /**
106
     * {@inheritdoc}
@@ 138-148 (lines=11) @@
135
    /**
136
     * {@inheritdoc}
137
     */
138
    public function evictEntityRegion($className)
139
    {
140
        $metadata  = $this->em->getClassMetadata($className);
141
        $persister = $this->uow->getEntityPersister($metadata->rootEntityName);
142
143
        if ( ! ($persister instanceof CachedPersister)) {
144
            return;
145
        }
146
147
        $persister->getCacheRegion()->evictAll();
148
    }
149
150
    /**
151
     * {@inheritdoc}
@@ 201-211 (lines=11) @@
198
    /**
199
     * {@inheritdoc}
200
     */
201
    public function evictCollectionRegion($className, $association)
202
    {
203
        $metadata  = $this->em->getClassMetadata($className);
204
        $persister = $this->uow->getCollectionPersister($metadata->getAssociationMapping($association));
205
206
        if ( ! ($persister instanceof CachedPersister)) {
207
            return;
208
        }
209
210
        $persister->getCacheRegion()->evictAll();
211
    }
212
213
    /**
214
     * {@inheritdoc}