Fixed phpstan issues

This commit is contained in:
Jan Böhmer 2025-11-30 23:37:34 +01:00
parent 8efc1ab07d
commit 9f2989444a
2 changed files with 5 additions and 7 deletions

View file

@ -72,11 +72,9 @@ class ProviderSelectType extends AbstractType
$resolver->setDefault('choice_label', function (Options $options){
if ('object' === $options['input']) {
return ChoiceList::label($this, static fn (?InfoProviderInterface $choice) => new StaticMessage($choice?->getProviderInfo()['name']));
} else {
return static fn ($choice, $key, $value) => new StaticMessage($key);
}
return null;
return static fn ($choice, $key, $value) => new StaticMessage($key);
});
$resolver->setDefault('choice_value', function (Options $options) {
if ('object' === $options['input']) {