From e717cfaa8ba274c90136607d37eecca2da28f202 Mon Sep 17 00:00:00 2001 From: Radya Date: Tue, 22 Nov 2016 15:57:09 +0700 Subject: [PATCH] Downgrade php --- src/Bot.php | 6 +++--- src/PHPTelebot.php | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Bot.php b/src/Bot.php index 14da698..c4324d0 100644 --- a/src/Bot.php +++ b/src/Bot.php @@ -23,7 +23,7 @@ class Bot * * @return array|bool */ - public static function send(string $action = 'sendMessage', array $data = []) + public static function send($action = 'sendMessage', $data = []) { $upload = false; $actionUpload = ['sendPhoto', 'sendAudio', 'sendDocument', 'sendSticker', 'sendVideo', 'sendVoice']; @@ -99,7 +99,7 @@ public static function send(string $action = 'sendMessage', array $data = []) * * @return string */ - public static function answerInlineQuery(array $results, array $options = []) + public static function answerInlineQuery($results, $options = []) { if (!empty($options)) { $data = $options; @@ -123,7 +123,7 @@ public static function answerInlineQuery(array $results, array $options = []) * * @return string */ - public static function answerCallbackQuery(string $text, array $options = []) + public static function answerCallbackQuery($text, $options = []) { $options['text'] = $text; diff --git a/src/PHPTelebot.php b/src/PHPTelebot.php index adeabb3..b5cf1cb 100644 --- a/src/PHPTelebot.php +++ b/src/PHPTelebot.php @@ -60,7 +60,7 @@ class PHPTelebot * @param string $token * @param string $username */ - public function __construct(string $token, string $username = '') + public function __construct($token, $username = '') { // Check php version if (version_compare(phpversion(), '5.4', '<')) { @@ -87,7 +87,7 @@ public function __construct(string $token, string $username = '') * @param string $command * @param callable|string $answer */ - public function cmd(string $command, $answer) + public function cmd($command, $answer) { if ($command != '*') { $this->_command[$command] = $answer; @@ -103,7 +103,7 @@ public function cmd(string $command, $answer) * @param string $types * @param callable|string $answer */ - public function on(string $types, $answer) + public function on($types, $answer) { $types = explode('|', $types); foreach ($types as $type) { @@ -117,7 +117,7 @@ public function on(string $types, $answer) * @param string $regex * @param callable|string $answer */ - public function regex(string $regex, $answer) + public function regex($regex, $answer) { $this->_command['customRegex:'.$regex] = $answer; }