DX: apply rector rules up to php8.0

This commit is contained in:
2023-04-15 01:05:37 +02:00
parent d8870e906f
commit dde3002100
714 changed files with 2348 additions and 9263 deletions

View File

@@ -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