| Total Complexity | 2 |
| Total Lines | 59 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class ChatAction extends Model |
||
| 6 | {
|
||
| 7 | |||
| 8 | /** |
||
| 9 | * https://core.telegram.org/bots/api#sendchataction |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | protected $method = 'sendChatAction'; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var array |
||
| 16 | */ |
||
| 17 | protected $required = [ |
||
| 18 | 'chat_id', 'action' |
||
| 19 | ]; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var string|integer |
||
| 23 | */ |
||
| 24 | protected $chat_id; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | protected $action; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Unique identifier for the target chat or username of the target channel |
||
| 33 | * Required parameter |
||
| 34 | * |
||
| 35 | * @param string|integer $chat_id |
||
| 36 | * @return $this |
||
| 37 | */ |
||
| 38 | public function setChatId($chat_id) |
||
| 39 | {
|
||
| 40 | $this->chat_id = $chat_id; |
||
| 41 | return $this; |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Unique identifier for the target chat or username of the target channel |
||
| 46 | * Required parameter |
||
| 47 | * |
||
| 48 | * Type of action to broadcast. Choose one, depending on what the user is about to receive: |
||
| 49 | * typing for text messages |
||
| 50 | * upload_photo for photos |
||
| 51 | * record_video or upload_video for videos |
||
| 52 | * record_audio or upload_audio for audio files |
||
| 53 | * upload_document for general files |
||
| 54 | * find_location for location data |
||
| 55 | * record_video_note or upload_video_note for video notes |
||
| 56 | * |
||
| 57 | * @param string $action |
||
| 58 | * @return $this |
||
| 59 | */ |
||
| 60 | public function setAction(string $action) |
||
| 64 | } |
||
| 65 | |||
| 66 | } |