Fix and simplify dockblocks by removing unnecessary fully qualified class names.

parent e4fcfa79
...@@ -13,6 +13,8 @@ namespace Longman\TelegramBot\Commands\AdminCommands; ...@@ -13,6 +13,8 @@ namespace Longman\TelegramBot\Commands\AdminCommands;
use Longman\TelegramBot\Commands\AdminCommand; use Longman\TelegramBot\Commands\AdminCommand;
use Longman\TelegramBot\DB; use Longman\TelegramBot\DB;
use Longman\TelegramBot\Entities\Chat; use Longman\TelegramBot\Entities\Chat;
use Longman\TelegramBot\Entities\ServerResponse;
use Longman\TelegramBot\Exception\TelegramException;
use Longman\TelegramBot\Request; use Longman\TelegramBot\Request;
class ChatsCommand extends AdminCommand class ChatsCommand extends AdminCommand
...@@ -45,8 +47,8 @@ class ChatsCommand extends AdminCommand ...@@ -45,8 +47,8 @@ class ChatsCommand extends AdminCommand
/** /**
* Command execute method * Command execute method
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function execute() public function execute()
{ {
......
...@@ -12,6 +12,7 @@ namespace Longman\TelegramBot\Commands\AdminCommands; ...@@ -12,6 +12,7 @@ namespace Longman\TelegramBot\Commands\AdminCommands;
use Longman\TelegramBot\Commands\AdminCommand; use Longman\TelegramBot\Commands\AdminCommand;
use Longman\TelegramBot\DB; use Longman\TelegramBot\DB;
use Longman\TelegramBot\Entities\ServerResponse;
use Longman\TelegramBot\Exception\TelegramException; use Longman\TelegramBot\Exception\TelegramException;
use Longman\TelegramBot\Request; use Longman\TelegramBot\Request;
use Longman\TelegramBot\TelegramLog; use Longman\TelegramBot\TelegramLog;
...@@ -338,7 +339,7 @@ class CleanupCommand extends AdminCommand ...@@ -338,7 +339,7 @@ class CleanupCommand extends AdminCommand
/** /**
* Execution if MySQL is required but not available * Execution if MySQL is required but not available
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
* @throws TelegramException * @throws TelegramException
*/ */
public function executeNoDb() public function executeNoDb()
...@@ -358,8 +359,8 @@ class CleanupCommand extends AdminCommand ...@@ -358,8 +359,8 @@ class CleanupCommand extends AdminCommand
/** /**
* Command execute method * Command execute method
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function execute() public function execute()
{ {
......
...@@ -12,6 +12,7 @@ namespace Longman\TelegramBot\Commands\AdminCommands; ...@@ -12,6 +12,7 @@ namespace Longman\TelegramBot\Commands\AdminCommands;
use Longman\TelegramBot\Commands\AdminCommand; use Longman\TelegramBot\Commands\AdminCommand;
use Longman\TelegramBot\DB; use Longman\TelegramBot\DB;
use Longman\TelegramBot\Exception\TelegramException;
use Longman\TelegramBot\Request; use Longman\TelegramBot\Request;
/** /**
...@@ -43,7 +44,7 @@ class DebugCommand extends AdminCommand ...@@ -43,7 +44,7 @@ class DebugCommand extends AdminCommand
* Command execute method * Command execute method
* *
* @return mixed * @return mixed
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function execute() public function execute()
{ {
......
...@@ -13,6 +13,7 @@ namespace Longman\TelegramBot\Commands\AdminCommands; ...@@ -13,6 +13,7 @@ namespace Longman\TelegramBot\Commands\AdminCommands;
use Longman\TelegramBot\Commands\AdminCommand; use Longman\TelegramBot\Commands\AdminCommand;
use Longman\TelegramBot\Entities\Message; use Longman\TelegramBot\Entities\Message;
use Longman\TelegramBot\Entities\ServerResponse; use Longman\TelegramBot\Entities\ServerResponse;
use Longman\TelegramBot\Exception\TelegramException;
use Longman\TelegramBot\Request; use Longman\TelegramBot\Request;
/** /**
...@@ -48,8 +49,8 @@ class SendtoallCommand extends AdminCommand ...@@ -48,8 +49,8 @@ class SendtoallCommand extends AdminCommand
/** /**
* Execute command * Execute command
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function execute() public function execute()
{ {
......
...@@ -15,6 +15,8 @@ use Longman\TelegramBot\Conversation; ...@@ -15,6 +15,8 @@ use Longman\TelegramBot\Conversation;
use Longman\TelegramBot\Entities\Chat; use Longman\TelegramBot\Entities\Chat;
use Longman\TelegramBot\Entities\Keyboard; use Longman\TelegramBot\Entities\Keyboard;
use Longman\TelegramBot\Entities\Message; use Longman\TelegramBot\Entities\Message;
use Longman\TelegramBot\Entities\ServerResponse;
use Longman\TelegramBot\Exception\TelegramException;
use Longman\TelegramBot\Request; use Longman\TelegramBot\Request;
class SendtochannelCommand extends AdminCommand class SendtochannelCommand extends AdminCommand
...@@ -47,15 +49,15 @@ class SendtochannelCommand extends AdminCommand ...@@ -47,15 +49,15 @@ class SendtochannelCommand extends AdminCommand
/** /**
* Conversation Object * Conversation Object
* *
* @var \Longman\TelegramBot\Conversation * @var Conversation
*/ */
protected $conversation; protected $conversation;
/** /**
* Command execute method * Command execute method
* *
* @return \Longman\TelegramBot\Entities\ServerResponse|mixed * @return ServerResponse|mixed
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function execute() public function execute()
{ {
...@@ -272,11 +274,11 @@ class SendtochannelCommand extends AdminCommand ...@@ -272,11 +274,11 @@ class SendtochannelCommand extends AdminCommand
* @todo This method will be moved to a higher level maybe in AdminCommand or Command * @todo This method will be moved to a higher level maybe in AdminCommand or Command
* @todo Looking for a more significant name * @todo Looking for a more significant name
* *
* @param \Longman\TelegramBot\Entities\Message $message * @param Message $message
* @param array $data * @param array $data
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
protected function sendBack(Message $message, array $data) protected function sendBack(Message $message, array $data)
{ {
...@@ -311,12 +313,12 @@ class SendtochannelCommand extends AdminCommand ...@@ -311,12 +313,12 @@ class SendtochannelCommand extends AdminCommand
/** /**
* Publish a message to a channel and return success or failure message in markdown format * Publish a message to a channel and return success or failure message in markdown format
* *
* @param \Longman\TelegramBot\Entities\Message $message * @param Message $message
* @param string|int $channel_id * @param string|int $channel_id
* @param string|null $caption * @param string|null $caption
* *
* @return string * @return string
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
protected function publish(Message $message, $channel_id, $caption = null) protected function publish(Message $message, $channel_id, $caption = null)
{ {
...@@ -351,7 +353,7 @@ class SendtochannelCommand extends AdminCommand ...@@ -351,7 +353,7 @@ class SendtochannelCommand extends AdminCommand
* @todo Why send just to the first found channel? * @todo Why send just to the first found channel?
* *
* @return mixed * @return mixed
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function executeNoDb() public function executeNoDb()
{ {
......
...@@ -16,7 +16,9 @@ use Longman\TelegramBot\Commands\AdminCommand; ...@@ -16,7 +16,9 @@ use Longman\TelegramBot\Commands\AdminCommand;
use Longman\TelegramBot\DB; use Longman\TelegramBot\DB;
use Longman\TelegramBot\Entities\Chat; use Longman\TelegramBot\Entities\Chat;
use Longman\TelegramBot\Entities\PhotoSize; use Longman\TelegramBot\Entities\PhotoSize;
use Longman\TelegramBot\Entities\ServerResponse;
use Longman\TelegramBot\Entities\UserProfilePhotos; use Longman\TelegramBot\Entities\UserProfilePhotos;
use Longman\TelegramBot\Exception\TelegramException;
use Longman\TelegramBot\Request; use Longman\TelegramBot\Request;
/** /**
...@@ -52,8 +54,8 @@ class WhoisCommand extends AdminCommand ...@@ -52,8 +54,8 @@ class WhoisCommand extends AdminCommand
/** /**
* Command execute method * Command execute method
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function execute() public function execute()
{ {
......
...@@ -18,7 +18,9 @@ use Longman\TelegramBot\Entities\Message; ...@@ -18,7 +18,9 @@ use Longman\TelegramBot\Entities\Message;
use Longman\TelegramBot\Entities\Payments\PreCheckoutQuery; use Longman\TelegramBot\Entities\Payments\PreCheckoutQuery;
use Longman\TelegramBot\Entities\Payments\ShippingQuery; use Longman\TelegramBot\Entities\Payments\ShippingQuery;
use Longman\TelegramBot\Entities\Poll; use Longman\TelegramBot\Entities\Poll;
use Longman\TelegramBot\Entities\ServerResponse;
use Longman\TelegramBot\Entities\Update; use Longman\TelegramBot\Entities\Update;
use Longman\TelegramBot\Exception\TelegramException;
use Longman\TelegramBot\Request; use Longman\TelegramBot\Request;
use Longman\TelegramBot\Telegram; use Longman\TelegramBot\Telegram;
...@@ -43,14 +45,14 @@ abstract class Command ...@@ -43,14 +45,14 @@ abstract class Command
/** /**
* Telegram object * Telegram object
* *
* @var \Longman\TelegramBot\Telegram * @var Telegram
*/ */
protected $telegram; protected $telegram;
/** /**
* Update object * Update object
* *
* @var \Longman\TelegramBot\Entities\Update * @var Update
*/ */
protected $update; protected $update;
...@@ -120,8 +122,8 @@ abstract class Command ...@@ -120,8 +122,8 @@ abstract class Command
/** /**
* Constructor * Constructor
* *
* @param \Longman\TelegramBot\Telegram $telegram * @param Telegram $telegram
* @param \Longman\TelegramBot\Entities\Update $update * @param Update $update
*/ */
public function __construct(Telegram $telegram, Update $update = null) public function __construct(Telegram $telegram, Update $update = null)
{ {
...@@ -133,9 +135,9 @@ abstract class Command ...@@ -133,9 +135,9 @@ abstract class Command
/** /**
* Set update object * Set update object
* *
* @param \Longman\TelegramBot\Entities\Update $update * @param Update $update
* *
* @return \Longman\TelegramBot\Commands\Command * @return Command
*/ */
public function setUpdate(Update $update = null) public function setUpdate(Update $update = null)
{ {
...@@ -149,8 +151,8 @@ abstract class Command ...@@ -149,8 +151,8 @@ abstract class Command
/** /**
* Pre-execute command * Pre-execute command
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function preExecute() public function preExecute()
{ {
...@@ -182,16 +184,16 @@ abstract class Command ...@@ -182,16 +184,16 @@ abstract class Command
/** /**
* Execute command * Execute command
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
abstract public function execute(); abstract public function execute();
/** /**
* Execution if MySQL is required but not available * Execution if MySQL is required but not available
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function executeNoDb() public function executeNoDb()
{ {
...@@ -210,7 +212,7 @@ abstract class Command ...@@ -210,7 +212,7 @@ abstract class Command
/** /**
* Get update object * Get update object
* *
* @return \Longman\TelegramBot\Entities\Update * @return Update
*/ */
public function getUpdate() public function getUpdate()
{ {
...@@ -260,7 +262,7 @@ abstract class Command ...@@ -260,7 +262,7 @@ abstract class Command
/** /**
* Get telegram object * Get telegram object
* *
* @return \Longman\TelegramBot\Telegram * @return Telegram
*/ */
public function getTelegram() public function getTelegram()
{ {
...@@ -399,8 +401,8 @@ abstract class Command ...@@ -399,8 +401,8 @@ abstract class Command
* @param string $text * @param string $text
* @param array $data * @param array $data
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function replyToChat($text, array $data = []) public function replyToChat($text, array $data = [])
{ {
...@@ -420,8 +422,8 @@ abstract class Command ...@@ -420,8 +422,8 @@ abstract class Command
* @param string $text * @param string $text
* @param array $data * @param array $data
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function replyToUser($text, array $data = []) public function replyToUser($text, array $data = [])
{ {
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
namespace Longman\TelegramBot\Commands; namespace Longman\TelegramBot\Commands;
use Longman\TelegramBot\Entities\ServerResponse;
use Longman\TelegramBot\Request; use Longman\TelegramBot\Request;
abstract class SystemCommand extends Command abstract class SystemCommand extends Command
...@@ -20,7 +21,7 @@ abstract class SystemCommand extends Command ...@@ -20,7 +21,7 @@ abstract class SystemCommand extends Command
* Although system commands should just work and return a successful ServerResponse, * Although system commands should just work and return a successful ServerResponse,
* each system command can override this method to add custom functionality. * each system command can override this method to add custom functionality.
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
*/ */
public function execute() public function execute()
{ {
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
namespace Longman\TelegramBot\Commands\SystemCommands; namespace Longman\TelegramBot\Commands\SystemCommands;
use Longman\TelegramBot\Commands\SystemCommand; use Longman\TelegramBot\Commands\SystemCommand;
use Longman\TelegramBot\Entities\ServerResponse;
/** /**
* Generic command * Generic command
...@@ -35,7 +36,7 @@ class GenericCommand extends SystemCommand ...@@ -35,7 +36,7 @@ class GenericCommand extends SystemCommand
/** /**
* Command execute method * Command execute method
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
*/ */
public function execute() public function execute()
{ {
......
...@@ -12,6 +12,8 @@ namespace Longman\TelegramBot\Commands\SystemCommands; ...@@ -12,6 +12,8 @@ namespace Longman\TelegramBot\Commands\SystemCommands;
use Longman\TelegramBot\Commands\SystemCommand; use Longman\TelegramBot\Commands\SystemCommand;
use Longman\TelegramBot\Conversation; use Longman\TelegramBot\Conversation;
use Longman\TelegramBot\Entities\ServerResponse;
use Longman\TelegramBot\Exception\TelegramException;
use Longman\TelegramBot\Request; use Longman\TelegramBot\Request;
/** /**
...@@ -42,7 +44,7 @@ class GenericmessageCommand extends SystemCommand ...@@ -42,7 +44,7 @@ class GenericmessageCommand extends SystemCommand
/** /**
* Execution if MySQL is required but not available * Execution if MySQL is required but not available
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
*/ */
public function executeNoDb() public function executeNoDb()
{ {
...@@ -53,8 +55,8 @@ class GenericmessageCommand extends SystemCommand ...@@ -53,8 +55,8 @@ class GenericmessageCommand extends SystemCommand
/** /**
* Execute command * Execute command
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function execute() public function execute()
{ {
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
namespace Longman\TelegramBot; namespace Longman\TelegramBot;
use Longman\TelegramBot\Exception\TelegramException;
/** /**
* Class Conversation * Class Conversation
* *
...@@ -67,7 +69,7 @@ class Conversation ...@@ -67,7 +69,7 @@ class Conversation
* @param int $chat_id * @param int $chat_id
* @param string $command * @param string $command
* *
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function __construct($user_id, $chat_id, $command = null) public function __construct($user_id, $chat_id, $command = null)
{ {
...@@ -100,7 +102,7 @@ class Conversation ...@@ -100,7 +102,7 @@ class Conversation
* Load the conversation from the database * Load the conversation from the database
* *
* @return bool * @return bool
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
protected function load() protected function load()
{ {
...@@ -140,7 +142,7 @@ class Conversation ...@@ -140,7 +142,7 @@ class Conversation
* Start a new conversation if the current command doesn't have one yet * Start a new conversation if the current command doesn't have one yet
* *
* @return bool * @return bool
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
protected function start() protected function start()
{ {
......
...@@ -47,7 +47,7 @@ class Game extends Entity ...@@ -47,7 +47,7 @@ class Game extends Entity
* This method overrides the default getPhoto method * This method overrides the default getPhoto method
* and returns a nice array of PhotoSize objects. * and returns a nice array of PhotoSize objects.
* *
* @return null|\Longman\TelegramBot\Entities\PhotoSize[] * @return null|PhotoSize[]
*/ */
public function getPhoto() public function getPhoto()
{ {
...@@ -62,7 +62,7 @@ class Game extends Entity ...@@ -62,7 +62,7 @@ class Game extends Entity
* This method overrides the default getTextEntities method * This method overrides the default getTextEntities method
* and returns a nice array of MessageEntity objects. * and returns a nice array of MessageEntity objects.
* *
* @return null|\Longman\TelegramBot\Entities\MessageEntity[] * @return null|MessageEntity[]
*/ */
public function getTextEntities() public function getTextEntities()
{ {
......
...@@ -154,9 +154,9 @@ class Keyboard extends Entity ...@@ -154,9 +154,9 @@ class Keyboard extends Entity
/** /**
* Parse a given button to the correct KeyboardButton object type. * Parse a given button to the correct KeyboardButton object type.
* *
* @param array|string|\Longman\TelegramBot\Entities\KeyboardButton $button * @param array|string|KeyboardButton $button
* *
* @return \Longman\TelegramBot\Entities\KeyboardButton|null * @return KeyboardButton|null
*/ */
protected function parseButton($button) protected function parseButton($button)
{ {
...@@ -201,7 +201,7 @@ class Keyboard extends Entity ...@@ -201,7 +201,7 @@ class Keyboard extends Entity
* *
* @param array $data * @param array $data
* *
* @return \Longman\TelegramBot\Entities\Keyboard * @return Keyboard
*/ */
public static function remove(array $data = []) public static function remove(array $data = [])
{ {
...@@ -215,7 +215,7 @@ class Keyboard extends Entity ...@@ -215,7 +215,7 @@ class Keyboard extends Entity
* *
* @param array $data * @param array $data
* *
* @return \Longman\TelegramBot\Entities\Keyboard * @return Keyboard
*/ */
public static function forceReply(array $data = []) public static function forceReply(array $data = [])
{ {
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
namespace Longman\TelegramBot\Entities\Payments; namespace Longman\TelegramBot\Entities\Payments;
use Longman\TelegramBot\Entities\Entity; use Longman\TelegramBot\Entities\Entity;
use Longman\TelegramBot\Entities\ServerResponse;
use Longman\TelegramBot\Entities\User; use Longman\TelegramBot\Entities\User;
use Longman\TelegramBot\Request; use Longman\TelegramBot\Request;
...@@ -48,7 +49,7 @@ class PreCheckoutQuery extends Entity ...@@ -48,7 +49,7 @@ class PreCheckoutQuery extends Entity
* @param bool $ok * @param bool $ok
* @param array $data * @param array $data
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
*/ */
public function answer($ok, array $data = []) public function answer($ok, array $data = [])
{ {
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
namespace Longman\TelegramBot\Entities\Payments; namespace Longman\TelegramBot\Entities\Payments;
use Longman\TelegramBot\Entities\Entity; use Longman\TelegramBot\Entities\Entity;
use Longman\TelegramBot\Entities\ServerResponse;
use Longman\TelegramBot\Entities\User; use Longman\TelegramBot\Entities\User;
use Longman\TelegramBot\Request; use Longman\TelegramBot\Request;
...@@ -45,7 +46,7 @@ class ShippingQuery extends Entity ...@@ -45,7 +46,7 @@ class ShippingQuery extends Entity
* @param bool $ok * @param bool $ok
* @param array $data * @param array $data
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
*/ */
public function answer($ok, array $data = []) public function answer($ok, array $data = [])
{ {
......
...@@ -103,7 +103,7 @@ class ServerResponse extends Entity ...@@ -103,7 +103,7 @@ class ServerResponse extends Entity
* @param array $result * @param array $result
* @param string $bot_username * @param string $bot_username
* *
* @return \Longman\TelegramBot\Entities\Chat|\Longman\TelegramBot\Entities\ChatMember|\Longman\TelegramBot\Entities\File|\Longman\TelegramBot\Entities\Message|\Longman\TelegramBot\Entities\User|\Longman\TelegramBot\Entities\UserProfilePhotos|\Longman\TelegramBot\Entities\WebhookInfo * @return Chat|ChatMember|File|Message|User|UserProfilePhotos|WebhookInfo
*/ */
private function createResultObject(array $result, $bot_username) private function createResultObject(array $result, $bot_username)
{ {
...@@ -133,7 +133,7 @@ class ServerResponse extends Entity ...@@ -133,7 +133,7 @@ class ServerResponse extends Entity
* @param array $result * @param array $result
* @param string $bot_username * @param string $bot_username
* *
* @return \Longman\TelegramBot\Entities\ChatMember[]|\Longman\TelegramBot\Entities\Games\GameHighScore[]|\Longman\TelegramBot\Entities\Message[]|\Longman\TelegramBot\Entities\Update[] * @return ChatMember[]|GameHighScore[]|Message[]|Update[]
*/ */
private function createResultObjects(array $result, $bot_username) private function createResultObjects(array $result, $bot_username)
{ {
......
...@@ -82,10 +82,7 @@ class Update extends Entity ...@@ -82,10 +82,7 @@ class Update extends Entity
/** /**
* Get update content * Get update content
* *
* @return \Longman\TelegramBot\Entities\CallbackQuery * @return CallbackQuery|ChosenInlineResult|InlineQuery|Message
* |\Longman\TelegramBot\Entities\ChosenInlineResult
* |\Longman\TelegramBot\Entities\InlineQuery
* |\Longman\TelegramBot\Entities\Message
*/ */
public function getUpdateContent() public function getUpdateContent()
{ {
......
...@@ -91,7 +91,7 @@ class Request ...@@ -91,7 +91,7 @@ class Request
/** /**
* Telegram object * Telegram object
* *
* @var \Longman\TelegramBot\Telegram * @var Telegram
*/ */
private static $telegram; private static $telegram;
...@@ -105,7 +105,7 @@ class Request ...@@ -105,7 +105,7 @@ class Request
/** /**
* Guzzle Client object * Guzzle Client object
* *
* @var \GuzzleHttp\Client * @var Client
*/ */
private static $client; private static $client;
...@@ -253,7 +253,7 @@ class Request ...@@ -253,7 +253,7 @@ class Request
/** /**
* Initialize * Initialize
* *
* @param \Longman\TelegramBot\Telegram $telegram * @param Telegram $telegram
* *
* @throws TelegramException * @throws TelegramException
*/ */
...@@ -287,7 +287,7 @@ class Request ...@@ -287,7 +287,7 @@ class Request
* Set input from custom input or stdin and return it * Set input from custom input or stdin and return it
* *
* @return string * @return string
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public static function getInput() public static function getInput()
{ {
...@@ -473,7 +473,7 @@ class Request ...@@ -473,7 +473,7 @@ class Request
* @param array $data Data to attach to the execution * @param array $data Data to attach to the execution
* *
* @return string Result of the HTTP Request * @return string Result of the HTTP Request
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public static function execute($action, array $data = []) public static function execute($action, array $data = [])
{ {
...@@ -510,10 +510,10 @@ class Request ...@@ -510,10 +510,10 @@ class Request
/** /**
* Download file * Download file
* *
* @param \Longman\TelegramBot\Entities\File $file * @param File $file
* *
* @return boolean * @return boolean
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public static function downloadFile(File $file) public static function downloadFile(File $file)
{ {
...@@ -554,7 +554,7 @@ class Request ...@@ -554,7 +554,7 @@ class Request
* @param string $file * @param string $file
* *
* @return resource * @return resource
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public static function encodeFile($file) public static function encodeFile($file)
{ {
...@@ -575,8 +575,8 @@ class Request ...@@ -575,8 +575,8 @@ class Request
* @param string $action * @param string $action
* @param array $data * @param array $data
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public static function send($action, array $data = []) public static function send($action, array $data = [])
{ {
...@@ -644,7 +644,7 @@ class Request ...@@ -644,7 +644,7 @@ class Request
* *
* @param array $data * @param array $data
* *
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
private static function ensureNonEmptyData(array $data) private static function ensureNonEmptyData(array $data)
{ {
...@@ -658,7 +658,7 @@ class Request ...@@ -658,7 +658,7 @@ class Request
* *
* @param string $action * @param string $action
* *
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
private static function ensureValidAction($action) private static function ensureValidAction($action)
{ {
...@@ -674,8 +674,8 @@ class Request ...@@ -674,8 +674,8 @@ class Request
* *
* @param array $data * @param array $data
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public static function sendMessage(array $data) public static function sendMessage(array $data)
{ {
...@@ -699,7 +699,7 @@ class Request ...@@ -699,7 +699,7 @@ class Request
* @param string $action * @param string $action
* @param array $data * @param array $data
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
*/ */
public static function __callStatic($action, array $data) public static function __callStatic($action, array $data)
{ {
...@@ -716,7 +716,7 @@ class Request ...@@ -716,7 +716,7 @@ class Request
* No request to telegram are sent, this function is used in commands that * No request to telegram are sent, this function is used in commands that
* don't need to fire a message after execution * don't need to fire a message after execution
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
*/ */
public static function emptyResponse() public static function emptyResponse()
{ {
...@@ -759,7 +759,7 @@ class Request ...@@ -759,7 +759,7 @@ class Request
* @param boolean $enable * @param boolean $enable
* @param array $options * @param array $options
* *
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public static function setLimiter($enable = true, array $options = []) public static function setLimiter($enable = true, array $options = [])
{ {
...@@ -788,7 +788,7 @@ class Request ...@@ -788,7 +788,7 @@ class Request
* @param string $action * @param string $action
* @param array $data * @param array $data
* *
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
private static function limitTelegramRequests($action, array $data = []) private static function limitTelegramRequests($action, array $data = [])
{ {
......
...@@ -70,7 +70,7 @@ class Telegram ...@@ -70,7 +70,7 @@ class Telegram
/** /**
* Current Update object * Current Update object
* *
* @var \Longman\TelegramBot\Entities\Update * @var Update
*/ */
protected $update; protected $update;
...@@ -98,7 +98,7 @@ class Telegram ...@@ -98,7 +98,7 @@ class Telegram
/** /**
* PDO object * PDO object
* *
* @var \PDO * @var PDO
*/ */
protected $pdo; protected $pdo;
...@@ -119,7 +119,7 @@ class Telegram ...@@ -119,7 +119,7 @@ class Telegram
/** /**
* ServerResponse of the last Command execution * ServerResponse of the last Command execution
* *
* @var \Longman\TelegramBot\Entities\ServerResponse * @var ServerResponse
*/ */
protected $last_command_response; protected $last_command_response;
...@@ -151,7 +151,7 @@ class Telegram ...@@ -151,7 +151,7 @@ class Telegram
* @param string $api_key * @param string $api_key
* @param string $bot_username * @param string $bot_username
* *
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function __construct($api_key, $bot_username = '') public function __construct($api_key, $bot_username = '')
{ {
...@@ -182,8 +182,8 @@ class Telegram ...@@ -182,8 +182,8 @@ class Telegram
* @param string $table_prefix * @param string $table_prefix
* @param string $encoding * @param string $encoding
* *
* @return \Longman\TelegramBot\Telegram * @return Telegram
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function enableMySql(array $credential, $table_prefix = null, $encoding = 'utf8mb4') public function enableMySql(array $credential, $table_prefix = null, $encoding = 'utf8mb4')
{ {
...@@ -200,8 +200,8 @@ class Telegram ...@@ -200,8 +200,8 @@ class Telegram
* @param PDO $external_pdo_connection PDO database object * @param PDO $external_pdo_connection PDO database object
* @param string $table_prefix * @param string $table_prefix
* *
* @return \Longman\TelegramBot\Telegram * @return Telegram
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function enableExternalMySql($external_pdo_connection, $table_prefix = null) public function enableExternalMySql($external_pdo_connection, $table_prefix = null)
{ {
...@@ -216,7 +216,7 @@ class Telegram ...@@ -216,7 +216,7 @@ class Telegram
* Get commands list * Get commands list
* *
* @return array $commands * @return array $commands
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function getCommandsList() public function getCommandsList()
{ {
...@@ -261,7 +261,7 @@ class Telegram ...@@ -261,7 +261,7 @@ class Telegram
* *
* @param string $command * @param string $command
* *
* @return \Longman\TelegramBot\Commands\Command|null * @return Command|null
*/ */
public function getCommandObject($command) public function getCommandObject($command)
{ {
...@@ -284,7 +284,7 @@ class Telegram ...@@ -284,7 +284,7 @@ class Telegram
* *
* @param string $input (json format) * @param string $input (json format)
* *
* @return \Longman\TelegramBot\Telegram * @return Telegram
*/ */
public function setCustomInput($input) public function setCustomInput($input)
{ {
...@@ -306,7 +306,7 @@ class Telegram ...@@ -306,7 +306,7 @@ class Telegram
/** /**
* Get the ServerResponse of the last Command execution * Get the ServerResponse of the last Command execution
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
*/ */
public function getLastCommandResponse() public function getLastCommandResponse()
{ {
...@@ -319,8 +319,8 @@ class Telegram ...@@ -319,8 +319,8 @@ class Telegram
* @param int|null $limit * @param int|null $limit
* @param int|null $timeout * @param int|null $timeout
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function handleGetUpdates($limit = null, $timeout = null) public function handleGetUpdates($limit = null, $timeout = null)
{ {
...@@ -394,7 +394,7 @@ class Telegram ...@@ -394,7 +394,7 @@ class Telegram
* *
* @return bool * @return bool
* *
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function handle() public function handle()
{ {
...@@ -435,10 +435,10 @@ class Telegram ...@@ -435,10 +435,10 @@ class Telegram
/** /**
* Process bot Update request * Process bot Update request
* *
* @param \Longman\TelegramBot\Entities\Update $update * @param Update $update
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function processUpdate(Update $update) public function processUpdate(Update $update)
{ {
...@@ -493,7 +493,7 @@ class Telegram ...@@ -493,7 +493,7 @@ class Telegram
* @param string $command * @param string $command
* *
* @return mixed * @return mixed
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function executeCommand($command) public function executeCommand($command)
{ {
...@@ -534,7 +534,7 @@ class Telegram ...@@ -534,7 +534,7 @@ class Telegram
* *
* @param integer $admin_id Single admin id * @param integer $admin_id Single admin id
* *
* @return \Longman\TelegramBot\Telegram * @return Telegram
*/ */
public function enableAdmin($admin_id) public function enableAdmin($admin_id)
{ {
...@@ -552,7 +552,7 @@ class Telegram ...@@ -552,7 +552,7 @@ class Telegram
* *
* @param array $admin_ids List of admin ids * @param array $admin_ids List of admin ids
* *
* @return \Longman\TelegramBot\Telegram * @return Telegram
*/ */
public function enableAdmins(array $admin_ids) public function enableAdmins(array $admin_ids)
{ {
...@@ -627,7 +627,7 @@ class Telegram ...@@ -627,7 +627,7 @@ class Telegram
* @param string $path Custom commands path to add * @param string $path Custom commands path to add
* @param bool $before If the path should be prepended or appended to the list * @param bool $before If the path should be prepended or appended to the list
* *
* @return \Longman\TelegramBot\Telegram * @return Telegram
*/ */
public function addCommandsPath($path, $before = true) public function addCommandsPath($path, $before = true)
{ {
...@@ -650,7 +650,7 @@ class Telegram ...@@ -650,7 +650,7 @@ class Telegram
* @param array $paths Custom commands paths to add * @param array $paths Custom commands paths to add
* @param bool $before If the paths should be prepended or appended to the list * @param bool $before If the paths should be prepended or appended to the list
* *
* @return \Longman\TelegramBot\Telegram * @return Telegram
*/ */
public function addCommandsPaths(array $paths, $before = true) public function addCommandsPaths(array $paths, $before = true)
{ {
...@@ -676,7 +676,7 @@ class Telegram ...@@ -676,7 +676,7 @@ class Telegram
* *
* @param string $path Custom upload path * @param string $path Custom upload path
* *
* @return \Longman\TelegramBot\Telegram * @return Telegram
*/ */
public function setUploadPath($path) public function setUploadPath($path)
{ {
...@@ -700,7 +700,7 @@ class Telegram ...@@ -700,7 +700,7 @@ class Telegram
* *
* @param string $path Custom download path * @param string $path Custom download path
* *
* @return \Longman\TelegramBot\Telegram * @return Telegram
*/ */
public function setDownloadPath($path) public function setDownloadPath($path)
{ {
...@@ -729,7 +729,7 @@ class Telegram ...@@ -729,7 +729,7 @@ class Telegram
* @param string $command * @param string $command
* @param array $config * @param array $config
* *
* @return \Longman\TelegramBot\Telegram * @return Telegram
*/ */
public function setCommandConfig($command, array $config) public function setCommandConfig($command, array $config)
{ {
...@@ -796,8 +796,8 @@ class Telegram ...@@ -796,8 +796,8 @@ class Telegram
* @param string $url * @param string $url
* @param array $data Optional parameters. * @param array $data Optional parameters.
* *
* @return \Longman\TelegramBot\Entities\ServerResponse * @return ServerResponse
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function setWebhook($url, array $data = []) public function setWebhook($url, array $data = [])
{ {
...@@ -832,7 +832,7 @@ class Telegram ...@@ -832,7 +832,7 @@ class Telegram
* Delete any assigned webhook * Delete any assigned webhook
* *
* @return mixed * @return mixed
* @throws \Longman\TelegramBot\Exception\TelegramException * @throws TelegramException
*/ */
public function deleteWebhook() public function deleteWebhook()
{ {
...@@ -879,7 +879,7 @@ class Telegram ...@@ -879,7 +879,7 @@ class Telegram
* *
* @param array $options * @param array $options
* *
* @return \Longman\TelegramBot\Telegram * @return Telegram
* @throws TelegramException * @throws TelegramException
*/ */
public function enableLimiter(array $options = []) public function enableLimiter(array $options = [])
......
...@@ -20,14 +20,14 @@ class TelegramLog ...@@ -20,14 +20,14 @@ class TelegramLog
/** /**
* Monolog instance * Monolog instance
* *
* @var \Monolog\Logger * @var Logger
*/ */
protected static $monolog; protected static $monolog;
/** /**
* Monolog instance for update * Monolog instance for update
* *
* @var \Monolog\Logger * @var Logger
*/ */
protected static $monolog_update; protected static $monolog_update;
...@@ -62,9 +62,9 @@ class TelegramLog ...@@ -62,9 +62,9 @@ class TelegramLog
/** /**
* Initialize Monolog Logger instance, optionally passing an existing one * Initialize Monolog Logger instance, optionally passing an existing one
* *
* @param \Monolog\Logger * @param Logger
* *
* @return \Monolog\Logger * @return Logger
*/ */
public static function initialize(Logger $external_monolog = null) public static function initialize(Logger $external_monolog = null)
{ {
...@@ -93,8 +93,8 @@ class TelegramLog ...@@ -93,8 +93,8 @@ class TelegramLog
* *
* @param string $path * @param string $path
* *
* @return \Monolog\Logger * @return Logger
* @throws \Longman\TelegramBot\Exception\TelegramLogException * @throws TelegramLogException
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
* @throws \Exception * @throws \Exception
*/ */
...@@ -117,8 +117,8 @@ class TelegramLog ...@@ -117,8 +117,8 @@ class TelegramLog
* *
* @param string $path * @param string $path
* *
* @return \Monolog\Logger * @return Logger
* @throws \Longman\TelegramBot\Exception\TelegramLogException * @throws TelegramLogException
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
* @throws \Exception * @throws \Exception
*/ */
...@@ -173,8 +173,8 @@ class TelegramLog ...@@ -173,8 +173,8 @@ class TelegramLog
* *
* @param string $path * @param string $path
* *
* @return \Monolog\Logger * @return Logger
* @throws \Longman\TelegramBot\Exception\TelegramLogException * @throws TelegramLogException
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
* @throws \Exception * @throws \Exception
*/ */
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
namespace Longman\TelegramBot\Tests\Unit\Commands; namespace Longman\TelegramBot\Tests\Unit\Commands;
use Longman\TelegramBot\Commands\Command;
use Longman\TelegramBot\Telegram; use Longman\TelegramBot\Telegram;
use Longman\TelegramBot\Tests\Unit\TestCase; use Longman\TelegramBot\Tests\Unit\TestCase;
use Longman\TelegramBot\Tests\Unit\TestHelpers; use Longman\TelegramBot\Tests\Unit\TestHelpers;
use Longman\TelegramBot\Commands\Command;
/** /**
* @package TelegramTest * @package TelegramTest
...@@ -30,22 +30,22 @@ class CommandTest extends TestCase ...@@ -30,22 +30,22 @@ class CommandTest extends TestCase
private $command_namespace = Command::class; private $command_namespace = Command::class;
/** /**
* @var \Longman\TelegramBot\Telegram * @var Telegram
*/ */
private $telegram; private $telegram;
/** /**
* @var \Longman\TelegramBot\Commands\Command * @var Command
*/ */
private $command_stub; private $command_stub;
/** /**
* @var \Longman\TelegramBot\Telegram * @var Telegram
*/ */
private $telegram_with_config; private $telegram_with_config;
/** /**
* @var \Longman\TelegramBot\Commands\Command * @var Command
*/ */
private $command_stub_with_config; private $command_stub_with_config;
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
namespace Longman\TelegramBot\Tests\Unit\Commands; namespace Longman\TelegramBot\Tests\Unit\Commands;
use Longman\TelegramBot\Commands\Command;
use Longman\TelegramBot\Telegram; use Longman\TelegramBot\Telegram;
use Longman\TelegramBot\Tests\Unit\TestCase; use Longman\TelegramBot\Tests\Unit\TestCase;
...@@ -23,12 +24,12 @@ use Longman\TelegramBot\Tests\Unit\TestCase; ...@@ -23,12 +24,12 @@ use Longman\TelegramBot\Tests\Unit\TestCase;
class CommandTestCase extends TestCase class CommandTestCase extends TestCase
{ {
/** /**
* @var \Longman\TelegramBot\Telegram * @var Telegram
*/ */
protected $telegram; protected $telegram;
/** /**
* @var \Longman\TelegramBot\Commands\Command * @var Command
*/ */
protected $command; protected $command;
......
...@@ -23,7 +23,7 @@ use Longman\TelegramBot\Telegram; ...@@ -23,7 +23,7 @@ use Longman\TelegramBot\Telegram;
class ConversationTest extends TestCase class ConversationTest extends TestCase
{ {
/** /**
* @var \Longman\TelegramBot\Telegram * @var Telegram
*/ */
private $telegram; private $telegram;
......
...@@ -12,15 +12,15 @@ ...@@ -12,15 +12,15 @@
namespace Longman\TelegramBot\Tests\Unit; namespace Longman\TelegramBot\Tests\Unit;
use Longman\TelegramBot\Entities\File;
use Longman\TelegramBot\Entities\Message; use Longman\TelegramBot\Entities\Message;
use Longman\TelegramBot\Entities\PhotoSize;
use Longman\TelegramBot\Entities\ServerResponse; use Longman\TelegramBot\Entities\ServerResponse;
use Longman\TelegramBot\Request;
use Longman\TelegramBot\Entities\Sticker; use Longman\TelegramBot\Entities\Sticker;
use Longman\TelegramBot\Entities\StickerSet; use Longman\TelegramBot\Entities\StickerSet;
use Longman\TelegramBot\Entities\File;
use Longman\TelegramBot\Entities\PhotoSize;
use Longman\TelegramBot\Entities\UserProfilePhotos;
use Longman\TelegramBot\Entities\Update; use Longman\TelegramBot\Entities\Update;
use Longman\TelegramBot\Entities\UserProfilePhotos;
use Longman\TelegramBot\Request;
/** /**
* @package TelegramTest * @package TelegramTest
......
...@@ -22,7 +22,7 @@ use Longman\TelegramBot\Telegram; ...@@ -22,7 +22,7 @@ use Longman\TelegramBot\Telegram;
class TelegramTest extends TestCase class TelegramTest extends TestCase
{ {
/** /**
* @var \Longman\TelegramBot\Telegram * @var Telegram
*/ */
private $telegram; private $telegram;
......
...@@ -85,7 +85,7 @@ class TestHelpers ...@@ -85,7 +85,7 @@ class TestHelpers
* *
* @param array $data Pass custom data array if needed * @param array $data Pass custom data array if needed
* *
* @return \Longman\TelegramBot\Entities\Update * @return Update
*/ */
public static function getFakeUpdateObject($data = null) public static function getFakeUpdateObject($data = null)
{ {
...@@ -107,7 +107,7 @@ class TestHelpers ...@@ -107,7 +107,7 @@ class TestHelpers
* *
* @param string $command_text * @param string $command_text
* *
* @return \Longman\TelegramBot\Entities\Update * @return Update
*/ */
public static function getFakeUpdateCommandObject($command_text) public static function getFakeUpdateCommandObject($command_text)
{ {
...@@ -129,7 +129,7 @@ class TestHelpers ...@@ -129,7 +129,7 @@ class TestHelpers
* *
* @param array $data Pass custom data array if needed * @param array $data Pass custom data array if needed
* *
* @return \Longman\TelegramBot\Entities\User * @return User
*/ */
public static function getFakeUserObject(array $data = []) public static function getFakeUserObject(array $data = [])
{ {
...@@ -143,7 +143,7 @@ class TestHelpers ...@@ -143,7 +143,7 @@ class TestHelpers
* *
* @param array $data Pass custom data array if needed * @param array $data Pass custom data array if needed
* *
* @return \Longman\TelegramBot\Entities\Chat * @return Chat
*/ */
public static function getFakeChatObject(array $data = []) public static function getFakeChatObject(array $data = [])
{ {
...@@ -179,7 +179,7 @@ class TestHelpers ...@@ -179,7 +179,7 @@ class TestHelpers
* @param array $user_data Pass custom user data array if needed * @param array $user_data Pass custom user data array if needed
* @param array $chat_data Pass custom chat data array if needed * @param array $chat_data Pass custom chat data array if needed
* *
* @return \Longman\TelegramBot\Entities\Message * @return Message
*/ */
public static function getFakeMessageObject(array $message_data = [], array $user_data = [], array $chat_data = []) public static function getFakeMessageObject(array $message_data = [], array $user_data = [], array $chat_data = [])
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment