mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 02:23:51 +00:00
cs: Enable risky rule static_lambda
.
This commit is contained in:
@@ -110,7 +110,7 @@ class ParticipationController extends AbstractController
|
||||
[
|
||||
'event_id' => current($participations)->getEvent()->getId(),
|
||||
'persons_ids' => implode(',', array_map(
|
||||
function (Participation $p) { return $p->getPerson()->getId(); },
|
||||
static function (Participation $p) { return $p->getPerson()->getId(); },
|
||||
$participations
|
||||
)),
|
||||
]
|
||||
@@ -646,13 +646,13 @@ class ParticipationController extends AbstractController
|
||||
/** @var \Doctrine\Common\Collections\ArrayCollection $peopleParticipating */
|
||||
$peopleParticipating = $peopleParticipating ??
|
||||
$participation->getEvent()->getParticipations()->map(
|
||||
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())) {
|
||||
$ignoredParticipations[] = $participation
|
||||
->getEvent()->getParticipations()->filter(
|
||||
function (Participation $p) use ($participation) {
|
||||
static function (Participation $p) use ($participation) {
|
||||
return $p->getPerson()->getId() === $participation->getPerson()->getId();
|
||||
}
|
||||
)->first();
|
||||
|
Reference in New Issue
Block a user