Skip to content

Commit 2c71f74

Browse files
committed
ParseMode should be added to methods not to Types
1 parent 24172a6 commit 2c71f74

26 files changed

Lines changed: 115 additions & 133 deletions

src/Layers/Generated.php

Lines changed: 21 additions & 20 deletions
Large diffs are not rendered by default.

src/Telegram/InlineQueryResultAudio.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
namespace Telepath\Telegram;
88

9-
use Telepath\Support\ParseMode\ParseMode;
10-
119
/**
1210
* Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use <em>input_message_content</em> to send a message with the specified content instead of the audio.
1311
*/
@@ -26,7 +24,7 @@ class InlineQueryResultAudio extends InlineQueryResult
2624
public ?string $caption = null;
2725

2826
/** <em>Optional</em>. Mode for parsing entities in the audio caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. */
29-
public ParseMode|string|null $parse_mode = null;
27+
public ?string $parse_mode = null;
3028

3129
/**
3230
* <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
@@ -49,7 +47,7 @@ class InlineQueryResultAudio extends InlineQueryResult
4947
* @param string $audio_url A valid URL for the audio file
5048
* @param string $title Title
5149
* @param string $caption <em>Optional</em>. Caption, 0-1024 characters after entities parsing
52-
* @param ParseMode|string $parse_mode <em>Optional</em>. Mode for parsing entities in the audio caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
50+
* @param string $parse_mode <em>Optional</em>. Mode for parsing entities in the audio caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
5351
* @param MessageEntity[] $caption_entities <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
5452
* @param string $performer <em>Optional</em>. Performer
5553
* @param int $audio_duration <em>Optional</em>. Audio duration in seconds
@@ -61,7 +59,7 @@ public static function make(
6159
string $audio_url,
6260
string $title,
6361
?string $caption = null,
64-
ParseMode|string|null $parse_mode = null,
62+
?string $parse_mode = null,
6563
?array $caption_entities = null,
6664
?string $performer = null,
6765
?int $audio_duration = null,

src/Telegram/InlineQueryResultCachedAudio.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
namespace Telepath\Telegram;
88

9-
use Telepath\Support\ParseMode\ParseMode;
10-
119
/**
1210
* Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use <em>input_message_content</em> to send a message with the specified content instead of the audio.
1311
*/
@@ -23,7 +21,7 @@ class InlineQueryResultCachedAudio extends InlineQueryResult
2321
public ?string $caption = null;
2422

2523
/** <em>Optional</em>. Mode for parsing entities in the audio caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. */
26-
public ParseMode|string|null $parse_mode = null;
24+
public ?string $parse_mode = null;
2725

2826
/**
2927
* <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
@@ -39,7 +37,7 @@ class InlineQueryResultCachedAudio extends InlineQueryResult
3937
* @param string $id Unique identifier for this result, 1-64 bytes
4038
* @param string $audio_file_id A valid file identifier for the audio file
4139
* @param string $caption <em>Optional</em>. Caption, 0-1024 characters after entities parsing
42-
* @param ParseMode|string $parse_mode <em>Optional</em>. Mode for parsing entities in the audio caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
40+
* @param string $parse_mode <em>Optional</em>. Mode for parsing entities in the audio caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
4341
* @param MessageEntity[] $caption_entities <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
4442
* @param InlineKeyboardMarkup $reply_markup <em>Optional</em>. <a href="https://core.telegram.org/bots/features#inline-keyboards">Inline keyboard</a> attached to the message
4543
* @param InputMessageContent $input_message_content <em>Optional</em>. Content of the message to be sent instead of the audio
@@ -48,7 +46,7 @@ public static function make(
4846
string $id,
4947
string $audio_file_id,
5048
?string $caption = null,
51-
ParseMode|string|null $parse_mode = null,
49+
?string $parse_mode = null,
5250
?array $caption_entities = null,
5351
?InlineKeyboardMarkup $reply_markup = null,
5452
?InputMessageContent $input_message_content = null,

src/Telegram/InlineQueryResultCachedDocument.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
namespace Telepath\Telegram;
88

9-
use Telepath\Support\ParseMode\ParseMode;
10-
119
/**
1210
* Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use <em>input_message_content</em> to send a message with the specified content instead of the file.
1311
*/
@@ -29,7 +27,7 @@ class InlineQueryResultCachedDocument extends InlineQueryResult
2927
public ?string $caption = null;
3028

