public function whenMemberJoinedCommittee(MemberJoinedCommittee $event) { $committee = $this->committees->find((string) $event->committeeId()); $member = $this->members->find($event->memberId()); $committee = $committee->addMember($member->memberId(), $member->firstName(), $member->lastName()); $this->committees->save($committee); }
protected function applyMemberJoinedCommittee(MemberJoinedCommittee $event) { $this->members[] = $event->memberId(); }