@@ 63-75 (lines=13) @@ | ||
60 | $this->userRepository = $userRepository; |
|
61 | } |
|
62 | ||
63 | public function acceptInvitationById($invitationId) |
|
64 | { |
|
65 | $invitation = $this->invitationRepository->find($invitationId); |
|
66 | ||
67 | if ($invitation === null) { |
|
68 | throw new \Exception(sprintf( |
|
69 | 'Invitation with id %d doesn\'t exist. Maybe it\'s from different tenant?', |
|
70 | $invitationId |
|
71 | )); |
|
72 | } |
|
73 | ||
74 | return $this->acceptInvitation($invitation); |
|
75 | } |
|
76 | ||
77 | /** |
|
78 | * @param InvitationInterface $invitation |
|
@@ 106-118 (lines=13) @@ | ||
103 | } |
|
104 | } |
|
105 | ||
106 | public function rejectInvitationById($invitationId) |
|
107 | { |
|
108 | $invitation = $this->invitationRepository->find($invitationId); |
|
109 | ||
110 | if ($invitation === null) { |
|
111 | throw new \Exception(sprintf( |
|
112 | 'Invitation with id %d doesn\'t exist. Maybe it\'s from different tenant?', |
|
113 | $invitationId |
|
114 | )); |
|
115 | } |
|
116 | ||
117 | return $this->rejectInvitation($invitation); |
|
118 | } |
|
119 | ||
120 | public function rejectInvitation(InvitationInterface $invitation) |
|
121 | { |