| Total Complexity | 2 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class SendVoiceMethod implements HasParseModeVariableInterface |
||
| 19 | { |
||
| 20 | use FillFromArrayTrait; |
||
| 21 | use SendToChatVariablesTrait; |
||
| 22 | use CaptionVariablesTrait; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), |
||
| 26 | * pass an HTTP URL as a String for Telegram to get a file from the Internet, |
||
| 27 | * or upload a new one using multipart/form-data. |
||
| 28 | * |
||
| 29 | * @var InputFileType|string |
||
| 30 | */ |
||
| 31 | public $voice; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Optional Duration of the voice message in seconds. |
||
| 35 | * |
||
| 36 | * @var string|null |
||
| 37 | */ |
||
| 38 | public $duration; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param int|string $chatId |
||
| 42 | * @param InputFileType|string $voice |
||
| 43 | * @param array|null $data |
||
| 44 | * |
||
| 45 | * @throws \Greenplugin\TelegramBot\Exception\BadArgumentException |
||
| 46 | * |
||
| 47 | * @return SendVoiceMethod |
||
| 48 | */ |
||
| 49 | public static function create($chatId, $voice, array $data = null): SendVoiceMethod |
||
| 61 |