@@ 613-623 (lines=11) @@ | ||
610 | $contactInformation, |
|
611 | $institution |
|
612 | )); |
|
613 | } elseif ($role->equals(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RAA))) { |
|
614 | $this->apply(new IdentityAccreditedAsRaaForInstitutionEvent( |
|
615 | $this->id, |
|
616 | $this->nameId, |
|
617 | $this->institution, |
|
618 | $role, |
|
619 | $location, |
|
620 | $contactInformation, |
|
621 | $institution |
|
622 | )); |
|
623 | } else { |
|
624 | throw new DomainException('An Identity can only be accredited with either the RA or RAA role'); |
|
625 | } |
|
626 | } |
|
@@ 678-680 (lines=3) @@ | ||
675 | ||
676 | if ($role->equals(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RA))) { |
|
677 | $this->apply(new AppointedAsRaForInstitutionEvent($this->id, $this->institution, $this->nameId, $institution)); |
|
678 | } elseif ($role->equals(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RAA))) { |
|
679 | $this->apply(new AppointedAsRaaForInstitutionEvent($this->id, $this->institution, $this->nameId, $institution)); |
|
680 | } else { |
|
681 | throw new DomainException('An Identity can only be appointed as either RA or RAA'); |
|
682 | } |
|
683 | } |