diff --git a/src/Telegram/BotCommandScope.php b/src/Telegram/BotCommandScope.php index 51fb5b5..efb4e03 100644 --- a/src/Telegram/BotCommandScope.php +++ b/src/Telegram/BotCommandScope.php @@ -17,7 +17,7 @@ abstract class BotCommandScope extends Type implements Factory /** Scope type */ public string $type; - public static function factory(array $data): static + public static function factory(array $data): self { return match($data['type']) { 'default' => new BotCommandScopeDefault($data), diff --git a/src/Telegram/ChatMember.php b/src/Telegram/ChatMember.php index 7423802..d4f7c48 100644 --- a/src/Telegram/ChatMember.php +++ b/src/Telegram/ChatMember.php @@ -20,7 +20,7 @@ abstract class ChatMember extends Type implements Factory /** Information about the user */ public User $user; - public static function factory(array $data): static + public static function factory(array $data): self { return match($data['status']) { 'creator' => new ChatMemberOwner($data), diff --git a/src/Telegram/InlineQueryResult.php b/src/Telegram/InlineQueryResult.php index 7eb1da0..beb87fb 100644 --- a/src/Telegram/InlineQueryResult.php +++ b/src/Telegram/InlineQueryResult.php @@ -23,7 +23,7 @@ abstract class InlineQueryResult extends Type implements Factory /** Optional. Inline keyboard attached to the message */ public ?InlineKeyboardMarkup $reply_markup = null; - public static function factory(array $data): static + public static function factory(array $data): self { return match($data['type']) { 'audio' => new InlineQueryResultAudio($data), diff --git a/src/Telegram/InputMedia.php b/src/Telegram/InputMedia.php index 38a2af5..18d02a4 100644 --- a/src/Telegram/InputMedia.php +++ b/src/Telegram/InputMedia.php @@ -32,7 +32,7 @@ abstract class InputMedia extends Type implements Factory */ public ?array $caption_entities = null; - public static function factory(array $data): static + public static function factory(array $data): self { return match($data['type']) { 'animation' => new InputMediaAnimation($data), diff --git a/src/Telegram/InputMessageContent.php b/src/Telegram/InputMessageContent.php index 40b3630..62700c6 100644 --- a/src/Telegram/InputMessageContent.php +++ b/src/Telegram/InputMessageContent.php @@ -14,7 +14,7 @@ */ abstract class InputMessageContent extends Type implements Factory { - public static function factory(array $data): static + public static function factory(array $data): self { return match($data[null]) { '' => new InputInvoiceMessageContent($data), diff --git a/src/Telegram/MenuButton.php b/src/Telegram/MenuButton.php index d8f6ddc..b3482ef 100644 --- a/src/Telegram/MenuButton.php +++ b/src/Telegram/MenuButton.php @@ -17,7 +17,7 @@ abstract class MenuButton extends Type implements Factory /** Type of the button */ public string $type; - public static function factory(array $data): static + public static function factory(array $data): self { return match($data['type']) { 'commands' => new MenuButtonCommands($data), diff --git a/src/Telegram/PassportElementError.php b/src/Telegram/PassportElementError.php index 59f013c..5b90e85 100644 --- a/src/Telegram/PassportElementError.php +++ b/src/Telegram/PassportElementError.php @@ -23,7 +23,7 @@ abstract class PassportElementError extends Type implements Factory /** Error message */ public string $message; - public static function factory(array $data): static + public static function factory(array $data): self { return match($data['source']) { 'data' => new PassportElementErrorDataField($data), diff --git a/src/Types/Factory.php b/src/Types/Factory.php index 8c97855..5069241 100644 --- a/src/Types/Factory.php +++ b/src/Types/Factory.php @@ -5,6 +5,6 @@ interface Factory { - public static function factory(array $data): static; + public static function factory(array $data): self; } \ No newline at end of file diff --git a/telepathy b/telepathy index 1b867e2..487cb58 100755 Binary files a/telepathy and b/telepathy differ