mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
php style fixer
This commit is contained in:
@@ -394,6 +394,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
|
||||
|
||||
/**
|
||||
* @return ReadableCollection<int, User>
|
||||
*
|
||||
* @Serializer\Groups({"accompanying_period_work:edit"})
|
||||
*/
|
||||
public function getReferrers(): ReadableCollection
|
||||
|
@@ -63,13 +63,15 @@ class AccompanyingPeriodWorkNormalizer implements ContextAwareNormalizerInterfac
|
||||
continue;
|
||||
}
|
||||
|
||||
$initial['referrers'][] = $this->normalizer->normalize($referrerHistory->getUser(),
|
||||
$format, [...$context, UserNormalizer::AT_DATE => $referrerHistory->getStartDate()]);
|
||||
$initial['referrers'][] = $this->normalizer->normalize(
|
||||
$referrerHistory->getUser(),
|
||||
$format,
|
||||
[...$context, UserNormalizer::AT_DATE => $referrerHistory->getStartDate()]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ($format === 'json') {
|
||||
|
||||
if ('json' === $format) {
|
||||
// then, we add normalization for things which are not into the entity
|
||||
$initial['workflows_availables'] = $this->metadataExtractor->availableWorkflowFor(
|
||||
AccompanyingPeriodWork::class,
|
||||
@@ -98,7 +100,7 @@ class AccompanyingPeriodWorkNormalizer implements ContextAwareNormalizerInterfac
|
||||
public function supportsNormalization($data, ?string $format = null, array $context = []): bool
|
||||
{
|
||||
return ('json' === $format || 'docgen' === $format)
|
||||
&& ($data instanceof AccompanyingPeriodWork || ('docgen' === $format && $data === null && ($context['docgen:expects'] ?? null) === AccompanyingPeriodWork::class))
|
||||
&& ($data instanceof AccompanyingPeriodWork || ('docgen' === $format && null === $data && ($context['docgen:expects'] ?? null) === AccompanyingPeriodWork::class))
|
||||
&& !\array_key_exists(self::IGNORE_WORK, $context);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user