@@ -109,6 +109,7 @@ public static function getInput()
109
109
* @todo Take log verbosity into account
110
110
*
111
111
* @param string $string
112
+ *
112
113
* @return mixed
113
114
*/
114
115
private static function log ($ string )
@@ -129,6 +130,7 @@ private static function log($string)
129
130
* Generate general fake server response
130
131
*
131
132
* @param array $data Data to add to fake response
133
+ *
132
134
* @return array Fake response data
133
135
*/
134
136
public static function generateGeneralFakeServerResponse (array $ data = null )
@@ -167,6 +169,7 @@ public static function generateGeneralFakeServerResponse(array $data = null)
167
169
*
168
170
* @param string $action Action to execute
169
171
* @param array|null $data Data to attach to the execution
172
+ *
170
173
* @return mixed Result of the cURL call
171
174
*/
172
175
public static function executeCurl ($ action , array $ data = null )
@@ -227,6 +230,7 @@ public static function executeCurl($action, array $data = null)
227
230
* Download file
228
231
*
229
232
* @param Entities\File $file
233
+ *
230
234
* @return boolean
231
235
*/
232
236
public static function downloadFile (File $ file )
@@ -281,6 +285,7 @@ public static function downloadFile(File $file)
281
285
* Encode file
282
286
*
283
287
* @param string $file
288
+ *
284
289
* @return CURLFile
285
290
*/
286
291
protected static function encodeFile ($ file )
@@ -296,6 +301,7 @@ protected static function encodeFile($file)
296
301
*
297
302
* @param string $action
298
303
* @param array|null $data
304
+ *
299
305
* @return Entities\ServerResponse
300
306
*/
301
307
public static function send ($ action , array $ data = null )
@@ -331,6 +337,7 @@ public static function getMe()
331
337
* @todo Could do with some cleaner recursion
332
338
*
333
339
* @param array $data
340
+ *
334
341
* @return mixed
335
342
*/
336
343
public static function sendMessage (array $ data )
@@ -353,6 +360,7 @@ public static function sendMessage(array $data)
353
360
* Forward message
354
361
*
355
362
* @param array $data
363
+ *
356
364
* @return mixed
357
365
*/
358
366
public static function forwardMessage (array $ data )
@@ -369,6 +377,7 @@ public static function forwardMessage(array $data)
369
377
*
370
378
* @param array $data
371
379
* @param string $file
380
+ *
372
381
* @return mixed
373
382
*/
374
383
public static function sendPhoto (array $ data , $ file = null )
@@ -389,6 +398,7 @@ public static function sendPhoto(array $data, $file = null)
389
398
*
390
399
* @param array $data
391
400
* @param string $file
401
+ *
392
402
* @return mixed
393
403
*/
394
404
public static function sendAudio (array $ data , $ file = null )
@@ -409,6 +419,7 @@ public static function sendAudio(array $data, $file = null)
409
419
*
410
420
* @param array $data
411
421
* @param string $file
422
+ *
412
423
* @return mixed
413
424
*/
414
425
public static function sendDocument (array $ data , $ file = null )
@@ -429,6 +440,7 @@ public static function sendDocument(array $data, $file = null)
429
440
*
430
441
* @param array $data
431
442
* @param string $file
443
+ *
432
444
* @return mixed
433
445
*/
434
446
public static function sendSticker (array $ data , $ file = null )
@@ -449,6 +461,7 @@ public static function sendSticker(array $data, $file = null)
449
461
*
450
462
* @param array $data
451
463
* @param string $file
464
+ *
452
465
* @return mixed
453
466
*/
454
467
public static function sendVideo (array $ data , $ file = null )
@@ -469,6 +482,7 @@ public static function sendVideo(array $data, $file = null)
469
482
*
470
483
* @param array $data
471
484
* @param string $file
485
+ *
472
486
* @return mixed
473
487
*/
474
488
public static function sendVoice (array $ data , $ file = null )
@@ -488,6 +502,7 @@ public static function sendVoice(array $data, $file = null)
488
502
* Send location
489
503
*
490
504
* @param array $data
505
+ *
491
506
* @return mixed
492
507
*/
493
508
public static function sendLocation (array $ data )
@@ -503,6 +518,7 @@ public static function sendLocation(array $data)
503
518
* Send chat action
504
519
*
505
520
* @param array $data
521
+ *
506
522
* @return mixed
507
523
*/
508
524
public static function sendChatAction (array $ data )
@@ -518,6 +534,7 @@ public static function sendChatAction(array $data)
518
534
* Get user profile photos
519
535
*
520
536
* @param array $data
537
+ *
521
538
* @return mixed
522
539
*/
523
540
public static function getUserProfilePhotos (array $ data )
@@ -537,6 +554,7 @@ public static function getUserProfilePhotos(array $data)
537
554
* Get updates
538
555
*
539
556
* @param array $data
557
+ *
540
558
* @return mixed
541
559
*/
542
560
public static function getUpdates (array $ data )
@@ -549,6 +567,7 @@ public static function getUpdates(array $data)
549
567
*
550
568
* @param string $url
551
569
* @param string $file
570
+ *
552
571
* @return mixed
553
572
*/
554
573
public static function setWebhook ($ url = '' , $ file = null )
@@ -566,6 +585,7 @@ public static function setWebhook($url = '', $file = null)
566
585
* Get file
567
586
*
568
587
* @param array $data
588
+ *
569
589
* @return mixed
570
590
*/
571
591
public static function getFile (array $ data )
@@ -581,6 +601,7 @@ public static function getFile(array $data)
581
601
* Answer inline query
582
602
*
583
603
* @param array $data
604
+ *
584
605
* @return mixed
585
606
*/
586
607
public static function answerInlineQuery (array $ data )
@@ -592,6 +613,19 @@ public static function answerInlineQuery(array $data)
592
613
return self ::send ('answerInlineQuery ' , $ data );
593
614
}
594
615
616
+ /**
617
+ * Return an empty Server Response
618
+ *
619
+ * No request to telegram are sent, this function is used in commands that
620
+ * don't need to fire a message after execution
621
+ *
622
+ * @return Entities\ServerResponse
623
+ */
624
+ public static function emptyResponse ()
625
+ {
626
+ return new ServerResponse (['ok ' => true , 'result ' => true ], null );
627
+ }
628
+
595
629
/**
596
630
* Send message to all active chats
597
631
*
@@ -602,6 +636,7 @@ public static function answerInlineQuery(array $data)
602
636
* @param boolean $send_users
603
637
* @param string $date_from
604
638
* @param string $date_to
639
+ *
605
640
* @return array
606
641
*/
607
642
public static function sendToActiveChats (
0 commit comments