update php-cs-fixer and rector + fix rules

This commit is contained in:
2024-01-09 13:50:45 +01:00
parent a63b40fb6c
commit 825cd127d1
79 changed files with 220 additions and 229 deletions

View File

@@ -83,7 +83,7 @@ trait AppendScopeChoiceTypeTrait
{
$resolver
->setRequired(['center', 'role'])
->setAllowedTypes('center', \Chill\MainBundle\Entity\Center::class)
->setAllowedTypes('center', Center::class)
->setAllowedTypes('role', 'string');
}

View File

@@ -23,10 +23,10 @@ class ComposedGroupCenterType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('permissionsgroup', EntityType::class, [
'class' => \Chill\MainBundle\Entity\PermissionsGroup::class,
'class' => PermissionsGroup::class,
'choice_label' => static fn (PermissionsGroup $group) => $group->getName(),
])->add('center', EntityType::class, [
'class' => \Chill\MainBundle\Entity\Center::class,
'class' => Center::class,
'choice_label' => static fn (Center $center) => $center->getName(),
]);
}

View File

@@ -56,7 +56,7 @@ class Select2CountryType extends AbstractType
asort($choices, \SORT_STRING | \SORT_FLAG_CASE);
$resolver->setDefaults([
'class' => \Chill\MainBundle\Entity\Country::class,
'class' => Country::class,
'choices' => array_combine(array_values($choices), array_keys($choices)),
'preferred_choices' => array_combine(array_values($preferredChoices), array_keys($preferredChoices)),
]);

View File

@@ -52,7 +52,7 @@ class Select2LanguageType extends AbstractType
asort($choices, \SORT_STRING | \SORT_FLAG_CASE);
$resolver->setDefaults([
'class' => \Chill\MainBundle\Entity\Language::class,
'class' => Language::class,
'choices' => array_combine(array_values($choices), array_keys($choices)),
'preferred_choices' => array_combine(array_values($preferredChoices), array_keys($preferredChoices)),
]);

View File

@@ -38,7 +38,7 @@ class WorkflowStepType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options)
{
/** @var \Chill\MainBundle\Entity\Workflow\EntityWorkflow $entityWorkflow */
/** @var EntityWorkflow $entityWorkflow */
$entityWorkflow = $options['entity_workflow'];
$handler = $this->entityWorkflowManager->getHandler($entityWorkflow);
$workflow = $this->registry->get($entityWorkflow, $entityWorkflow->getWorkflowName());