Passed
Push — bot_api_4.4 ( 3e274e )
by Armando
02:21
created
src/Entities/Entity.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -199,8 +199,8 @@
 block discarded – undo
199 199
     public function escapeMarkdown($string)
200 200
     {
201 201
         return str_replace(
202
-            ['[', '`', '*', '_',],
203
-            ['\[', '\`', '\*', '\_',],
202
+            ['[', '`', '*', '_', ],
203
+            ['\[', '\`', '\*', '\_', ],
204 204
             $string
205 205
         );
206 206
     }
Please login to merge, or discard this patch.
src/Commands/AdminCommands/CleanupCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         }
102 102
 
103 103
         // Convert numeric-only values to days.
104
-        array_walk($clean_older_than, function (&$time) use ($custom_time) {
104
+        array_walk($clean_older_than, function(&$time) use ($custom_time) {
105 105
             if (!empty($custom_time)) {
106 106
                 $time = $custom_time;
107 107
             }
@@ -357,9 +357,9 @@  discard block
 block discarded – undo
357 357
                 }
358 358
             }
359 359
 
360
-            $pdo->commit();     // commit changes to the database and end transaction
360
+            $pdo->commit(); // commit changes to the database and end transaction
361 361
         } catch (PDOException $e) {
362
-            $pdo->rollBack();   // rollback changes on exception (useful if you want to track down error - you can't replicate it when some of the data is already deleted...)
362
+            $pdo->rollBack(); // rollback changes on exception (useful if you want to track down error - you can't replicate it when some of the data is already deleted...)
363 363
 
364 364
             $data['text'] = '*Database cleanup failed!* _(check your error logs)_';
365 365
             Request::sendMessage($data);
Please login to merge, or discard this patch.
src/DB.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
         }
291 291
 
292 292
         // Convert each Entity item into an object based on its JSON reflection
293
-        $json_entities = array_map(function ($entity) {
293
+        $json_entities = array_map(function($entity) {
294 294
             return json_decode($entity, true);
295 295
         }, $entities);
296 296
 
@@ -1044,7 +1044,7 @@  discard block
 block discarded – undo
1044 1044
             if (null !== $select['text']) {
1045 1045
                 $text_like = '%' . strtolower($select['text']) . '%';
1046 1046
                 if ($select['users']) {
1047
-                    $where[]          = '(
1047
+                    $where[] = '(
1048 1048
                         LOWER(' . TB_CHAT . '.`title`) LIKE :text1
1049 1049
                         OR LOWER(' . TB_USER . '.`first_name`) LIKE :text2
1050 1050
                         OR LOWER(' . TB_USER . '.`last_name`) LIKE :text3
Please login to merge, or discard this patch.
src/Telegram.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -856,7 +856,7 @@
 block discarded – undo
856 856
     protected function ucfirstUnicode($str, $encoding = 'UTF-8')
857 857
     {
858 858
         return mb_strtoupper(mb_substr($str, 0, 1, $encoding), $encoding)
859
-               . mb_strtolower(mb_substr($str, 1, mb_strlen($str), $encoding), $encoding);
859
+                . mb_strtolower(mb_substr($str, 1, mb_strlen($str), $encoding), $encoding);
860 860
     }
861 861
 
862 862
     /**
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
             }
354 354
 
355 355
             if ($this->last_update_id !== null) {
356
-                $offset = $this->last_update_id + 1;    //As explained in the telegram bot API documentation
356
+                $offset = $this->last_update_id + 1; //As explained in the telegram bot API documentation
357 357
             }
358 358
 
359 359
             $response = Request::getUpdates(
@@ -805,7 +805,7 @@  discard block
 block discarded – undo
805 805
             throw new TelegramException('Hook url is empty!');
806 806
         }
807 807
 
808
-        $data        = array_intersect_key($data, array_flip([
808
+        $data = array_intersect_key($data, array_flip([
809 809
             'certificate',
810 810
             'max_connections',
811 811
             'allowed_updates',
@@ -919,8 +919,8 @@  discard block
 block discarded – undo
919 919
         }
920 920
 
921 921
 
922
-        $this->enableAdmin($bot_id);    // Give bot access to admin commands
923
-        $this->getCommandsList();       // Load full commands list
922
+        $this->enableAdmin($bot_id); // Give bot access to admin commands
923
+        $this->getCommandsList(); // Load full commands list
924 924
 
925 925
         foreach ($commands as $command) {
926 926
             $this->update = new Update(
Please login to merge, or discard this patch.
src/Commands/AdminCommands/SendtochannelCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
                     $notes['state'] = 0;
129 129
                     $this->conversation->update();
130 130
 
131
-                    $keyboard = array_map(function ($channel) {
131
+                    $keyboard = array_map(function($channel) {
132 132
                         return [$channel];
133 133
                     }, $channels);
134 134
 
Please login to merge, or discard this patch.
src/Commands/AdminCommands/SendtoallCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 
62 62
         /** @var ServerResponse[] $results */
63 63
         $results = Request::sendToActiveChats(
64
-            'sendMessage',     //callback function to execute (see Request.php methods)
64
+            'sendMessage', //callback function to execute (see Request.php methods)
65 65
             ['text' => $text], //Param to evaluate the request
66 66
             [
67 67
                 'groups'      => true,
Please login to merge, or discard this patch.
src/Entities/InlineKeyboardButton.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,14 +49,14 @@
 block discarded – undo
49 49
     {
50 50
         return is_array($data) &&
51 51
                array_key_exists('text', $data) && (
52
-                   array_key_exists('url', $data) ||
52
+                    array_key_exists('url', $data) ||
53 53
                    array_key_exists('login_url', $data) ||
54 54
                    array_key_exists('callback_data', $data) ||
55 55
                    array_key_exists('switch_inline_query', $data) ||
56 56
                    array_key_exists('switch_inline_query_current_chat', $data) ||
57 57
                    array_key_exists('callback_game', $data) ||
58 58
                    array_key_exists('pay', $data)
59
-               );
59
+                );
60 60
     }
61 61
 
62 62
     /**
Please login to merge, or discard this patch.
src/TelegramLog.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -281,7 +281,7 @@
 block discarded – undo
281 281
     {
282 282
         // Get the correct logger instance.
283 283
         $logger = null;
284
-        if (in_array($name, ['emergency', 'alert', 'critical', 'error', 'warning', 'notice', 'info', 'debug',], true)) {
284
+        if (in_array($name, ['emergency', 'alert', 'critical', 'error', 'warning', 'notice', 'info', 'debug', ], true)) {
285 285
             $logger = self::$logger;
286 286
         } elseif ($name === 'update') {
287 287
             $logger = self::$update_logger;
Please login to merge, or discard this patch.
src/Entities/UserProfilePhotos.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 
43 43
         if ($these_photos = $this->getProperty('photos')) {
44 44
             foreach ($these_photos as $photos) {
45
-                $all_photos[] = array_map(function ($photo) {
45
+                $all_photos[] = array_map(function($photo) {
46 46
                     return new PhotoSize($photo);
47 47
                 }, $photos);
48 48
             }
Please login to merge, or discard this patch.