@@ 498-507 (lines=10) @@ | ||
495 | $location, |
|
496 | $contactInformation |
|
497 | )); |
|
498 | } elseif ($role->equals(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RAA))) { |
|
499 | $this->apply(new IdentityAccreditedAsRaaEvent( |
|
500 | $this->id, |
|
501 | $this->nameId, |
|
502 | $this->institution, |
|
503 | $role, |
|
504 | $location, |
|
505 | $contactInformation |
|
506 | )); |
|
507 | } else { |
|
508 | throw new DomainException('An Identity can only be accredited with either the RA or RAA role'); |
|
509 | } |
|
510 | } |
|
@@ 549-551 (lines=3) @@ | ||
546 | ||
547 | if ($role->equals(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RA))) { |
|
548 | $this->apply(new AppointedAsRaEvent($this->id, $this->institution, $this->nameId)); |
|
549 | } elseif ($role->equals(new RegistrationAuthorityRole(RegistrationAuthorityRole::ROLE_RAA))) { |
|
550 | $this->apply(new AppointedAsRaaEvent($this->id, $this->institution, $this->nameId)); |
|
551 | } else { |
|
552 | throw new DomainException('An Identity can only be appointed as either RA or RAA'); |
|
553 | } |
|
554 | } |