mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
DX: apply rector rules up to php8.0
This commit is contained in:
@@ -30,20 +30,8 @@ class CustomFieldLongChoice extends AbstractCustomField
|
||||
{
|
||||
public const KEY = 'key';
|
||||
|
||||
private OptionRepository $optionRepository;
|
||||
|
||||
private TwigEngine $templating;
|
||||
|
||||
private TranslatableStringHelper $translatableStringHelper;
|
||||
|
||||
public function __construct(
|
||||
OptionRepository $optionRepository,
|
||||
TranslatableStringHelper $translatableStringHelper,
|
||||
TwigEngine $twigEngine
|
||||
) {
|
||||
$this->optionRepository = $optionRepository;
|
||||
$this->translatableStringHelper = $translatableStringHelper;
|
||||
$this->templating = $twigEngine;
|
||||
public function __construct(private OptionRepository $optionRepository, private TranslatableStringHelper $translatableStringHelper, private TwigEngine $templating)
|
||||
{
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, CustomField $customField)
|
||||
@@ -130,7 +118,7 @@ class CustomFieldLongChoice extends AbstractCustomField
|
||||
if (!$value instanceof Option) {
|
||||
throw new LogicException('the value should be an instance of '
|
||||
. 'Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice\Option, '
|
||||
. is_object($value) ? get_class($value) : gettype($value) . ' given');
|
||||
. is_object($value) ? $value::class : gettype($value) . ' given');
|
||||
}
|
||||
|
||||
// we place the id in array, to allow in the future multiple select
|
||||
|
Reference in New Issue
Block a user