improvement, but still not correct

This commit is contained in:
Julie Lenaerts 2022-03-16 11:55:19 +01:00
parent 39ba21f308
commit 9551e10d2b

View File

@ -235,15 +235,13 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
if (count($descendants) > 0) {
foreach ($descendants as $d) {
$inCollection = $this->socialActions->contains($d);
if ($inCollection) {
return $this;
}
}
} else {
if (!$this->socialActions->contains($socialAction)) {
$this->socialActions[] = $socialAction;
}
}
if (!$this->socialActions->contains($socialAction)) {
$this->socialActions[] = $socialAction;
}
return $this;
@ -256,15 +254,14 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
if (count($descendants) > 0) {
foreach ($descendants as $d) {
$inCollection = $this->socialIssues->contains($d);
if ($inCollection) {
return $this;
}
}
} else {
if (!$this->socialIssues->contains($socialIssue)) {
$this->socialIssues[] = $socialIssue;
}
}
if (!$this->socialIssues->contains($socialIssue)) {
$this->socialIssues[] = $socialIssue;
}
return $this;