mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
DX: fix tests to find ancestor to all SocialAction and SocialIssue
This commit is contained in:
@@ -71,11 +71,15 @@ class SocialIssue
|
||||
$this->socialActions = new ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal use @see{SocialIssue::setParent} instead
|
||||
* @param SocialIssue $child
|
||||
* @return $this
|
||||
*/
|
||||
public function addChild(self $child): self
|
||||
{
|
||||
if (!$this->children->contains($child)) {
|
||||
$this->children[] = $child;
|
||||
$child->setParent($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
@@ -216,10 +220,10 @@ class SocialIssue
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection|SocialIssue[] $socialIssues
|
||||
* @param array|SocialIssue[] $socialIssues
|
||||
* @return Collection
|
||||
*/
|
||||
public static function getDescendantsWithThisForIssues(Collection $socialIssues): Collection
|
||||
public static function getDescendantsWithThisForIssues(array $socialIssues): Collection
|
||||
{
|
||||
$unique = [];
|
||||
|
||||
@@ -351,6 +355,8 @@ class SocialIssue
|
||||
{
|
||||
$this->parent = $parent;
|
||||
|
||||
$parent->addChild($this);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user