diff --git a/Serializer/ItemNormalizer.php b/Serializer/ItemNormalizer.php index e68bda8..c928d56 100644 --- a/Serializer/ItemNormalizer.php +++ b/Serializer/ItemNormalizer.php @@ -256,7 +256,7 @@ protected function normalizeRelation(ApiProperty $propertyMetadata, ?object $rel if (null === $relatedObject || isset($context['api_included'])) { if (!$this->serializer instanceof NormalizerInterface) { - throw new LogicException(sprintf('The injected serializer must be an instance of "%s".', NormalizerInterface::class)); + throw new LogicException(\sprintf('The injected serializer must be an instance of "%s".', NormalizerInterface::class)); } $normalizedRelatedObject = $this->serializer->normalize($relatedObject, $format, $context); @@ -422,7 +422,7 @@ private function getPopulatedRelations(object $object, ?string $format, array $c // Many to many relationship foreach ($attributeValue as $attributeValueElement) { if (!isset($attributeValueElement['data'])) { - throw new UnexpectedValueException(sprintf('The JSON API attribute \'%s\' must contain a "data" key.', $relationshipName)); + throw new UnexpectedValueException(\sprintf('The JSON API attribute \'%s\' must contain a "data" key.', $relationshipName)); } unset($attributeValueElement['data']['attributes']); $data[$relationshipName]['data'][] = $attributeValueElement['data'];