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

@@ -25,6 +25,7 @@ use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use function count;
/**
@@ -112,7 +113,9 @@ class ParticipationController extends AbstractController
[
'event_id' => current($participations)->getEvent()->getId(),
'persons_ids' => implode(',', array_map(
static function (Participation $p) { return $p->getPerson()->getId(); },
static function (Participation $p) {
return $p->getPerson()->getId();
},
$participations
)),
]
@@ -648,7 +651,9 @@ class ParticipationController extends AbstractController
/** @var \Doctrine\Common\Collections\ArrayCollection $peopleParticipating */
$peopleParticipating = $peopleParticipating ??
$participation->getEvent()->getParticipations()->map(
static function (Participation $p) { return $p->getPerson()->getId(); }
static function (Participation $p) {
return $p->getPerson()->getId();
}
);
// check that the user is not already in the event
if ($peopleParticipating->contains($participation->getPerson()->getId())) {