mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
DX: rector rules upt to PHP 74
This commit is contained in:
@@ -103,15 +103,11 @@ class PickThirdPartyType extends AbstractType
|
||||
|
||||
$resolver
|
||||
->setDefault('class', ThirdParty::class)
|
||||
->setDefault('choice_label', static function (ThirdParty $tp) {
|
||||
return $tp->getName();
|
||||
})
|
||||
->setDefault('choice_loader', function (Options $options) {
|
||||
return new ThirdPartyChoiceLoader(
|
||||
$options['center'],
|
||||
$this->em->getRepository(ThirdParty::class)
|
||||
);
|
||||
});
|
||||
->setDefault('choice_label', static fn(ThirdParty $tp) => $tp->getName())
|
||||
->setDefault('choice_loader', fn(Options $options) => new ThirdPartyChoiceLoader(
|
||||
$options['center'],
|
||||
$this->em->getRepository(ThirdParty::class)
|
||||
));
|
||||
}
|
||||
|
||||
public function getParent(): string
|
||||
|
@@ -77,9 +77,7 @@ class PickThirdPartyTypeCategoryType extends \Symfony\Component\Form\AbstractTyp
|
||||
|
||||
return self::PREFIX_TYPE . $item;
|
||||
},
|
||||
'choice_value' => function ($item) {
|
||||
return $this->reverseTransform($item);
|
||||
},
|
||||
'choice_value' => fn($item) => $this->reverseTransform($item),
|
||||
]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user