Skip to content

Commit 634cabb

Browse files
authored
Merge pull request #8 from whatwedo/remove-deprecations
chore: remove implicitly marking parameter as nullable deprecation
2 parents 0c99eb1 + 0dc9dbb commit 634cabb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Normalizer/AttributeNormalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class AttributeNormalizer implements NormalizerInterface, NormalizerAwareInterfa
2020
/**
2121
* @param AttributeInterface $object
2222
*/
23-
public function normalize($object, string $format = null, array $context = []): array
23+
public function normalize($object, ?string $format = null, array $context = []): array
2424
{
2525
$data = [
2626
'name' => $object->getName(),
@@ -44,7 +44,7 @@ public function normalize($object, string $format = null, array $context = []):
4444
return $data;
4545
}
4646

47-
public function supportsNormalization($data, string $format = null, array $context = []): bool
47+
public function supportsNormalization($data, ?string $format = null, array $context = []): bool
4848
{
4949
return $data instanceof AttributeInterface;
5050
}

src/Normalizer/EnumNormalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ class EnumNormalizer implements NormalizerInterface
1313
/**
1414
* @param MetricStateEnum|SensorStateEnum $object
1515
*/
16-
public function normalize($object, string $format = null, array $context = []): string
16+
public function normalize($object, ?string $format = null, array $context = []): string
1717
{
1818
return $object->value;
1919
}
2020

21-
public function supportsNormalization($data, string $format = null, array $context = []): bool
21+
public function supportsNormalization($data, ?string $format = null, array $context = []): bool
2222
{
2323
return $data instanceof MetricStateEnum || $data instanceof SensorStateEnum;
2424
}

0 commit comments

Comments
 (0)