phpstan boolean corrections

This commit is contained in:
2025-10-09 13:57:30 +02:00
parent 03fa79c93b
commit b132956ddc
37 changed files with 149 additions and 623 deletions

View File

@@ -210,9 +210,21 @@ class PersonJsonNormalizer implements DenormalizerAwareInterface, NormalizerAwar
return $data;
}
return [...$data, 'centers' => $this->normalizer->normalize($this->centerResolverManager->resolveCenters($person), $format, $context), 'altNames' => $this->normalizeAltNames($person->getAltNames()), 'current_household_id' => $household ? $this->normalizer->normalize($household->getId(), $format, $context) : null, 'current_residential_addresses' => $currentResidentialAddresses ?
$this->normalizer->normalize($currentResidentialAddresses, $format, $context) :
null];
return [
...$data,
'centers' => $this->normalizer->normalize(
$this->centerResolverManager->resolveCenters($person),
$format,
$context
),
'altNames' => $this->normalizeAltNames($person->getAltNames()),
'current_household_id' => $household !== null ?
$this->normalizer->normalize($household->getId(), $format, $context) :
null,
'current_residential_addresses' => $currentResidentialAddresses !== [] ?
$this->normalizer->normalize($currentResidentialAddresses, $format, $context) :
null
];
}
public function supportsDenormalization($data, $type, $format = null, array $context = []): bool