This commit is contained in:
Julie Lenaerts 2022-03-04 12:07:29 +01:00
parent 25fe105590
commit 1c21b80703

View File

@ -35,6 +35,7 @@ use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Annotation\SerializedName;
use function count;
/**
* Class Activity.
@ -234,6 +235,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
if (count($descendants) > 0) {
foreach ($descendants as $d) {
$inCollection = $this->socialActions->contains($d);
if ($inCollection) {
return $this;
}
@ -241,7 +243,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
} else {
if (!$this->socialActions->contains($socialAction)) {
$this->socialActions[] = $socialAction;
};
}
}
return $this;
@ -254,6 +256,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
if (count($descendants) > 0) {
foreach ($descendants as $d) {
$inCollection = $this->socialIssues->contains($d);
if ($inCollection) {
return $this;
}
@ -261,7 +264,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
} else {
if (!$this->socialIssues->contains($socialIssue)) {
$this->socialIssues[] = $socialIssue;
};
}
}
return $this;