Skip to content

Commit

Permalink
Fixed return type
Browse files Browse the repository at this point in the history
  • Loading branch information
TiiFuchs committed May 10, 2022
1 parent 1aedb9a commit 4f12995
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Telegram/BotCommandScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/Telegram/ChatMember.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/Telegram/InlineQueryResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/Telegram/InputMedia.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/Telegram/InputMessageContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/Telegram/MenuButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/Telegram/PassportElementError.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/Types/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
interface Factory
{

public static function factory(array $data): static;
public static function factory(array $data): self;

}
Binary file modified telepathy
Binary file not shown.

0 comments on commit 4f12995

Please sign in to comment.