fix code style for AccompanyingPeriodWork - referrers

This commit is contained in:
nobohan
2022-03-10 16:25:05 +01:00
parent 137eb184d0
commit 690a443bdb
3 changed files with 31 additions and 32 deletions

View File

@@ -237,6 +237,15 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
return $this;
}
public function addReferrer(User $referrer): self
{
if (!$this->referrers->contains($referrer)) {
$this->referrers[] = $referrer;
}
return $this;
}
public function addResult(Result $result): self
{
if (!$this->results->contains($result)) {
@@ -318,6 +327,14 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
return $this->persons;
}
/**
* @return Collection|User[]
*/
public function getReferrers(): Collection
{
return $this->referrers;
}
/**
* @return Collection|Result[]
*/
@@ -392,6 +409,13 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
return $this;
}
public function removeReferrer(User $referrer): self
{
$this->referrers->removeElement($referrer);
return $this;
}
public function removeResult(Result $result): self
{
$this->results->removeElement($result);
@@ -507,28 +531,4 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
return $this;
}
/**
* @return Collection|User[]
*/
public function getReferrers(): Collection
{
return $this->referrers;
}
public function addReferrer(User $referrer): self
{
if (!$this->referrers->contains($referrer)) {
$this->referrers[] = $referrer;
}
return $this;
}
public function removeReferrer(User $referrer): self
{
$this->referrers->removeElement($referrer);
return $this;
}
}