@@ 621-631 (lines=11) @@ | ||
618 | $contactInformation, |
|
619 | $institution |
|
620 | )); |
|
621 | } elseif ($role->equals(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RAA))) { |
|
622 | $this->apply(new IdentityAccreditedAsRaaEvent( |
|
623 | $this->id, |
|
624 | $this->nameId, |
|
625 | $this->institution, |
|
626 | $role, |
|
627 | $location, |
|
628 | $contactInformation, |
|
629 | $institution |
|
630 | )); |
|
631 | } else { |
|
632 | throw new DomainException('An Identity can only be accredited with either the RA or RAA role'); |
|
633 | } |
|
634 | } |
|
@@ 682-684 (lines=3) @@ | ||
679 | ||
680 | if ($role->equals(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RA))) { |
|
681 | $this->apply(new AppointedAsRaEvent($this->id, $this->institution, $this->nameId, $institution)); |
|
682 | } elseif ($role->equals(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RAA))) { |
|
683 | $this->apply(new AppointedAsRaaEvent($this->id, $this->institution, $this->nameId, $institution)); |
|
684 | } else { |
|
685 | throw new DomainException('An Identity can only be appointed as either RA or RAA'); |
|
686 | } |
|
687 | } |