1 | <?php |
||
68 | class MemberService { |
||
69 | |||
70 | |||
71 | use TArrayTools; |
||
72 | use TStringTools; |
||
73 | use TNC22Logger; |
||
74 | |||
75 | |||
76 | /** @var CircleRequest */ |
||
77 | private $circleRequest; |
||
78 | |||
79 | /** @var MemberRequest */ |
||
80 | private $memberRequest; |
||
81 | |||
82 | /** @var FederatedUserService */ |
||
83 | private $federatedUserService; |
||
84 | |||
85 | /** @var FederatedEventService */ |
||
86 | private $federatedEventService; |
||
87 | |||
88 | /** @var RemoteStreamService */ |
||
89 | private $remoteStreamService; |
||
90 | |||
91 | |||
92 | /** |
||
93 | * MemberService constructor. |
||
94 | * |
||
95 | * @param CircleRequest $circleRequest |
||
96 | * @param MemberRequest $memberRequest |
||
97 | * @param FederatedUserService $federatedUserService |
||
98 | * @param FederatedEventService $federatedEventService |
||
99 | * @param RemoteStreamService $remoteStreamService |
||
100 | */ |
||
101 | public function __construct( |
||
112 | |||
113 | // |
||
114 | // /** |
||
115 | // * @param Member $member |
||
116 | // * |
||
117 | // * @throws MemberAlreadyExistsException |
||
118 | // */ |
||
119 | // public function saveMember(Member $member) { |
||
120 | // $member->setId($this->token(Member::ID_LENGTH)); |
||
121 | // $this->memberRequest->save($member); |
||
122 | // } |
||
123 | // |
||
124 | |||
125 | |||
126 | /** |
||
127 | * @param string $memberId |
||
128 | * @param string $circleId |
||
129 | * |
||
130 | * @return Member |
||
131 | * @throws InitiatorNotFoundException |
||
132 | * @throws MemberNotFoundException |
||
133 | * @throws RequestBuilderException |
||
134 | */ |
||
135 | public function getMemberById(string $memberId, string $circleId = ''): Member { |
||
159 | |||
160 | |||
161 | /** |
||
162 | * @param string $circleId |
||
163 | * |
||
164 | * @return Member[] |
||
165 | * @throws InitiatorNotFoundException |
||
166 | * @throws RequestBuilderException |
||
167 | */ |
||
168 | public function getMembers(string $circleId): array { |
||
177 | |||
178 | |||
179 | /** |
||
180 | * @param string $circleId |
||
181 | * @param IFederatedUser $federatedUser |
||
182 | * |
||
183 | * @return array |
||
184 | * @throws CircleNotFoundException |
||
185 | * @throws FederatedEventException |
||
186 | * @throws FederatedItemException |
||
187 | * @throws InitiatorNotConfirmedException |
||
188 | * @throws InitiatorNotFoundException |
||
189 | * @throws OwnerNotFoundException |
||
190 | * @throws RemoteNotFoundException |
||
191 | * @throws RemoteResourceNotFoundException |
||
192 | * @throws UnknownRemoteException |
||
193 | * @throws RemoteInstanceException |
||
194 | * @throws RequestBuilderException |
||
195 | */ |
||
196 | public function addMember(string $circleId, FederatedUser $federatedUser): array { |
||
212 | |||
213 | |||
214 | /** |
||
215 | * @param string $circleId |
||
216 | * @param IFederatedUser[] $members |
||
|
|||
217 | * |
||
218 | * @return FederatedUser[] |
||
219 | * @throws CircleNotFoundException |
||
220 | * @throws FederatedEventException |
||
221 | * @throws FederatedItemException |
||
222 | * @throws InitiatorNotConfirmedException |
||
223 | * @throws InitiatorNotFoundException |
||
224 | * @throws OwnerNotFoundException |
||
225 | * @throws RemoteNotFoundException |
||
226 | * @throws RemoteResourceNotFoundException |
||
227 | * @throws UnknownRemoteException |
||
228 | * @throws RemoteInstanceException |
||
229 | * @throws RequestBuilderException |
||
230 | */ |
||
231 | public function addMembers(string $circleId, array $federatedUsers): array { |
||
254 | |||
255 | |||
256 | /** |
||
257 | * @param string $memberId |
||
258 | * |
||
259 | * @return array |
||
260 | * @throws FederatedEventException |
||
261 | * @throws FederatedItemException |
||
262 | * @throws InitiatorNotConfirmedException |
||
263 | * @throws InitiatorNotFoundException |
||
264 | * @throws MemberNotFoundException |
||
265 | * @throws OwnerNotFoundException |
||
266 | * @throws RemoteNotFoundException |
||
267 | * @throws RemoteResourceNotFoundException |
||
268 | * @throws UnknownRemoteException |
||
269 | */ |
||
270 | public function removeMember(string $memberId): array { |
||
283 | |||
284 | /** |
||
285 | * @param string $memberId |
||
286 | * @param int $level |
||
287 | * |
||
288 | * @return array |
||
289 | * @throws FederatedEventException |
||
290 | * @throws InitiatorNotConfirmedException |
||
291 | * @throws InitiatorNotFoundException |
||
292 | * @throws MemberNotFoundException |
||
293 | * @throws OwnerNotFoundException |
||
294 | * @throws RemoteNotFoundException |
||
295 | * @throws RemoteResourceNotFoundException |
||
296 | * @throws UnknownRemoteException |
||
297 | * @throws FederatedItemException |
||
298 | */ |
||
299 | public function memberLevel(string $memberId, int $level): array { |
||
313 | |||
314 | } |
||
315 | |||
316 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.