示例#1
0
 public function addContributionTo(Repository $repository, $score)
 {
     $contribution = new Contribution($this, $repository, $score);
     $repository->getContributions()->add($contribution);
     $this->contributions->add($contribution);
 }
示例#2
0
 public function addMembership(PlaysInTeam $playsInTeam)
 {
     if (!$this->memberships->contains($playsInTeam)) {
         $this->memberships->add($playsInTeam);
     }
 }