mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix phpstan and phpcs
This commit is contained in:
parent
8edc68859e
commit
612d053892
@ -45,12 +45,17 @@ class DateNormalizer implements ContextAwareNormalizerInterface, DenormalizerInt
|
||||
switch ($type) {
|
||||
case DateTime::class:
|
||||
$result = DateTime::createFromFormat(DateTimeInterface::ISO8601, $data['datetime']);
|
||||
|
||||
break;
|
||||
|
||||
case DateTimeInterface::class:
|
||||
case DateTimeImmutable::class:
|
||||
$result = DateTimeImmutable::createFromFormat(DateTimeInterface::ISO8601, $data['datetime']);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new UnexpectedValueException();
|
||||
}
|
||||
|
||||
if (false === $result) {
|
||||
@ -58,8 +63,6 @@ class DateNormalizer implements ContextAwareNormalizerInterface, DenormalizerInt
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
throw new UnexpectedValueException();
|
||||
}
|
||||
|
||||
public function normalize($date, $format = null, array $context = [])
|
||||
|
Loading…
x
Reference in New Issue
Block a user