mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +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) {
|
switch ($type) {
|
||||||
case DateTime::class:
|
case DateTime::class:
|
||||||
$result = DateTime::createFromFormat(DateTimeInterface::ISO8601, $data['datetime']);
|
$result = DateTime::createFromFormat(DateTimeInterface::ISO8601, $data['datetime']);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DateTimeInterface::class:
|
case DateTimeInterface::class:
|
||||||
case DateTimeImmutable::class:
|
case DateTimeImmutable::class:
|
||||||
$result = DateTimeImmutable::createFromFormat(DateTimeInterface::ISO8601, $data['datetime']);
|
$result = DateTimeImmutable::createFromFormat(DateTimeInterface::ISO8601, $data['datetime']);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new UnexpectedValueException();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (false === $result) {
|
if (false === $result) {
|
||||||
@ -58,8 +63,6 @@ class DateNormalizer implements ContextAwareNormalizerInterface, DenormalizerInt
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
|
||||||
throw new UnexpectedValueException();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function normalize($date, $format = null, array $context = [])
|
public function normalize($date, $format = null, array $context = [])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user