Completed
Branch refactor_entities (da0a94)
by Armando
03:34
created
src/Commands/UserCommands/SurveyCommand.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\AdminCommand;
16 16
 use Longman\TelegramBot\Entities\Message;
17
-use Longman\TelegramBot\Entities\ReplyKeyboardHide;
18 17
 use Longman\TelegramBot\Entities\ReplyKeyboardMarkup;
19 18
 use Longman\TelegramBot\Exception\TelegramException;
20 19
 
Please login to merge, or discard this 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/WhoamiCommand.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,6 @@
 block discarded – undo
13 13
 namespace Longman\TelegramBot\Commands\UserCommands;
14 14
 
15 15
 use Longman\TelegramBot\Commands\UserCommand;
16
-use Longman\TelegramBot\Entities\File;
17 16
 use Longman\TelegramBot\Request;
18 17
 
19 18
 /**
Please login to merge, or discard this patch.
src/Entities/Entity.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     /**
66 66
      * Reflect
67 67
      *
68
-     * @param null $object
68
+     * @param Entity $object
69 69
      *
70 70
      * @return array
71 71
      */
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
     /**
184 184
      * Get a property from the current Entity
185 185
      *
186
-     * @param mixed $property
186
+     * @param string $property
187 187
      * @param mixed $default
188 188
      *
189 189
      * @return mixed
Please login to merge, or discard this patch.
examples/Commands/ImageCommand.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@
 block discarded – undo
47 47
     //return random picture from the telegram->getUploadPath();
48 48
     
49 49
     private function ShowRandomImage($dir) {
50
-		$image_list = scandir($dir);
51
-		return $dir . "/" . $image_list[mt_rand(2, count($image_list) - 1)];
52
-	}
50
+        $image_list = scandir($dir);
51
+        return $dir . "/" . $image_list[mt_rand(2, count($image_list) - 1)];
52
+    }
53 53
 
54 54
 }
Please login to merge, or discard this patch.
examples/Commands/KeyboardCommand.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -45,19 +45,19 @@  discard block
 block discarded – undo
45 45
         $keyboards = [];
46 46
 
47 47
         //0
48
-        $keyboard[] = ['7','8','9'];
49
-        $keyboard[] = ['4','5','6'];
50
-        $keyboard[] = ['1','2','3'];
51
-        $keyboard[] = [' ','0',' '];
48
+        $keyboard[] = ['7', '8', '9'];
49
+        $keyboard[] = ['4', '5', '6'];
50
+        $keyboard[] = ['1', '2', '3'];
51
+        $keyboard[] = [' ', '0', ' '];
52 52
 
53 53
         $keyboards[] = $keyboard;
54 54
         unset($keyboard);
55 55
 
56 56
         //1
57
-        $keyboard[] = ['7','8','9','+'];
58
-        $keyboard[] = ['4','5','6','-'];
59
-        $keyboard[] = ['1','2','3','*'];
60
-        $keyboard[] = [' ','0',' ','/'];
57
+        $keyboard[] = ['7', '8', '9', '+'];
58
+        $keyboard[] = ['4', '5', '6', '-'];
59
+        $keyboard[] = ['1', '2', '3', '*'];
60
+        $keyboard[] = [' ', '0', ' ', '/'];
61 61
 
62 62
         $keyboards[] = $keyboard;
63 63
         unset($keyboard);
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         //3
74 74
         $keyboard[] = ['A'];
75 75
         $keyboard[] = ['B'];
76
-        $keyboard[] = ['C','D'];
76
+        $keyboard[] = ['C', 'D'];
77 77
 
78 78
         $keyboards[] = $keyboard;
79 79
         unset($keyboard);
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
         $data['reply_markup'] = new ReplyKeyboardMarkup(
97 97
             [
98
-                'keyboard' => $keyboards[1] ,
98
+                'keyboard' => $keyboards[1],
99 99
                 'resize_keyboard' => true,
100 100
                 'one_time_keyboard' => false,
101 101
                 'selective' => false
Please login to merge, or discard this patch.
src/Commands/UserCommands/HelpCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
         $command    = trim($message->getText(true));
53 53
 
54 54
         //Only get enabled Admin and User commands
55
-        $commands = array_filter($this->telegram->getCommandsList(), function ($command) {
55
+        $commands = array_filter($this->telegram->getCommandsList(), function($command) {
56 56
             return (!$command->isSystemCommand() && $command->isEnabled());
57 57
         });
58 58
 
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.