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