mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
DX: fix cs
This commit is contained in:
@@ -828,7 +828,7 @@ class AccompanyingPeriod implements
|
||||
$collection = $this
|
||||
->getParticipationsContainsPerson($person)
|
||||
->filter(
|
||||
static fn(AccompanyingPeriodParticipation $participation): bool => null === $participation->getEndDate()
|
||||
static fn (AccompanyingPeriodParticipation $participation): bool => null === $participation->getEndDate()
|
||||
);
|
||||
|
||||
return $collection->count() > 0 ? $collection->first() : null;
|
||||
@@ -842,7 +842,7 @@ class AccompanyingPeriod implements
|
||||
return $this
|
||||
->getParticipations()
|
||||
->filter(
|
||||
static fn(AccompanyingPeriodParticipation $participation): bool => null === $participation->getEndDate()
|
||||
static fn (AccompanyingPeriodParticipation $participation): bool => null === $participation->getEndDate()
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -202,7 +202,7 @@ class Household
|
||||
{
|
||||
$at ??= new DateTime('today');
|
||||
|
||||
$addrs = $this->getAddresses()->filter(static fn(Address $a) => $a->getValidFrom() <= $at && (
|
||||
$addrs = $this->getAddresses()->filter(static fn (Address $a) => $a->getValidFrom() <= $at && (
|
||||
null === $a->getValidTo() || $a->getValidTo() > $at
|
||||
));
|
||||
|
||||
@@ -336,7 +336,7 @@ class Household
|
||||
public function getCurrentPersons(?DateTimeImmutable $now = null): ReadableCollection
|
||||
{
|
||||
return $this->getCurrentMembers($now)
|
||||
->map(static fn(HouseholdMember $m) => $m->getPerson());
|
||||
->map(static fn (HouseholdMember $m) => $m->getPerson());
|
||||
}
|
||||
|
||||
public function getId(): ?int
|
||||
@@ -363,7 +363,7 @@ class Household
|
||||
$membership->getStartDate(),
|
||||
$membership->getEndDate()
|
||||
)->filter(
|
||||
static fn(HouseholdMember $m) => $m->getPerson() !== $membership->getPerson()
|
||||
static fn (HouseholdMember $m) => $m->getPerson() !== $membership->getPerson()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -502,7 +502,7 @@ class Household
|
||||
|
||||
usort(
|
||||
$compositionOrdered,
|
||||
static fn(HouseholdComposition $a, HouseholdComposition $b) => $a->getStartDate() <=> $b->getStartDate()
|
||||
static fn (HouseholdComposition $a, HouseholdComposition $b) => $a->getStartDate() <=> $b->getStartDate()
|
||||
);
|
||||
|
||||
$iterator = new ArrayIterator($compositionOrdered);
|
||||
|
@@ -775,7 +775,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
): int {
|
||||
// TODO should be optimized to avoid loading accompanying period ?
|
||||
return $this->getAccompanyingPeriodInvolved($asParticipantOpen, $asRequestor)
|
||||
->filter(fn(AccompanyingPeriod $p) => $p->getStep() !== AccompanyingPeriod::STEP_DRAFT)
|
||||
->filter(fn (AccompanyingPeriod $p) => $p->getStep() !== AccompanyingPeriod::STEP_DRAFT)
|
||||
->count();
|
||||
}
|
||||
|
||||
@@ -1339,7 +1339,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
|
||||
return $this->getAccompanyingPeriodParticipations()
|
||||
->matching($criteria)
|
||||
->filter(static fn(AccompanyingPeriodParticipation $app) => AccompanyingPeriod::STEP_CLOSED !== $app->getAccompanyingPeriod()->getStep());
|
||||
->filter(static fn (AccompanyingPeriodParticipation $app) => AccompanyingPeriod::STEP_CLOSED !== $app->getAccompanyingPeriod()->getStep());
|
||||
}
|
||||
|
||||
public function getOtherPhoneNumbers(): Collection
|
||||
|
Reference in New Issue
Block a user