mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-07-01 14:36:13 +00:00
Fix ::getParticipationsContainsPerson
.
1. `::getParticipations()` does not accept any argument. 2. The filter predicate must return a boolean.
This commit is contained in:
parent
6bd7a0105d
commit
9d34968b88
@ -348,12 +348,13 @@ class AccompanyingPeriod
|
|||||||
*/
|
*/
|
||||||
public function getParticipationsContainsPerson(Person $person): Collection
|
public function getParticipationsContainsPerson(Person $person): Collection
|
||||||
{
|
{
|
||||||
return $this->getParticipations($person)->filter(
|
return $this
|
||||||
function(AccompanyingPeriodParticipation $participation) use ($person) {
|
->getParticipations()
|
||||||
if ($person === $participation->getPerson()) {
|
->filter(
|
||||||
return $participation;
|
static function(AccompanyingPeriodParticipation $participation) use ($person): bool {
|
||||||
|
return $person === $participation->getPerson();
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user