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