mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-12-31 22:41:23 +00:00
sa: Fix all issues related to PHP versions and static-analysis.
This commit is contained in:
@@ -29,7 +29,7 @@ class CenterNormalizer implements DenormalizerInterface, NormalizerInterface
|
||||
$this->repository = $repository;
|
||||
}
|
||||
|
||||
public function denormalize($data, string $type, ?string $format = null, array $context = [])
|
||||
public function denormalize($data, $type, $format = null, array $context = [])
|
||||
{
|
||||
if (false === array_key_exists('type', $data)) {
|
||||
throw new InvalidArgumentException('missing "type" key in data');
|
||||
@@ -52,7 +52,7 @@ class CenterNormalizer implements DenormalizerInterface, NormalizerInterface
|
||||
return $center;
|
||||
}
|
||||
|
||||
public function normalize($center, ?string $format = null, array $context = [])
|
||||
public function normalize($center, $format = null, array $context = [])
|
||||
{
|
||||
/** @var Center $center */
|
||||
return [
|
||||
@@ -62,12 +62,12 @@ class CenterNormalizer implements DenormalizerInterface, NormalizerInterface
|
||||
];
|
||||
}
|
||||
|
||||
public function supportsDenormalization($data, string $type, ?string $format = null)
|
||||
public function supportsDenormalization($data, $type, $format = null)
|
||||
{
|
||||
return Center::class === $type;
|
||||
}
|
||||
|
||||
public function supportsNormalization($data, ?string $format = null): bool
|
||||
public function supportsNormalization($data, $format = null): bool
|
||||
{
|
||||
return $data instanceof Center && 'json' === $format;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user