mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
fix cs
This commit is contained in:
@@ -35,7 +35,6 @@ 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.
|
||||
@@ -238,23 +237,14 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
||||
return $this;
|
||||
}
|
||||
|
||||
private function ensureSocialActionConsistency(): void
|
||||
{
|
||||
$ancestors = SocialAction::findAncestorSocialActions($this->getSocialActions());
|
||||
|
||||
foreach ($ancestors as $ancestor) {
|
||||
$this->removeSocialAction($ancestor);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a social issue
|
||||
* Add a social issue.
|
||||
*
|
||||
* Note: the social issue consistency (the fact that only yougest social issues
|
||||
* are kept) is processed by an entity listener:
|
||||
*
|
||||
* @see{\Chill\PersonBundle\AccompanyingPeriod\SocialIssueConsistency\AccompanyingPeriodSocialIssueConsistencyEntityListener}
|
||||
*
|
||||
* @param SocialIssue $socialIssue
|
||||
* @return $this
|
||||
*/
|
||||
public function addSocialIssue(SocialIssue $socialIssue): self
|
||||
@@ -652,4 +642,13 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
private function ensureSocialActionConsistency(): void
|
||||
{
|
||||
$ancestors = SocialAction::findAncestorSocialActions($this->getSocialActions());
|
||||
|
||||
foreach ($ancestors as $ancestor) {
|
||||
$this->removeSocialAction($ancestor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user