@@ 562-571 (lines=10) @@ | ||
559 | $location, |
|
560 | $contactInformation |
|
561 | )); |
|
562 | } elseif ($role->equals(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RAA))) { |
|
563 | $this->apply(new IdentityAccreditedAsRaaEvent( |
|
564 | $this->id, |
|
565 | $this->nameId, |
|
566 | $this->institution, |
|
567 | $role, |
|
568 | $location, |
|
569 | $contactInformation |
|
570 | )); |
|
571 | } else { |
|
572 | throw new DomainException('An Identity can only be accredited with either the RA or RAA role'); |
|
573 | } |
|
574 | } |
|
@@ 613-615 (lines=3) @@ | ||
610 | ||
611 | if ($role->equals(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RA))) { |
|
612 | $this->apply(new AppointedAsRaEvent($this->id, $this->institution, $this->nameId)); |
|
613 | } elseif ($role->equals(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RAA))) { |
|
614 | $this->apply(new AppointedAsRaaEvent($this->id, $this->institution, $this->nameId)); |
|
615 | } else { |
|
616 | throw new DomainException('An Identity can only be appointed as either RA or RAA'); |
|
617 | } |
|
618 | } |