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'],

View File

@@ -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'] ?? []
),
]

View File

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