Completed
Push — feature/improve-code ( e986a1...36787d )
by Avtandil
14:14
created
examples/getUpdatesCLI.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,10 +21,10 @@
 block discarded – undo
21 21
 
22 22
 // Enter your MySQL database credentials
23 23
 $mysql_credentials = [
24
-   'host'     => 'localhost',
25
-   'user'     => 'dbuser',
26
-   'password' => 'dbpass',
27
-   'database' => 'dbname',
24
+    'host'     => 'localhost',
25
+    'user'     => 'dbuser',
26
+    'password' => 'dbpass',
27
+    'database' => 'dbname',
28 28
 ];
29 29
 
30 30
 try {
Please login to merge, or discard this patch.
src/Commands/AdminCommands/SendtochannelCommand.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@
 block discarded – undo
14 14
 use Longman\TelegramBot\Conversation;
15 15
 use Longman\TelegramBot\Commands\UserCommand;
16 16
 use Longman\TelegramBot\Entities\ForceReply;
17
-use Longman\TelegramBot\Entities\ReplyKeyboardHide;
18 17
 use Longman\TelegramBot\Entities\ReplyKeyboardMarkup;
19 18
 
20 19
 /**
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         // Conversation
75 75
         $this->conversation = new Conversation($user_id, $chat_id, $this->getName());
76 76
 
77
-        $channels = (array)$this->getConfig('your_channel');
77
+        $channels = (array) $this->getConfig('your_channel');
78 78
         if (!isset($this->conversation->notes['state'])) {
79 79
             $state                                        = (count($channels) == 0) ? -1 : 0;
80 80
             $this->conversation->notes['last_message_id'] = $message->getMessageId();
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
                                 'selective'         => true
163 163
                             ]
164 164
                         );
165
-                        $data['reply_markup']  = $reply_keyboard_markup;
165
+                        $data['reply_markup'] = $reply_keyboard_markup;
166 166
 
167 167
                         $data['text'] = 'Would you insert caption?';
168 168
                         if ($this->conversation->notes['last_message_id'] != $message->getMessageId() && !($text == 'Yes' || $text == 'No')) {
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
         if ($text === '') {
267 267
             $data['text'] = 'Usage: /sendtochannel <text>';
268 268
         } else {
269
-            $channels      = (array)$this->getConfig('your_channel');
269
+            $channels      = (array) $this->getConfig('your_channel');
270 270
             $first_channel = $channels[0];
271 271
             $data['text']  = $this->publish(new Message($message->reflect(), 'anystring'), $first_channel);
272 272
         }
Please login to merge, or discard this patch.
src/ConversationDB.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
         }
85 85
 
86 86
         try {
87
-            $sth    = self::$pdo->prepare('INSERT INTO `' . TB_CONVERSATION . '`
87
+            $sth = self::$pdo->prepare('INSERT INTO `' . TB_CONVERSATION . '`
88 88
                 (
89 89
                 `status`, `user_id`, `chat_id`, `command`, `notes`, `created_at`, `updated_at`
90 90
                 )
Please login to merge, or discard this patch.
src/Telegram.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -729,7 +729,7 @@
 block discarded – undo
729 729
     /**
730 730
      * Unset Webhook for bot
731 731
      *
732
-     * @return mixed
732
+     * @return ServerResponse
733 733
      * @throws \Longman\TelegramBot\Exception\TelegramException
734 734
      */
735 735
     public function unsetWebHook()
Please login to merge, or discard this patch.
src/Entities/Entity.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     /**
46 46
      * Reflect
47 47
      *
48
-     * @param null $object
48
+     * @param Entity $object
49 49
      * @return array
50 50
      */
51 51
     public function reflect($object = null)
Please login to merge, or discard this patch.
src/Entities/ServerResponse.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      * ServerResponse constructor.
35 35
      *
36 36
      * @param array $data
37
-     * @param       $bot_name
37
+     * @param       string|null $bot_name
38 38
      */
39 39
     public function __construct(array $data, $bot_name)
40 40
     {
Please login to merge, or discard this patch.
src/Entities/Update.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
     /**
103 103
      * Get update id
104 104
      *
105
-     * @return mixed|null
105
+     * @return integer
106 106
      */
107 107
     public function getUpdateId()
108 108
     {
Please login to merge, or discard this patch.
src/Commands/SystemCommands/CallbackqueryCommand.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     /**
37 37
      * Command execute method
38 38
      *
39
-     * @return mixed
39
+     * @return \Longman\TelegramBot\Entities\ServerResponse
40 40
      */
41 41
     public function execute()
42 42
     {
Please login to merge, or discard this patch.
src/Commands/SystemCommands/ChannelchatcreatedCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     /**
21 21
      * @var string
22 22
      */
23
-    protected $name        = 'Channelchatcreated';
23
+    protected $name = 'Channelchatcreated';
24 24
 
25 25
     /**
26 26
      * @var string
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     /**
31 31
      * @var string
32 32
      */
33
-    protected $version     = '1.0.1';
33
+    protected $version = '1.0.1';
34 34
 
35 35
     /*public function execute()
36 36
     {
Please login to merge, or discard this patch.