@@ 658-668 (lines=11) @@ | ||
655 | $contactInformation, |
|
656 | $institution |
|
657 | )); |
|
658 | } elseif ($role->equals(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RAA))) { |
|
659 | $this->apply(new IdentityAccreditedAsRaaForInstitutionEvent( |
|
660 | $this->id, |
|
661 | $this->nameId, |
|
662 | $this->institution, |
|
663 | $role, |
|
664 | $location, |
|
665 | $contactInformation, |
|
666 | $institution |
|
667 | )); |
|
668 | } else { |
|
669 | throw new DomainException('An Identity can only be accredited with either the RA or RAA role'); |
|
670 | } |
|
671 | } |
|
@@ 723-725 (lines=3) @@ | ||
720 | ||
721 | if ($role->equals(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RA))) { |
|
722 | $this->apply(new AppointedAsRaForInstitutionEvent($this->id, $this->institution, $this->nameId, $institution)); |
|
723 | } elseif ($role->equals(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RAA))) { |
|
724 | $this->apply(new AppointedAsRaaForInstitutionEvent($this->id, $this->institution, $this->nameId, $institution)); |
|
725 | } else { |
|
726 | throw new DomainException('An Identity can only be appointed as either RA or RAA'); |
|
727 | } |
|
728 | } |