| Total Complexity | 2 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | */ |
||
| 15 | class InputTextMessageContentType extends InputMessageContentType implements HasParseModeVariableInterface |
||
| 16 | { |
||
| 17 | use FillFromArrayTrait; |
||
| 18 | /** |
||
| 19 | * Text of the message to be sent, 1-4096 characters. |
||
| 20 | * |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | public $messageText; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, |
||
| 27 | * fixed-width text or inline URLs in your bot's message. |
||
| 28 | * |
||
| 29 | * @var string|null |
||
| 30 | */ |
||
| 31 | public $parseMode; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Optional. Disables link previews for links in the sent message. |
||
| 35 | * |
||
| 36 | * @var bool|null |
||
| 37 | */ |
||
| 38 | public $disableWebPagePreview; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param string $messageText |
||
| 42 | * @param array|null $data |
||
| 43 | * |
||
| 44 | * @throws \TgBotApi\BotApiBase\Exception\BadArgumentException |
||
| 45 | * |
||
| 46 | * @return InputTextMessageContentType |
||
| 47 | */ |
||
| 48 | public static function create(string $messageText, array $data = null): InputTextMessageContentType |
||
| 49 | { |
||
| 50 | $instance = new static(); |
||
| 51 | $instance->messageText = $messageText; |
||
| 52 | if ($data) { |
||
| 53 | $instance->fill($data); |
||
| 54 | } |
||
| 55 | |||
| 56 | return $instance; |
||
| 59 |