sa: Fix all issues related to PHP versions and static-analysis.

This commit is contained in:
Pol Dellaiera
2021-12-21 11:58:58 +01:00
parent b3823161af
commit b743475761
25 changed files with 79 additions and 81 deletions

View File

@@ -17,11 +17,13 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
class AccompanyingPeriodParticipationNormalizer implements NormalizerAwareInterface, NormalizerInterface
{
protected ?NormalizerInterface $normalizer = null;
private ?NormalizerInterface $normalizer = null;
public function normalize($participation, ?string $format = null, array $context = [])
/**
* @param AccompanyingPeriodParticipation $participation
*/
public function normalize($participation, $format = null, array $context = [])
{
/** @var AccompanyingPeriodParticipation $participation */
return [
'id' => $participation->getId(),
'startDate' => $this->normalizer->normalize($participation->getStartDate(), $format),
@@ -35,8 +37,9 @@ class AccompanyingPeriodParticipationNormalizer implements NormalizerAwareInterf
$this->normalizer = $normalizer;
}
public function supportsNormalization($data, ?string $format = null): bool
public function supportsNormalization($data, $format = null): bool
{
// @TODO Fix this.
return false;
return $data instanceof AccompanyingPeriodParticipation;