Code Duplication    Length = 6-6 lines in 10 locations

lib/Doctrine/ORM/Mapping/Driver/NewAnnotationDriver.php 5 locations

@@ 87-92 (lines=6) @@
84
        );
85
86
        // Evaluate @Cache annotation
87
        if (isset($classAnnotations[Annotation\Cache::class])) {
88
            $cacheAnnot = $classAnnotations[Annotation\Cache::class];
89
            $cache      = $this->convertCacheAnnotationToCacheMetadata($cacheAnnot, $classMetadata);
90
91
            $classMetadata->setCache($cache);
92
        }
93
94
        // Evaluate annotations on properties/fields
95
        /* @var \ReflectionProperty $reflectionProperty */
@@ 716-721 (lines=6) @@
713
        }
714
715
        // Check for Cache
716
        if (isset($propertyAnnotations[Annotation\Cache::class])) {
717
            $cacheAnnot    = $propertyAnnotations[Annotation\Cache::class];
718
            $cacheMetadata = $this->convertCacheAnnotationToCacheMetadata($cacheAnnot, $classMetadata, $fieldName);
719
720
            $assocMetadata->setCache($cacheMetadata);
721
        }
722
723
        // Check for JoinColumn/JoinColumns annotations
724
        switch (true) {
@@ 795-800 (lines=6) @@
792
        }
793
794
        // Check for Cache
795
        if (isset($propertyAnnotations[Annotation\Cache::class])) {
796
            $cacheAnnot    = $propertyAnnotations[Annotation\Cache::class];
797
            $cacheMetadata = $this->convertCacheAnnotationToCacheMetadata($cacheAnnot, $classMetadata, $fieldName);
798
799
            $assocMetadata->setCache($cacheMetadata);
800
        }
801
802
        // Check for JoinColumn/JoinColumns annotations
803
        switch (true) {
@@ 886-891 (lines=6) @@
883
        }
884
885
        // Check for Cache
886
        if (isset($propertyAnnotations[Annotation\Cache::class])) {
887
            $cacheAnnot    = $propertyAnnotations[Annotation\Cache::class];
888
            $cacheMetadata = $this->convertCacheAnnotationToCacheMetadata($cacheAnnot, $classMetadata, $fieldName);
889
890
            $assocMetadata->setCache($cacheMetadata);
891
        }
892
893
        return $assocMetadata;
894
    }
@@ 963-968 (lines=6) @@
960
        }
961
962
        // Check for Cache
963
        if (isset($propertyAnnotations[Annotation\Cache::class])) {
964
            $cacheAnnot    = $propertyAnnotations[Annotation\Cache::class];
965
            $cacheMetadata = $this->convertCacheAnnotationToCacheMetadata($cacheAnnot, $classMetadata, $fieldName);
966
967
            $assocMetadata->setCache($cacheMetadata);
968
        }
969
970
        return $assocMetadata;
971
    }

lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php 5 locations

@@ 279-284 (lines=6) @@
276
        }
277
278
        // Evaluate @Cache annotation
279
        if (isset($classAnnotations[Annotation\Cache::class])) {
280
            $cacheAnnot = $classAnnotations[Annotation\Cache::class];
281
            $cache      = $this->convertCacheAnnotationToCacheMetadata($cacheAnnot, $metadata);
282
283
            $classMetadata->setCache($cache);
284
        }
285
286
        // Evaluate NamedNativeQueries annotation
287
        if (isset($classAnnotations[Annotation\NamedNativeQueries::class])) {
@@ 826-831 (lines=6) @@
823
        }
824
825
        // Check for Cache
826
        if (isset($propertyAnnotations[Annotation\Cache::class])) {
827
            $cacheAnnot    = $propertyAnnotations[Annotation\Cache::class];
828
            $cacheMetadata = $this->convertCacheAnnotationToCacheMetadata($cacheAnnot, $metadata, $fieldName);
829
830
            $assocMetadata->setCache($cacheMetadata);
831
        }
832
833
        // Check for JoinColumn/JoinColumns annotations
834
        switch (true) {
@@ 885-890 (lines=6) @@
882
        }
883
884
        // Check for Cache
885
        if (isset($propertyAnnotations[Annotation\Cache::class])) {
886
            $cacheAnnot    = $propertyAnnotations[Annotation\Cache::class];
887
            $cacheMetadata = $this->convertCacheAnnotationToCacheMetadata($cacheAnnot, $metadata, $fieldName);
888
889
            $assocMetadata->setCache($cacheMetadata);
890
        }
891
892
        // Check for JoinColumn/JoinColumns annotations
893
        switch (true) {
@@ 956-961 (lines=6) @@
953
        }
954
955
        // Check for Cache
956
        if (isset($propertyAnnotations[Annotation\Cache::class])) {
957
            $cacheAnnot    = $propertyAnnotations[Annotation\Cache::class];
958
            $cacheMetadata = $this->convertCacheAnnotationToCacheMetadata($cacheAnnot, $metadata, $fieldName);
959
960
            $assocMetadata->setCache($cacheMetadata);
961
        }
962
963
        return $assocMetadata;
964
    }
@@ 1016-1021 (lines=6) @@
1013
        }
1014
1015
        // Check for Cache
1016
        if (isset($propertyAnnotations[Annotation\Cache::class])) {
1017
            $cacheAnnot    = $propertyAnnotations[Annotation\Cache::class];
1018
            $cacheMetadata = $this->convertCacheAnnotationToCacheMetadata($cacheAnnot, $metadata, $fieldName);
1019
1020
            $assocMetadata->setCache($cacheMetadata);
1021
        }
1022
1023
        return $assocMetadata;
1024
    }