Completed
Push — feature/improve-code ( e986a1...36787d )
by Avtandil
14:14
created
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/AdminCommands/SendtochannelCommand.php 1 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/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.
src/Commands/UserCommands/SurveyCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@
 block discarded – undo
224 224
                             'selective'         => true,
225 225
                         ]
226 226
                     );
227
-                    $result               = Request::sendMessage($data);
227
+                    $result = Request::sendMessage($data);
228 228
                     break;
229 229
                 }
230 230
                 $this->conversation->notes['phone_number'] = $message->getContact()->getPhoneNumber();
Please login to merge, or discard this patch.
src/Commands/UserCommands/WeatherCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             throw new TelegramException($e->getMessage());
73 73
         }
74 74
 
75
-        return (string)$response->getBody();
75
+        return (string) $response->getBody();
76 76
     }
77 77
 
78 78
     /**
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             }
91 91
 
92 92
             //http://openweathermap.org/weather-conditions
93
-            $conditions     = [
93
+            $conditions = [
94 94
                 'clear'        => ' ☀️',
95 95
                 'clouds'       => ' ☁️',
96 96
                 'rain'         => ' ☔',
Please login to merge, or discard this patch.