3129
/** <em>Optional</em>. Mode for parsing entities in the document caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. */
32-
public ParseMode|string|null $parse_mode = null;
30+
public ?string $parse_mode = null;
3331

3432
/**
3533
* <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
@@ -47,7 +45,7 @@ class InlineQueryResultCachedDocument extends InlineQueryResult
4745
* @param string $document_file_id A valid file identifier for the file
4846
* @param string $description <em>Optional</em>. Short description of the result
4947
* @param string $caption <em>Optional</em>. Caption of the document to be sent, 0-1024 characters after entities parsing
50-
* @param ParseMode|string $parse_mode <em>Optional</em>. Mode for parsing entities in the document caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
48+
* @param string $parse_mode <em>Optional</em>. Mode for parsing entities in the document caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
5149
* @param MessageEntity[] $caption_entities <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
5250
* @param InlineKeyboardMarkup $reply_markup <em>Optional</em>. <a href="https://core.telegram.org/bots/features#inline-keyboards">Inline keyboard</a> attached to the message
5351
* @param InputMessageContent $input_message_content <em>Optional</em>. Content of the message to be sent instead of the file
@@ -58,7 +56,7 @@ public static function make(
5856
string $document_file_id,
5957
?string $description = null,
6058
?string $caption = null,
61-
ParseMode|string|null $parse_mode = null,
59+
?string $parse_mode = null,
6260
?array $caption_entities = null,
6361
?InlineKeyboardMarkup $reply_markup = null,
6462
?InputMessageContent $input_message_content = null,

src/Telegram/InlineQueryResultCachedGif.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
namespace Telepath\Telegram;
88

9-
use Telepath\Support\ParseMode\ParseMode;
10-
119
/**
1210
* Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use <em>input_message_content</em> to send a message with specified content instead of the animation.
1311
*/
@@ -26,7 +24,7 @@ class InlineQueryResultCachedGif extends InlineQueryResult
2624
public ?string $caption = null;
2725

2826
/** <em>Optional</em>. Mode for parsing entities in the caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. */
29-
public ParseMode|string|null $parse_mode = null;
27+
public ?string $parse_mode = null;
3028

3129
/**
3230
* <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
@@ -46,7 +44,7 @@ class InlineQueryResultCachedGif extends InlineQueryResult
4644
* @param string $gif_file_id A valid file identifier for the GIF file
4745
* @param string $title <em>Optional</em>. Title for the result
4846
* @param string $caption <em>Optional</em>. Caption of the GIF file to be sent, 0-1024 characters after entities parsing
49-
* @param ParseMode|string $parse_mode <em>Optional</em>. Mode for parsing entities in the caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
47+
* @param string $parse_mode <em>Optional</em>. Mode for parsing entities in the caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
5048
* @param MessageEntity[] $caption_entities <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
5149
* @param bool $show_caption_above_media <em>Optional</em>. Pass <em>True</em>, if the caption must be shown above the message media
5250
* @param InlineKeyboardMarkup $reply_markup <em>Optional</em>. <a href="https://core.telegram.org/bots/features#inline-keyboards">Inline keyboard</a> attached to the message
@@ -57,7 +55,7 @@ public static function make(
5755
string $gif_file_id,
5856
?string $title = null,
5957
?string $caption = null,
60-
ParseMode|string|null $parse_mode = null,
58+
?string $parse_mode = null,
6159
?array $caption_entities = null,
6260
?bool $show_caption_above_media = null,
6361
?InlineKeyboardMarkup $reply_markup = null,

src/Telegram/InlineQueryResultCachedMpeg4Gif.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
namespace Telepath\Telegram;
88

9-
use Telepath\Support\ParseMode\ParseMode;
10-
119
/**
1210
* Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use <em>input_message_content</em> to send a message with the specified content instead of the animation.
1311
*/
@@ -26,7 +24,7 @@ class InlineQueryResultCachedMpeg4Gif extends InlineQueryResult
2624
public ?string $caption = null;
2725

