@@ -145,7 +145,7 @@ public function get(array $params = []): array
145
145
/**
146
146
* @throws Exception
147
147
*/
148
- public function find (string $ id ): MsGraphAdmin
148
+ public function find (string $ id ): array
149
149
{
150
150
if ($ this ->userId == null ) {
151
151
throw new Exception ('userid is required. ' );
@@ -154,7 +154,7 @@ public function find(string $id): MsGraphAdmin
154
154
return MsGraphAdmin::get ('users/ ' .$ this ->userId .'/messages/ ' .$ id );
155
155
}
156
156
157
- public function findAttachments (string $ id ): MsGraphAdmin
157
+ public function findAttachments (string $ id ): array
158
158
{
159
159
return MsGraphAdmin::get ('users/ ' .$ this ->userId .'/messages/ ' .$ id .'/attachments ' );
160
160
}
@@ -193,7 +193,7 @@ function (array $m) use ($attachments) {
193
193
/**
194
194
* @throws Exception
195
195
*/
196
- public function send (): MsGraphAdmin
196
+ public function send (): void
197
197
{
198
198
if (strlen ($ this ->userId ) === 0 ) {
199
199
throw new Exception ('userId is required. ' );
@@ -211,13 +211,13 @@ public function send(): MsGraphAdmin
211
211
throw new Exception ('Comment is only used for replies and forwarding, please use body instead. ' );
212
212
}
213
213
214
- return MsGraphAdmin::post ('users/ ' .$ this ->userId .'/sendMail ' , self ::prepareEmail ());
214
+ MsGraphAdmin::post ('users/ ' .$ this ->userId .'/sendMail ' , self ::prepareEmail ());
215
215
}
216
216
217
217
/**
218
218
* @throws Exception
219
219
*/
220
- public function reply (): MsGraphAdmin
220
+ public function reply ()
221
221
{
222
222
if (strlen ($ this ->userId ) === 0 ) {
223
223
throw new Exception ('userId is required. ' );
@@ -231,13 +231,13 @@ public function reply(): MsGraphAdmin
231
231
throw new Exception ('Body is only used for sending new emails, please use comment instead. ' );
232
232
}
233
233
234
- return MsGraphAdmin::post ('users/ ' .$ this ->userId .'/messages/ ' .$ this ->id .'/replyAll ' , self ::prepareEmail ());
234
+ MsGraphAdmin::post ('users/ ' .$ this ->userId .'/messages/ ' .$ this ->id .'/replyAll ' , self ::prepareEmail ());
235
235
}
236
236
237
237
/**
238
238
* @throws Exception
239
239
*/
240
- public function forward (): MsGraphAdmin
240
+ public function forward ()
241
241
{
242
242
if (strlen ($ this ->userId ) === 0 ) {
243
243
throw new Exception ('userId is required. ' );
@@ -251,19 +251,19 @@ public function forward(): MsGraphAdmin
251
251
throw new Exception ('Body is only used for sending new emails, please use comment instead. ' );
252
252
}
253
253
254
- return MsGraphAdmin::post ('users/ ' .$ this ->userId .'/messages/ ' .$ this ->id .'/forward ' , self ::prepareEmail ());
254
+ MsGraphAdmin::post ('users/ ' .$ this ->userId .'/messages/ ' .$ this ->id .'/forward ' , self ::prepareEmail ());
255
255
}
256
256
257
257
/**
258
258
* @throws Exception
259
259
*/
260
- public function delete (string $ id ): MsGraphAdmin
260
+ public function delete (string $ id )
261
261
{
262
262
if ($ this ->userId == null ) {
263
263
throw new Exception ('userId is required. ' );
264
264
}
265
265
266
- return MsGraphAdmin::delete ('users/ ' .$ this ->userId .'/messages/ ' .$ id );
266
+ MsGraphAdmin::delete ('users/ ' .$ this ->userId .'/messages/ ' .$ id );
267
267
}
268
268
269
269
protected function prepareEmail (): array
0 commit comments