apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -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;