Code Duplication    Length = 8-8 lines in 4 locations

src/Normalizer/Relation/EmbedManyFieldNormalizer.php 1 location

@@ 64-71 (lines=8) @@
61
        return $values;
62
    }
63
64
    private function resolveProxy($relatedObject)
65
    {
66
        if (null !== $relatedObject && interface_exists('Doctrine\Common\Persistence\Proxy')
67
            && $relatedObject instanceof Proxy && !$relatedObject->__isInitialized()
68
        ) {
69
            $relatedObject->__load();
70
        }
71
    }
72
}
73

src/Normalizer/Relation/EmbedOneFieldNormalizer.php 1 location

@@ 58-65 (lines=8) @@
55
        return $normalizer->normalize($relatedObject, $context, $path);
56
    }
57
58
    private function resolveProxy($relatedObject)
59
    {
60
        if (null !== $relatedObject && interface_exists('Doctrine\Common\Persistence\Proxy')
61
            && $relatedObject instanceof Proxy && !$relatedObject->__isInitialized()
62
        ) {
63
            $relatedObject->__load();
64
        }
65
    }
66
}
67

src/Normalizer/Relation/ReferenceManyFieldNormalizer.php 1 location

@@ 66-73 (lines=8) @@
63
        return $values;
64
    }
65
66
    private function resolveProxy($relatedObject)
67
    {
68
        if (null !== $relatedObject && interface_exists('Doctrine\Common\Persistence\Proxy')
69
            && $relatedObject instanceof Proxy && !$relatedObject->__isInitialized()
70
        ) {
71
            $relatedObject->__load();
72
        }
73
    }
74
}
75

src/Normalizer/Relation/ReferenceOneFieldNormalizer.php 1 location

@@ 61-68 (lines=8) @@
58
        return $this->identifierAccessor->getValue($relatedObject);
59
    }
60
61
    private function resolveProxy($relatedObject)
62
    {
63
        if (null !== $relatedObject && interface_exists('Doctrine\Common\Persistence\Proxy')
64
            && $relatedObject instanceof Proxy && !$relatedObject->__isInitialized()
65
        ) {
66
            $relatedObject->__load();
67
        }
68
    }
69
}
70