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

@@ -36,7 +36,7 @@ class DateNormalizer implements ContextAwareNormalizerInterface, DenormalizerInt
$this->parameterBag = $parameterBag;
}
public function denormalize($data, string $type, ?string $format = null, array $context = [])
public function denormalize($data, $type, $format = null, array $context = [])
{
if (null === $data) {
return null;
@@ -54,7 +54,7 @@ class DateNormalizer implements ContextAwareNormalizerInterface, DenormalizerInt
throw new UnexpectedValueException();
}
public function normalize($date, ?string $format = null, array $context = [])
public function normalize($date, $format = null, array $context = [])
{
/** @var DateTimeInterface $date */
switch ($format) {
@@ -91,7 +91,7 @@ class DateNormalizer implements ContextAwareNormalizerInterface, DenormalizerInt
}
}
public function supportsDenormalization($data, string $type, ?string $format = null): bool
public function supportsDenormalization($data, $type, $format = null): bool
{
return DateTimeInterface::class === $type
|| DateTime::class === $type
@@ -99,7 +99,7 @@ class DateNormalizer implements ContextAwareNormalizerInterface, DenormalizerInt
|| (is_array($data) && array_key_exists('datetime', $data));
}
public function supportsNormalization($data, ?string $format = null, array $context = []): bool
public function supportsNormalization($data, $format = null, array $context = []): bool
{
if ('json' === $format) {
return $data instanceof DateTimeInterface;