diff --git a/src/bundle/Form/ChoiceLoader/ConfiguredLanguagesChoiceLoader.php b/src/bundle/Form/ChoiceLoader/ConfiguredLanguagesChoiceLoader.php index 4894742..77e5712 100644 --- a/src/bundle/Form/ChoiceLoader/ConfiguredLanguagesChoiceLoader.php +++ b/src/bundle/Form/ChoiceLoader/ConfiguredLanguagesChoiceLoader.php @@ -42,7 +42,7 @@ public function getChoiceList(): array /** * {@inheritdoc} */ - public function loadChoiceList(callable $value = null) + public function loadChoiceList(?callable $value = null) { $choices = $this->getChoiceList(); @@ -52,7 +52,7 @@ public function loadChoiceList(callable $value = null) /** * {@inheritdoc} */ - public function loadChoicesForValues(array $values, callable $value = null) + public function loadChoicesForValues(array $values, ?callable $value = null) { // Optimize $values = array_filter($values); @@ -66,7 +66,7 @@ public function loadChoicesForValues(array $values, callable $value = null) /** * {@inheritdoc} */ - public function loadValuesForChoices(array $choices, callable $value = null) + public function loadValuesForChoices(array $choices, ?callable $value = null) { // Optimize $choices = array_filter($choices); diff --git a/src/bundle/Form/ChoiceLoader/ContentTypeChoiceLoader.php b/src/bundle/Form/ChoiceLoader/ContentTypeChoiceLoader.php index 4e1a1ed..39ec776 100644 --- a/src/bundle/Form/ChoiceLoader/ContentTypeChoiceLoader.php +++ b/src/bundle/Form/ChoiceLoader/ContentTypeChoiceLoader.php @@ -55,7 +55,7 @@ public function getChoiceList(): array /** * {@inheritdoc} */ - public function loadChoiceList(callable $value = null) + public function loadChoiceList(?callable $value = null) { $choices = $this->getChoiceList(); @@ -65,7 +65,7 @@ public function loadChoiceList(callable $value = null) /** * {@inheritdoc} */ - public function loadChoicesForValues(array $values, callable $value = null) + public function loadChoicesForValues(array $values, ?callable $value = null) { // Optimize $values = array_filter($values); @@ -79,7 +79,7 @@ public function loadChoicesForValues(array $values, callable $value = null) /** * {@inheritdoc} */ - public function loadValuesForChoices(array $choices, callable $value = null) + public function loadValuesForChoices(array $choices, ?callable $value = null) { // Optimize $choices = array_filter($choices); diff --git a/src/contracts/Model/Suggestion/Suggestion.php b/src/contracts/Model/Suggestion/Suggestion.php index cd88f3d..1298aa5 100644 --- a/src/contracts/Model/Suggestion/Suggestion.php +++ b/src/contracts/Model/Suggestion/Suggestion.php @@ -18,7 +18,7 @@ abstract class Suggestion extends ValueObject public function __construct( float $score, - string $name = null + ?string $name = null ) { $this->score = $score; $this->name = $name; diff --git a/src/lib/Serializer/Normalizer/Suggestion/ContentSuggestionNormalizer.php b/src/lib/Serializer/Normalizer/Suggestion/ContentSuggestionNormalizer.php index cba0d07..ed84c8d 100644 --- a/src/lib/Serializer/Normalizer/Suggestion/ContentSuggestionNormalizer.php +++ b/src/lib/Serializer/Normalizer/Suggestion/ContentSuggestionNormalizer.php @@ -26,7 +26,7 @@ final class ContentSuggestionNormalizer implements * * @return array */ - public function normalize($object, string $format = null, array $context = []): array + public function normalize($object, ?string $format = null, array $context = []): array { $content = $object->getContent(); @@ -41,7 +41,7 @@ public function normalize($object, string $format = null, array $context = []): ]; } - public function supportsNormalization($data, string $format = null): bool + public function supportsNormalization($data, ?string $format = null): bool { return $data instanceof ContentSuggestion; } diff --git a/src/lib/Serializer/Normalizer/Suggestion/LocationNormalizer.php b/src/lib/Serializer/Normalizer/Suggestion/LocationNormalizer.php index f30960f..6b09a7c 100644 --- a/src/lib/Serializer/Normalizer/Suggestion/LocationNormalizer.php +++ b/src/lib/Serializer/Normalizer/Suggestion/LocationNormalizer.php @@ -18,7 +18,7 @@ final class LocationNormalizer implements NormalizerInterface * * @return array */ - public function normalize($object, string $format = null, array $context = []): array + public function normalize($object, ?string $format = null, array $context = []): array { return [ 'id' => $object->getContentInfo()->getId(), @@ -27,7 +27,7 @@ public function normalize($object, string $format = null, array $context = []): ]; } - public function supportsNormalization($data, string $format = null): bool + public function supportsNormalization($data, ?string $format = null): bool { return $data instanceof Location; } diff --git a/src/lib/Serializer/Normalizer/Suggestion/ParentLocationCollectionNormalizer.php b/src/lib/Serializer/Normalizer/Suggestion/ParentLocationCollectionNormalizer.php index 8e2a975..a0bb9fb 100644 --- a/src/lib/Serializer/Normalizer/Suggestion/ParentLocationCollectionNormalizer.php +++ b/src/lib/Serializer/Normalizer/Suggestion/ParentLocationCollectionNormalizer.php @@ -27,7 +27,7 @@ final class ParentLocationCollectionNormalizer implements * * @return array. */ - public function normalize($object, string $format = null, array $context = []): array + public function normalize($object, ?string $format = null, array $context = []): array { $normalizedData = []; @@ -38,7 +38,7 @@ public function normalize($object, string $format = null, array $context = []): return $normalizedData; } - public function supportsNormalization($data, string $format = null): bool + public function supportsNormalization($data, ?string $format = null): bool { return $data instanceof ParentLocationCollection; } diff --git a/src/lib/Serializer/Normalizer/Suggestion/SuggestionCollectionNormalizer.php b/src/lib/Serializer/Normalizer/Suggestion/SuggestionCollectionNormalizer.php index 55a28b2..6908dc5 100644 --- a/src/lib/Serializer/Normalizer/Suggestion/SuggestionCollectionNormalizer.php +++ b/src/lib/Serializer/Normalizer/Suggestion/SuggestionCollectionNormalizer.php @@ -27,7 +27,7 @@ final class SuggestionCollectionNormalizer implements * * @return array. */ - public function normalize($object, string $format = null, array $context = []): array + public function normalize($object, ?string $format = null, array $context = []): array { $suggestionCollection = []; @@ -41,7 +41,7 @@ public function normalize($object, string $format = null, array $context = []): ]; } - public function supportsNormalization($data, string $format = null): bool + public function supportsNormalization($data, ?string $format = null): bool { return $data instanceof SuggestionCollection; }