Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function getChoiceList(): array
/**
* {@inheritdoc}
*/
public function loadChoiceList(callable $value = null)
public function loadChoiceList(?callable $value = null)
{
$choices = $this->getChoiceList();

Expand All @@ -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);
Expand All @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/bundle/Form/ChoiceLoader/ContentTypeChoiceLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function getChoiceList(): array
/**
* {@inheritdoc}
*/
public function loadChoiceList(callable $value = null)
public function loadChoiceList(?callable $value = null)
{
$choices = $this->getChoiceList();

Expand All @@ -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);
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/Model/Suggestion/Suggestion.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ final class ContentSuggestionNormalizer implements
*
* @return array<string, mixed>
*/
public function normalize($object, string $format = null, array $context = []): array
public function normalize($object, ?string $format = null, array $context = []): array
{
$content = $object->getContent();

Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class LocationNormalizer implements NormalizerInterface
*
* @return array<string, mixed>
*/
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(),
Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final class ParentLocationCollectionNormalizer implements
*
* @return array<int,mixed>.
*/
public function normalize($object, string $format = null, array $context = []): array
public function normalize($object, ?string $format = null, array $context = []): array
{
$normalizedData = [];

Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final class SuggestionCollectionNormalizer implements
*
* @return array<string,mixed>.
*/
public function normalize($object, string $format = null, array $context = []): array
public function normalize($object, ?string $format = null, array $context = []): array
{
$suggestionCollection = [];

Expand All @@ -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;
}
Expand Down
Loading