@@ -29,7 +29,7 @@ final class BackedEnumNormalizer implements NormalizerInterface, DenormalizerInt
29
29
*
30
30
* @return int|string
31
31
*/
32
- public function normalize ($ object , $ format = null , array $ context = [])
32
+ public function normalize ($ object , string $ format = null , array $ context = [])
33
33
{
34
34
if (!$ object instanceof \BackedEnum) {
35
35
throw new InvalidArgumentException ('The data must belong to a backed enumeration. ' );
@@ -41,7 +41,7 @@ public function normalize($object, $format = null, array $context = [])
41
41
/**
42
42
* {@inheritdoc}
43
43
*/
44
- public function supportsNormalization ($ data , $ format = null ): bool
44
+ public function supportsNormalization ($ data , string $ format = null ): bool
45
45
{
46
46
return $ data instanceof \BackedEnum;
47
47
}
@@ -51,7 +51,7 @@ public function supportsNormalization($data, $format = null): bool
51
51
*
52
52
* @throws NotNormalizableValueException
53
53
*/
54
- public function denormalize ($ data , $ type , $ format = null , array $ context = [])
54
+ public function denormalize ($ data , string $ type , string $ format = null , array $ context = [])
55
55
{
56
56
if (!is_subclass_of ($ type , \BackedEnum::class)) {
57
57
throw new InvalidArgumentException ('The data must belong to a backed enumeration. ' );
@@ -71,7 +71,7 @@ public function denormalize($data, $type, $format = null, array $context = [])
71
71
/**
72
72
* {@inheritdoc}
73
73
*/
74
- public function supportsDenormalization ($ data , $ type , $ format = null ): bool
74
+ public function supportsDenormalization ($ data , string $ type , string $ format = null ): bool
75
75
{
76
76
return is_subclass_of ($ type , \BackedEnum::class);
77
77
}
0 commit comments