mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 06:44:59 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -15,8 +15,6 @@ use Chill\MainBundle\Entity\Address;
|
||||
use Chill\PersonBundle\Entity\Household\Household;
|
||||
use Chill\PersonBundle\Entity\Household\HouseholdMember;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use DateTime;
|
||||
use DateTimeImmutable;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
class PersonAddressMoveEvent extends Event
|
||||
@@ -42,7 +40,7 @@ class PersonAddressMoveEvent extends Event
|
||||
* * or the date of the move
|
||||
* * or the date when the household leaving take place (the end date of the previous membership)
|
||||
*/
|
||||
public function getMoveDate(): DateTimeImmutable
|
||||
public function getMoveDate(): \DateTimeImmutable
|
||||
{
|
||||
if ($this->personLeaveWithoutHousehold()) {
|
||||
return $this->getPreviousMembership()->getEndDate();
|
||||
@@ -53,7 +51,7 @@ class PersonAddressMoveEvent extends Event
|
||||
}
|
||||
|
||||
// person is changing address without household
|
||||
return DateTimeImmutable::createFromMutable($this->getNextAddress()->getValidFrom());
|
||||
return \DateTimeImmutable::createFromMutable($this->getNextAddress()->getValidFrom());
|
||||
}
|
||||
|
||||
public function getNextAddress(): ?Address
|
||||
@@ -61,8 +59,7 @@ class PersonAddressMoveEvent extends Event
|
||||
if (null !== $this->getNextMembership()) {
|
||||
return $this->getNextMembership()->getHousehold()
|
||||
->getCurrentAddress(
|
||||
$this->getMoveDate() === null ? null :
|
||||
DateTime::createFromImmutable($this->getMoveDate())
|
||||
\DateTime::createFromImmutable($this->getMoveDate())
|
||||
);
|
||||
}
|
||||
|
||||
@@ -93,8 +90,7 @@ class PersonAddressMoveEvent extends Event
|
||||
if (null !== $this->getPreviousMembership()) {
|
||||
return $this->getPreviousMembership()->getHousehold()
|
||||
->getCurrentAddress(
|
||||
null === $this->getMoveDate() ? null :
|
||||
DateTime::createFromImmutable($this->getMoveDate())
|
||||
\DateTime::createFromImmutable($this->getMoveDate())
|
||||
);
|
||||
}
|
||||
|
||||
@@ -166,7 +162,7 @@ class PersonAddressMoveEvent extends Event
|
||||
/**
|
||||
* Will the change affect this date ?
|
||||
*/
|
||||
public function willChangeBeActiveAt(DateTimeImmutable $date): bool
|
||||
public function willChangeBeActiveAt(\DateTimeImmutable $date): bool
|
||||
{
|
||||
if ($this->getMoveDate() < $date && $this->personLeaveWithoutHousehold()) {
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user