2826
/** <em>Optional</em>. Mode for parsing entities in the caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. */
29-
public ParseMode|string|null $parse_mode = null;
27+
public ?string $parse_mode = null;
3028

3129
/**
3230
* <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
@@ -46,7 +44,7 @@ class InlineQueryResultCachedMpeg4Gif extends InlineQueryResult
4644
* @param string $mpeg4_file_id A valid file identifier for the MPEG4 file
4745
* @param string $title <em>Optional</em>. Title for the result
4846
* @param string $caption <em>Optional</em>. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing
49-
* @param ParseMode|string $parse_mode <em>Optional</em>. Mode for parsing entities in the caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
47+
* @param string $parse_mode <em>Optional</em>. Mode for parsing entities in the caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
5048
* @param MessageEntity[] $caption_entities <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
5149
* @param bool $show_caption_above_media <em>Optional</em>. Pass <em>True</em>, if the caption must be shown above the message media
5250
* @param InlineKeyboardMarkup $reply_markup <em>Optional</em>. <a href="https://core.telegram.org/bots/features#inline-keyboards">Inline keyboard</a> attached to the message
@@ -57,7 +55,7 @@ public static function make(
5755
string $mpeg4_file_id,
5856
?string $title = null,
5957
?string $caption = null,
60-
ParseMode|string|null $parse_mode = null,
58+
?string $parse_mode = null,
6159
?array $caption_entities = null,
6260
?bool $show_caption_above_media = null,
6361
?InlineKeyboardMarkup $reply_markup = null,

src/Telegram/InlineQueryResultCachedPhoto.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
namespace Telepath\Telegram;
88

9-
use Telepath\Support\ParseMode\ParseMode;
10-
119
/**
1210
* Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use <em>input_message_content</em> to send a message with the specified content instead of the photo.
1311
*/
@@ -29,7 +27,7 @@ class InlineQueryResultCachedPhoto extends InlineQueryResult
2927
public ?string $caption = null;
3028

3129
/** <em>Optional</em>. Mode for parsing entities in the photo caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. */
32-
public ParseMode|string|null $parse_mode = null;
30+
public ?string $parse_mode = null;
3331

3432
/**
3533
* <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
@@ -50,7 +48,7 @@ class InlineQueryResultCachedPhoto extends InlineQueryResult
5048
* @param string $title <em>Optional</em>. Title for the result
5149
* @param string $description <em>Optional</em>. Short description of the result
5250
* @param string $caption <em>Optional</em>. Caption of the photo to be sent, 0-1024 characters after entities parsing
53-
* @param ParseMode|string $parse_mode <em>Optional</em>. Mode for parsing entities in the photo caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
51+
* @param string $parse_mode <em>Optional</em>. Mode for parsing entities in the photo caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
5452
* @param MessageEntity[] $caption_entities <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
5553
* @param bool $show_caption_above_media <em>Optional</em>. Pass <em>True</em>, if the caption must be shown above the message media
5654
* @param InlineKeyboardMarkup $reply_markup <em>Optional</em>. <a href="https://core.telegram.org/bots/features#inline-keyboards">Inline keyboard</a> attached to the message
@@ -62,7 +60,7 @@ public static function make(
6260
?string $title = null,
6361
?string $description = null,
6462
?string $caption = null,
65-
ParseMode|string|null $parse_mode = null,
63+
?string $parse_mode = null,
6664
?array $caption_entities = null,
6765
?bool $show_caption_above_media = null,
6866
?InlineKeyboardMarkup $reply_markup = null,

src/Telegram/InlineQueryResultCachedVideo.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
namespace Telepath\Telegram;
88

9-
use Telepath\Support\ParseMode\ParseMode;
10-
119
/**
1210
* Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use <em>input_message_content</em> to send a message with the specified content instead of the video.
1311
*/
@@ -29,7 +27,7 @@ class InlineQueryResultCachedVideo extends InlineQueryResult
2927
public ?string $caption = null;
3028

