mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
cs: Fix code-style (using PHPCSFixer and PHPCS).
This commit is contained in:
@@ -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'],
|
||||
|
@@ -60,7 +60,9 @@ class AccompanyingPeriodWorkEvaluationContext implements
|
||||
$this->accompanyingPeriodWorkContext->adminFormReverseTransform($data),
|
||||
[
|
||||
'evaluations' => array_map(
|
||||
static function (Evaluation $e) { return $e->getId(); },
|
||||
static function (Evaluation $e) {
|
||||
return $e->getId();
|
||||
},
|
||||
$data['evaluations']
|
||||
),
|
||||
]
|
||||
@@ -73,7 +75,9 @@ class AccompanyingPeriodWorkEvaluationContext implements
|
||||
$this->accompanyingPeriodWorkContext->adminFormTransform($data),
|
||||
[
|
||||
'evaluations' => array_map(
|
||||
function ($id) { return $this->evaluationRepository->find($id); },
|
||||
function ($id) {
|
||||
return $this->evaluationRepository->find($id);
|
||||
},
|
||||
$data['evaluations'] ?? []
|
||||
),
|
||||
]
|
||||
|
@@ -25,6 +25,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\Query\Expr\Comparison;
|
||||
use Doctrine\Persistence\ObjectRepository;
|
||||
use Exception;
|
||||
|
||||
use function count;
|
||||
|
||||
final class SocialWorkMetadata implements SocialWorkMetadataInterface
|
||||
|
Reference in New Issue
Block a user