Code Duplication    Length = 13-13 lines in 2 locations

src/Serializer/Serializer.php 2 locations

@@ 69-81 (lines=13) @@
66
67
        $countNormalizers = 0;
68
69
        if (\array_key_exists('normalizers', $context)) {
70
            /** @var NormalizerInterface[] $normalizers */
71
            $normalizers = \array_reverse($context['normalizers']);
72
73
            foreach ($normalizers as $normalizer) {
74
                if ($normalizer instanceof NormalizerInterface) {
75
                    $countNormalizers++;
76
77
                    $this->prepareNormalizer($normalizer);
78
                    \array_unshift($this->normalizers, $normalizer);
79
                }
80
            }
81
        }
82
83
        try {
84
            $normalized = parent::normalize($data, $format, $context);
@@ 111-123 (lines=13) @@
108
109
        $countDenormalizers = 0;
110
111
        if (\array_key_exists('normalizers', $context)) {
112
            /** @var NormalizerInterface[] $normalizers */
113
            $normalizers = \array_reverse($context['normalizers']);
114
115
            foreach ($normalizers as $normalizer) {
116
                if ($normalizer instanceof DenormalizerInterface) {
117
                    $countDenormalizers++;
118
119
                    $this->prepareDenormalizer($normalizer);
120
                    \array_unshift($this->normalizers, $normalizer);
121
                }
122
            }
123
        }
124
125
        try {
126
            $denormalized = parent::denormalize($data, $type, $format, $context);