3129
/** <em>Optional</em>. Mode for parsing entities in the video caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. */
32-
public ParseMode|string|null $parse_mode = null;
30+
public ?string $parse_mode = null;
3331

3432
/**
3533
* <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
@@ -50,7 +48,7 @@ class InlineQueryResultCachedVideo extends InlineQueryResult
5048
* @param string $title Title for the result
5149
* @param string $description <em>Optional</em>. Short description of the result
5250
* @param string $caption <em>Optional</em>. Caption of the video to be sent, 0-1024 characters after entities parsing
53-
* @param ParseMode|string $parse_mode <em>Optional</em>. Mode for parsing entities in the video caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
51+
* @param string $parse_mode <em>Optional</em>. Mode for parsing entities in the video caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
5452
* @param MessageEntity[] $caption_entities <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
5553
* @param bool $show_caption_above_media <em>Optional</em>. Pass <em>True</em>, if the caption must be shown above the message media
5654
* @param InlineKeyboardMarkup $reply_markup <em>Optional</em>. <a href="https://core.telegram.org/bots/features#inline-keyboards">Inline keyboard</a> attached to the message
@@ -62,7 +60,7 @@ public static function make(
6260
string $title,
6361
?string $description = null,
6462
?string $caption = null,
65-
ParseMode|string|null $parse_mode = null,
63+
?string $parse_mode = null,
6664
?array $caption_entities = null,
6765
?bool $show_caption_above_media = null,
6866
?InlineKeyboardMarkup $reply_markup = null,

src/Telegram/InlineQueryResultCachedVoice.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
namespace Telepath\Telegram;
88

9-
use Telepath\Support\ParseMode\ParseMode;
10-
119
/**
1210
* Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use <em>input_message_content</em> to send a message with the specified content instead of the voice message.
1311
*/
@@ -26,7 +24,7 @@ class InlineQueryResultCachedVoice extends InlineQueryResult
2624
public ?string $caption = null;
2725

2826
/** <em>Optional</em>. Mode for parsing entities in the voice message caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. */
29-
public ParseMode|string|null $parse_mode = null;
27+
public ?string $parse_mode = null;
3028

3129
/**
3230
* <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
@@ -43,7 +41,7 @@ class InlineQueryResultCachedVoice extends InlineQueryResult
4341
* @param string $voice_file_id A valid file identifier for the voice message
4442
* @param string $title Voice message title
4543
* @param string $caption <em>Optional</em>. Caption, 0-1024 characters after entities parsing
46-
* @param ParseMode|string $parse_mode <em>Optional</em>. Mode for parsing entities in the voice message caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
44+
* @param string $parse_mode <em>Optional</em>. Mode for parsing entities in the voice message caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
4745
* @param MessageEntity[] $caption_entities <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
4846
* @param InlineKeyboardMarkup $reply_markup <em>Optional</em>. <a href="https://core.telegram.org/bots/features#inline-keyboards">Inline keyboard</a> attached to the message
4947
* @param InputMessageContent $input_message_content <em>Optional</em>. Content of the message to be sent instead of the voice message
@@ -53,7 +51,7 @@ public static function make(
5351
string $voice_file_id,
5452
string $title,
5553
?string $caption = null,
56-
ParseMode|string|null $parse_mode = null,
54+
?string $parse_mode = null,
5755
?array $caption_entities = null,
5856
?InlineKeyboardMarkup $reply_markup = null,
5957
?InputMessageContent $input_message_content = null,

0 commit comments

Comments
 (0)