@@ -24,9 +24,9 @@ class AbsoluteDateNormalizer implements NormalizerInterface, DenormalizerInterfa
2424 * @param mixed[] $context
2525 * @throws InvalidArgumentException
2626 */
27- public function normalize ($ object , string $ format = null , array $ context = []): string
27+ public function normalize (mixed $ data , ? string $ format = null , array $ context = []): string
2828 {
29- if (!$ object instanceof AbsoluteDate) {
29+ if (!$ data instanceof AbsoluteDate) {
3030 throw new InvalidArgumentException (sprintf (
3131 'The object must be an instance of "%s". ' ,
3232 AbsoluteDate::class
@@ -35,14 +35,14 @@ public function normalize($object, string $format = null, array $context = []):
3535
3636 $ dateTimeFormat = $ context [self ::FORMAT_KEY ] ?? AbsoluteDate::DEFAULT_DATE_FORMAT ;
3737
38- return $ object ->format ($ dateTimeFormat );
38+ return $ data ->format ($ dateTimeFormat );
3939 }
4040
4141 /**
4242 * {@inheritdoc}
4343 * @param mixed[] $context
4444 */
45- public function supportsNormalization (mixed $ data , string $ format = null , array $ context = []): bool
45+ public function supportsNormalization (mixed $ data , ? string $ format = null , array $ context = []): bool
4646 {
4747 return $ data instanceof AbsoluteDate;
4848 }
@@ -53,7 +53,7 @@ public function supportsNormalization(mixed $data, string $format = null, array
5353 * @param mixed[] $context
5454 * @throws NotNormalizableValueException
5555 */
56- public function denormalize ($ data , string $ type , string $ format = null , array $ context = []): ?AbsoluteDate
56+ public function denormalize ($ data , string $ type , ? string $ format = null , array $ context = []): ?AbsoluteDate
5757 {
5858 $ dateTimeFormat = $ context [self ::FORMAT_KEY ] ?? AbsoluteDate::DEFAULT_DATE_FORMAT ;
5959
0 commit comments