cs: Fix code-style (using PHPCSFixer and PHPCS).

This commit is contained in:
Pol Dellaiera
2021-12-21 10:59:23 +01:00
parent b7360955f7
commit 8401ce2656
280 changed files with 742 additions and 319 deletions

View File

@@ -33,6 +33,7 @@ use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_key_exists;
class AccompanyingPeriodContext implements
@@ -149,7 +150,9 @@ class AccompanyingPeriodContext implements
public function buildPublicForm(FormBuilderInterface $builder, DocGeneratorTemplate $template, $entity): void
{
$options = $template->getOptions();
$persons = $entity->getCurrentParticipations()->map(static function (AccompanyingPeriodParticipation $p) { return $p->getPerson(); })
$persons = $entity->getCurrentParticipations()->map(static function (AccompanyingPeriodParticipation $p) {
return $p->getPerson();
})
->toArray();
foreach (['mainPerson', 'person1', 'person2'] as $key) {
@@ -157,7 +160,9 @@ class AccompanyingPeriodContext implements
$builder->add($key, EntityType::class, [
'class' => Person::class,
'choices' => $persons,
'choice_label' => function (Person $p) { return $this->personRender->renderString($p, []); },
'choice_label' => function (Person $p) {
return $this->personRender->renderString($p, []);
},
'multiple' => false,
'expanded' => true,
'label' => $options[$key . 'Label'],