mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
Fix tests after introduction of bootstrap
This commit is contained in:
@@ -734,9 +734,13 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
return $this->birthdate;
|
||||
}
|
||||
|
||||
public function getAge(): int
|
||||
public function getAge(): ?int
|
||||
{
|
||||
return date_diff($this->birthdate, date_create('now'))->format("%y");
|
||||
if ($this->birthdate instanceof \DateTimeInterface) {
|
||||
return date_diff($this->birthdate, date_create('now'))->format("%y");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user