Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 298-305 (lines=8) @@
295
     *
296
     * @return \Doctrine\ORM\Cache\EntityCacheKey
297
     */
298
    private function buildEntityCacheKey(ClassMetadata $metadata, $identifier)
299
    {
300
        if ( ! is_array($identifier)) {
301
            $identifier = $this->toIdentifierArray($metadata, $identifier);
302
        }
303
304
        return new EntityCacheKey($metadata->rootEntityName, $identifier);
305
    }
306
307
    /**
308
     * @param \Doctrine\ORM\Mapping\ClassMetadata $metadata        The entity metadata.
@@ 314-321 (lines=8) @@
311
     *
312
     * @return \Doctrine\ORM\Cache\CollectionCacheKey
313
     */
314
    private function buildCollectionCacheKey(ClassMetadata $metadata, $association, $ownerIdentifier)
315
    {
316
        if ( ! is_array($ownerIdentifier)) {
317
            $ownerIdentifier = $this->toIdentifierArray($metadata, $ownerIdentifier);
318
        }
319
320
        return new CollectionCacheKey($metadata->rootEntityName, $association, $ownerIdentifier);
321
    }
322
323
    /**
324
     * @param \Doctrine\ORM\Mapping\ClassMetadata $metadata   The entity metadata.