summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2021-01-22 08:11:55 +0000
committerGreg Roach <greg@subaqua.co.uk>2021-01-22 09:42:29 +0000
commitd240bb87985bfd0d57a391b520d79c869773d155 (patch)
tree01f29c973c4ff2b41f3db25cc7a96918e1c6e410
parent60e08653475dfaa5432ecd6583c3f0acb2590c2e (diff)
downloadwebtrees-d240bb87985bfd0d57a391b520d79c869773d155.tar.gz
webtrees-d240bb87985bfd0d57a391b520d79c869773d155.tar.bz2
webtrees-d240bb87985bfd0d57a391b520d79c869773d155.zip
Code style
-rw-r--r--app/Individual.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/app/Individual.php b/app/Individual.php
index 18ef23b6b8..e58e87942d 100644
--- a/app/Individual.php
+++ b/app/Individual.php
@@ -560,9 +560,10 @@ class Individual extends GedcomRecord
public function getAllBirthDates(): array
{
foreach (Gedcom::BIRTH_EVENTS as $event) {
- $tmp = $this->getAllEventDates([$event]);
- if ($tmp) {
- return $tmp;
+ $dates = $this->getAllEventDates([$event]);
+
+ if ($dates !== []) {
+ return $dates;
}
}
@@ -578,6 +579,7 @@ class Individual extends GedcomRecord
{
foreach (Gedcom::BIRTH_EVENTS as $event) {
$places = $this->getAllEventPlaces([$event]);
+
if ($places !== []) {
return $places;
}
@@ -594,9 +596,10 @@ class Individual extends GedcomRecord
public function getAllDeathDates(): array
{
foreach (Gedcom::DEATH_EVENTS as $event) {
- $tmp = $this->getAllEventDates([$event]);
- if ($tmp) {
- return $tmp;
+ $dates = $this->getAllEventDates([$event]);
+
+ if ($dates !== []) {
+ return $dates;
}
}
@@ -612,6 +615,7 @@ class Individual extends GedcomRecord
{
foreach (Gedcom::DEATH_EVENTS as $event) {
$places = $this->getAllEventPlaces([$event]);
+
if ($places !== []) {
return $places;
}