Skip to content

Commit

Permalink
issue #144 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
hartenthaler committed Jun 7, 2022
1 parent 3b7fcc9 commit 589bfde
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/Factory/ExtendedFamilyPart.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,18 @@ private function findGrandparentsBranchIndividuals(Individual $parent, string $b
private function findCousinsBranchIndividuals(Individual $parent, string $branch): array
{
$cousins = [];
foreach ((($branch == 'full')? $this->findFullsiblingsIndividuals($parent): $this->findHalfsiblingsIndividuals($parent)) as $Sibling) {
foreach ($this->findPartnersIndividuals($Sibling->getIndividual()) as $uncleAunt) {
foreach ((($branch == 'full')? $this->findFullsiblingsIndividuals($parent): $this->findHalfsiblingsIndividuals($parent)) as $sibling) {
//echo "<br>Onkel oder Tante: ".$sibling->getIndividual()->fullName()." / ".$sibling->getFamily()->fullName();
foreach ($sibling->getIndividual()->spouseFamilies() as $family) {
foreach ($family->children() as $cousin) {
//echo "<br> Cousin: " . $cousin->fullName() . " / " . $family->fullName();
$cousins[] = new IndividualFamily($cousin, $sibling->getFamily());
}
}
foreach ($this->findPartnersIndividuals($sibling->getIndividual()) as $uncleAunt) {
//echo "<br>angeheirateter Onkel oder Tante: ".$uncleAunt->getIndividual()->fullName()." / ".$uncleAunt->getFamily()->fullName();
foreach ($uncleAunt->getFamily()->children() as $cousin) {
//echo "<br> Cousin: ".$cousin->fullName()." / ".$uncleAunt->getFamily()->fullName();
$cousins[] = new IndividualFamily($cousin, $uncleAunt->getFamily());
}
}
Expand Down

0 comments on commit 589bfde

Please sign in to comment.