mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-01 04:23:49 +00:00
upgrade php-cs 3.49
This commit is contained in:
@@ -214,7 +214,7 @@ class Household
|
||||
*
|
||||
* @Serializer\SerializedName("current_address")
|
||||
*/
|
||||
public function getCurrentAddress(\DateTime $at = null): ?Address
|
||||
public function getCurrentAddress(?\DateTime $at = null): ?Address
|
||||
{
|
||||
$at ??= new \DateTime('today');
|
||||
|
||||
@@ -234,7 +234,7 @@ class Household
|
||||
*
|
||||
* @Serializer\SerializedName("current_composition")
|
||||
*/
|
||||
public function getCurrentComposition(\DateTimeImmutable $at = null): ?HouseholdComposition
|
||||
public function getCurrentComposition(?\DateTimeImmutable $at = null): ?HouseholdComposition
|
||||
{
|
||||
$at ??= new \DateTimeImmutable('today');
|
||||
$criteria = new Criteria();
|
||||
@@ -262,12 +262,12 @@ class Household
|
||||
/**
|
||||
* @Serializer\Groups({"docgen:read"})
|
||||
*/
|
||||
public function getCurrentMembers(\DateTimeImmutable $now = null): Collection
|
||||
public function getCurrentMembers(?\DateTimeImmutable $now = null): Collection
|
||||
{
|
||||
return $this->getMembers()->matching($this->buildCriteriaCurrentMembers($now));
|
||||
}
|
||||
|
||||
public function getCurrentMembersByPosition(Position $position, \DateTimeInterface $now = null)
|
||||
public function getCurrentMembersByPosition(Position $position, ?\DateTimeInterface $now = null)
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$expr = Criteria::expr();
|
||||
@@ -286,7 +286,7 @@ class Household
|
||||
*
|
||||
* @Serializer\SerializedName("current_members_id")
|
||||
*/
|
||||
public function getCurrentMembersIds(\DateTimeImmutable $now = null): ReadableCollection
|
||||
public function getCurrentMembersIds(?\DateTimeImmutable $now = null): ReadableCollection
|
||||
{
|
||||
return $this->getCurrentMembers($now)->map(
|
||||
static fn (HouseholdMember $m) => $m->getId()
|
||||
@@ -296,7 +296,7 @@ class Household
|
||||
/**
|
||||
* @return HouseholdMember[]
|
||||
*/
|
||||
public function getCurrentMembersOrdered(\DateTimeImmutable $now = null): Collection
|
||||
public function getCurrentMembersOrdered(?\DateTimeImmutable $now = null): Collection
|
||||
{
|
||||
$members = $this->getCurrentMembers($now);
|
||||
|
||||
@@ -338,7 +338,7 @@ class Household
|
||||
return $members;
|
||||
}
|
||||
|
||||
public function getCurrentMembersWithoutPosition(\DateTimeInterface $now = null)
|
||||
public function getCurrentMembersWithoutPosition(?\DateTimeInterface $now = null)
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$expr = Criteria::expr();
|
||||
@@ -355,7 +355,7 @@ class Household
|
||||
*
|
||||
* @return ReadableCollection<(int|string), Person>
|
||||
*/
|
||||
public function getCurrentPersons(\DateTimeImmutable $now = null): ReadableCollection
|
||||
public function getCurrentPersons(?\DateTimeImmutable $now = null): ReadableCollection
|
||||
{
|
||||
return $this->getCurrentMembers($now)
|
||||
->map(static fn (HouseholdMember $m) => $m->getPerson());
|
||||
@@ -424,7 +424,7 @@ class Household
|
||||
});
|
||||
}
|
||||
|
||||
public function getNonCurrentMembers(\DateTimeImmutable $now = null): Collection
|
||||
public function getNonCurrentMembers(?\DateTimeImmutable $now = null): Collection
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$expr = Criteria::expr();
|
||||
@@ -444,7 +444,7 @@ class Household
|
||||
return $this->getMembers()->matching($criteria);
|
||||
}
|
||||
|
||||
public function getNonCurrentMembersByPosition(Position $position, \DateTimeInterface $now = null)
|
||||
public function getNonCurrentMembersByPosition(Position $position, ?\DateTimeInterface $now = null)
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$expr = Criteria::expr();
|
||||
@@ -454,7 +454,7 @@ class Household
|
||||
return $this->getNonCurrentMembers($now)->matching($criteria);
|
||||
}
|
||||
|
||||
public function getNonCurrentMembersWithoutPosition(\DateTimeInterface $now = null)
|
||||
public function getNonCurrentMembersWithoutPosition(?\DateTimeInterface $now = null)
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$expr = Criteria::expr();
|
||||
@@ -644,7 +644,7 @@ class Household
|
||||
}
|
||||
}
|
||||
|
||||
private function buildCriteriaCurrentMembers(\DateTimeImmutable $now = null): Criteria
|
||||
private function buildCriteriaCurrentMembers(?\DateTimeImmutable $now = null): Criteria
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$expr = Criteria::expr();
|
||||
|
@@ -153,7 +153,7 @@ class HouseholdMember
|
||||
return $this->startDate;
|
||||
}
|
||||
|
||||
public function isCurrent(\DateTimeImmutable $at = null): bool
|
||||
public function isCurrent(?\DateTimeImmutable $at = null): bool
|
||||
{
|
||||
$at ??= new \DateTimeImmutable('now');
|
||||
|
||||
@@ -174,7 +174,7 @@ class HouseholdMember
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setEndDate(\DateTimeImmutable $endDate = null): self
|
||||
public function setEndDate(?\DateTimeImmutable $endDate = null): self
|
||||
{
|
||||
$this->endDate = $endDate;
|
||||
|
||||
|
Reference in New Issue
Block a user