mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
Correct 2 phpstan errors, condition is always true and wrong typing
This commit is contained in:
parent
addc623add
commit
1ecc825945
@ -65,7 +65,7 @@ class UserRender implements ChillEntityRenderInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array{main_scope?: bool, user_job?: bool, absence?: bool, at_date?: DateTimeImmutable|DateTimeMutable|null} $options
|
* @param array{main_scope?: bool, user_job?: bool, absence?: bool, at_date?: DateTimeImmutable|DateTime|null} $options
|
||||||
*/
|
*/
|
||||||
public function renderString($entity, array $options): string
|
public function renderString($entity, array $options): string
|
||||||
{
|
{
|
||||||
|
@ -57,7 +57,6 @@ class AccompanyingPeriodWorkNormalizer implements ContextAwareNormalizerInterfac
|
|||||||
// add the referrers
|
// add the referrers
|
||||||
$initial['referrers'] = [];
|
$initial['referrers'] = [];
|
||||||
|
|
||||||
if ($object instanceof AccompanyingPeriodWork) {
|
|
||||||
foreach ($object->getReferrersHistory() as $referrerHistory) {
|
foreach ($object->getReferrersHistory() as $referrerHistory) {
|
||||||
if (null !== $referrerHistory->getEndDate()) {
|
if (null !== $referrerHistory->getEndDate()) {
|
||||||
continue;
|
continue;
|
||||||
@ -69,7 +68,7 @@ class AccompanyingPeriodWorkNormalizer implements ContextAwareNormalizerInterfac
|
|||||||
[...$context, UserNormalizer::AT_DATE => $referrerHistory->getStartDate()]
|
[...$context, UserNormalizer::AT_DATE => $referrerHistory->getStartDate()]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ('json' === $format) {
|
if ('json' === $format) {
|
||||||
// then, we add normalization for things which are not into the entity
|
// then, we add normalization for things which are not into the entity
|
||||||
|
Loading…
x
Reference in New Issue
Block a user