DX: fix cs

This commit is contained in:
2023-04-15 00:43:55 +02:00
parent 80647147ee
commit 746ed4f5e5
188 changed files with 309 additions and 308 deletions

View File

@@ -143,10 +143,10 @@ class AccompanyingPeriodContext implements
->add('category', EntityType::class, [
'placeholder' => 'Choose a document category',
'class' => DocumentCategory::class,
'query_builder' => static fn(EntityRepository $er) => $er->createQueryBuilder('c')
'query_builder' => static fn (EntityRepository $er) => $er->createQueryBuilder('c')
->where('c.documentClass = :docClass')
->setParameter('docClass', AccompanyingCourseDocument::class),
'choice_label' => fn($entity = null) => $entity ? $this->translatableStringHelper->localize($entity->getName()) : '',
'choice_label' => fn ($entity = null) => $entity ? $this->translatableStringHelper->localize($entity->getName()) : '',
]);
}
@@ -156,7 +156,7 @@ class AccompanyingPeriodContext implements
public function buildPublicForm(FormBuilderInterface $builder, DocGeneratorTemplate $template, mixed $entity): void
{
$options = $template->getOptions();
$persons = new ArrayCollection($entity->getCurrentParticipations()->map(static fn(AccompanyingPeriodParticipation $p) => $p->getPerson())->toArray());
$persons = new ArrayCollection($entity->getCurrentParticipations()->map(static fn (AccompanyingPeriodParticipation $p) => $p->getPerson())->toArray());
foreach ($entity->getCurrentParticipations() as $p) {
foreach ($p->getPerson()->getResources() as $r) {
@@ -181,7 +181,7 @@ class AccompanyingPeriodContext implements
$builder->add($key, EntityType::class, [
'class' => Person::class,
'choices' => $persons,
'choice_label' => fn(Person $p) => $this->personRender->renderString($p, ['addAge' => true]),
'choice_label' => fn (Person $p) => $this->personRender->renderString($p, ['addAge' => true]),
'multiple' => false,
'expanded' => true,
'required' => false,