@@ 590-599 (lines=10) @@ | ||
587 | $location, |
|
588 | $contactInformation |
|
589 | )); |
|
590 | } elseif ($role->equals(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RAA))) { |
|
591 | $this->apply(new IdentityAccreditedAsRaaEvent( |
|
592 | $this->id, |
|
593 | $this->nameId, |
|
594 | $this->institution, |
|
595 | $role, |
|
596 | $location, |
|
597 | $contactInformation |
|
598 | )); |
|
599 | } else { |
|
600 | throw new DomainException('An Identity can only be accredited with either the RA or RAA role'); |
|
601 | } |
|
602 | } |
|
@@ 641-643 (lines=3) @@ | ||
638 | ||
639 | if ($role->equals(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RA))) { |
|
640 | $this->apply(new AppointedAsRaEvent($this->id, $this->institution, $this->nameId)); |
|
641 | } elseif ($role->equals(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RAA))) { |
|
642 | $this->apply(new AppointedAsRaaEvent($this->id, $this->institution, $this->nameId)); |
|
643 | } else { |
|
644 | throw new DomainException('An Identity can only be appointed as either RA or RAA'); |
|
645 | } |
|
646 | } |