docgen: fix title of origin

This commit is contained in:
2022-05-30 21:16:40 +02:00
parent 679d19e2a1
commit 0849b2d5f4
4 changed files with 9 additions and 5 deletions

View File

@@ -121,6 +121,7 @@ class AccompanyingPeriodDocGenNormalizer implements ContextAwareNormalizerInterf
'type' => 'accompanying_period',
'isNull' => false,
'closingDate' => $this->normalizer->normalize($period->getClosingDate(), $format, $dateContext),
'closingMotive' => $this->normalizer->normalize($period->getClosingMotive(), $format, array_merge($context, ['docgen:expects' => AccompanyingPeriod\ClosingMotive::class])),
'confidential' => $period->isConfidential(),
'createdAt' => $this->normalizer->normalize($period->getCreatedAt(), $format, $dateContext),
'createdBy' => $this->normalizer->normalize($period->getCreatedBy(), $format, $userContext),

View File

@@ -35,6 +35,6 @@ final class AccompanyingPeriodOriginNormalizer implements NormalizerInterface
public function supportsNormalization($data, $format = null): bool
{
return $data instanceof Origin;
return $data instanceof Origin && $format === 'json';
}
}