From 53e8e612edc4cb635f49e891ef072943dabc5006 Mon Sep 17 00:00:00 2001 From: Ilya Gusev Date: Sun, 20 Sep 2015 01:56:15 +0300 Subject: [PATCH] Refactoring --- src/Types/Document.php | 2 +- src/Types/Message.php | 30 +++++++++++++++--------------- src/Types/Sticker.php | 2 +- src/Types/Update.php | 2 +- src/Types/UserProfilePhotos.php | 2 +- src/Types/Video.php | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/Types/Document.php b/src/Types/Document.php index be36113f..4c2e2876 100644 --- a/src/Types/Document.php +++ b/src/Types/Document.php @@ -22,7 +22,7 @@ class Document extends BaseType implements TypeInterface */ static protected $map = array( 'file_id' => true, - 'thumb' => '\TelegramBot\Api\Types\PhotoSize', + 'thumb' => \TelegramBot\Api\Types\PhotoSize::class, 'file_name' => true, 'mime_type' => true, 'file_size' => true diff --git a/src/Types/Message.php b/src/Types/Message.php index 174b422c..258b7be4 100644 --- a/src/Types/Message.php +++ b/src/Types/Message.php @@ -21,26 +21,26 @@ class Message extends BaseType implements TypeInterface */ static protected $map = array( 'message_id' => true, - 'from' => '\TelegramBot\Api\Types\User', + 'from' => \TelegramBot\Api\Types\User::class, 'date' => true, - 'chat' => '\TelegramBot\Api\Types\Chat', - 'forward_from' => '\TelegramBot\Api\Types\User', + 'chat' => \TelegramBot\Api\Types\Chat::class, + 'forward_from' => \TelegramBot\Api\Types\User::class, 'forward_date' => true, - 'reply_to_message' => '\TelegramBot\Api\Types\Message', + 'reply_to_message' => \TelegramBot\Api\Types\Message::class, 'text' => true, - 'audio' => '\TelegramBot\Api\Types\Audio', - 'document' => '\TelegramBot\Api\Types\Document', - 'photo' => '\TelegramBot\Api\Types\ArrayOfPhotoSize', - 'sticker' => '\TelegramBot\Api\Types\Sticker', - 'video' => '\TelegramBot\Api\Types\Video', - 'voice' => '\TelegramBot\Api\Types\Voice', + 'audio' => \TelegramBot\Api\Types\Audio::class, + 'document' => \TelegramBot\Api\Types\Document::class, + 'photo' => \TelegramBot\Api\Types\ArrayOfPhotoSize::class, + 'sticker' => \TelegramBot\Api\Types\Sticker::class, + 'video' => \TelegramBot\Api\Types\Video::class, + 'voice' => \TelegramBot\Api\Types\Voice::class, 'caption' => true, - 'contact' => '\TelegramBot\Api\Types\Contact', - 'location' => '\TelegramBot\Api\Types\Location', - 'new_chat_participant' => '\TelegramBot\Api\Types\User', - 'left_chat_participant' => '\TelegramBot\Api\Types\User', + 'contact' => \TelegramBot\Api\Types\Contact::class, + 'location' => \TelegramBot\Api\Types\Location::class, + 'new_chat_participant' => \TelegramBot\Api\Types\User::class, + 'left_chat_participant' => \TelegramBot\Api\Types\User::class, 'new_chat_title' => true, - 'new_chat_photo' => '\TelegramBot\Api\Types\ArrayOfPhotoSize', + 'new_chat_photo' => \TelegramBot\Api\Types\ArrayOfPhotoSize::class, 'delete_chat_photo' => true, 'group_chat_created' => true ); diff --git a/src/Types/Sticker.php b/src/Types/Sticker.php index 0dff9326..31aa19ac 100644 --- a/src/Types/Sticker.php +++ b/src/Types/Sticker.php @@ -30,7 +30,7 @@ class Sticker extends BaseType implements TypeInterface 'file_id' => true, 'width' => true, 'height' => true, - 'thumb' => '\TelegramBot\Api\Types\PhotoSize', + 'thumb' => \TelegramBot\Api\Types\PhotoSize::class, 'file_size' => true, ); diff --git a/src/Types/Update.php b/src/Types/Update.php index a559238a..7cb9a2d0 100644 --- a/src/Types/Update.php +++ b/src/Types/Update.php @@ -21,7 +21,7 @@ class Update extends BaseType implements TypeInterface */ static protected $map = array( 'update_id' => true, - 'message' => '\TelegramBot\Api\Types\Message', + 'message' => \TelegramBot\Api\Types\Message::class, ); /** diff --git a/src/Types/UserProfilePhotos.php b/src/Types/UserProfilePhotos.php index 4b4c1f92..eb7cd48d 100644 --- a/src/Types/UserProfilePhotos.php +++ b/src/Types/UserProfilePhotos.php @@ -28,7 +28,7 @@ class UserProfilePhotos extends BaseType implements TypeInterface */ static protected $map = array( 'total_count' => true, - 'photos' => '\TelegramBot\Api\Types\ArrayOfArrayOfPhotoSize', + 'photos' => \TelegramBot\Api\Types\ArrayOfArrayOfPhotoSize::class, ); /** diff --git a/src/Types/Video.php b/src/Types/Video.php index 00f53a78..140d5417 100644 --- a/src/Types/Video.php +++ b/src/Types/Video.php @@ -31,7 +31,7 @@ class Video extends BaseType implements TypeInterface 'width' => true, 'height' => true, 'duration' => true, - 'thumb' => '\TelegramBot\Api\Types\PhotoSize', + 'thumb' => \TelegramBot\Api\Types\PhotoSize::class, 'mime_type' => true, 'file_size' => true );