@@ 485-494 (lines=10) @@ | ||
482 | $location, |
|
483 | $contactInformation |
|
484 | )); |
|
485 | } elseif ($role->equals(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RAA))) { |
|
486 | $this->apply(new IdentityAccreditedAsRaaEvent( |
|
487 | $this->id, |
|
488 | $this->nameId, |
|
489 | $this->institution, |
|
490 | $role, |
|
491 | $location, |
|
492 | $contactInformation |
|
493 | )); |
|
494 | } else { |
|
495 | throw new DomainException('An Identity can only be accredited with either the RA or RAA role'); |
|
496 | } |
|
497 | } |
|
@@ 536-538 (lines=3) @@ | ||
533 | ||
534 | if ($role->equals(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RA))) { |
|
535 | $this->apply(new AppointedAsRaEvent($this->id, $this->institution, $this->nameId)); |
|
536 | } elseif ($role->equals(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RAA))) { |
|
537 | $this->apply(new AppointedAsRaaEvent($this->id, $this->institution, $this->nameId)); |
|
538 | } else { |
|
539 | throw new DomainException('An Identity can only be appointed as either RA or RAA'); |
|
540 | } |
|
541 | } |