use the date parameter in deprecated method getLastAddress

This commit is contained in:
Julien Fastré 2022-07-08 15:04:06 +02:00
parent b4b67c6f0d
commit 1d8f25e2c8

View File

@ -1184,7 +1184,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
} }
/** /**
* @deprecated Use `getCurrentPersonAddress` instead * @deprecated Use @link{Person::getCurrentPersonAddress} or @link{Person::getCurrentHouseholdAddress} instead
* *
* @throws Exception * @throws Exception
* *
@ -1192,7 +1192,9 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
*/ */
public function getLastAddress(?DateTime $from = null) public function getLastAddress(?DateTime $from = null)
{ {
return $this->getCurrentPersonAddress(); return $this->getCurrentHouseholdAddress(
null !== $from ? DateTimeImmutable::createFromMutable($from) : null
);
} }
public function getLastName(): string public function getLastName(): string