| Total Complexity | 2 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class SendMessageMethod implements HasParseModeVariableInterface |
||
| 17 | { |
||
| 18 | use FillFromArrayTrait; |
||
| 19 | use SendToChatVariablesTrait; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Text of the message to be sent. |
||
| 23 | * |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | public $text; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width |
||
| 30 | * text or inline URLs in the media caption. |
||
| 31 | * |
||
| 32 | * @var string|null |
||
| 33 | */ |
||
| 34 | public $parseMode; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Optional. Disables link previews for links in this message. |
||
| 38 | * |
||
| 39 | * @var bool|null |
||
| 40 | */ |
||
| 41 | public $disableWebPagePreview; |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param int|string $chatId |
||
| 45 | * @param string $text |
||
| 46 | * @param array|null $data |
||
| 47 | * |
||
| 48 | * @throws \Greenplugin\TelegramBot\Exception\BadArgumentException |
||
| 49 | * |
||
| 50 | * @return SendMessageMethod |
||
| 51 | */ |
||
| 52 | 1 | public static function create($chatId, string $text, array $data = null): SendMessageMethod |
|
| 64 |