Passed
Branch master (da92ca)
by Dyar
07:20
created
main.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,6 +20,10 @@
 block discarded – undo
20 20
     Get::set($tg->getWebhookUpdates());
21 21
 }
22 22
 
23
-if (Get::$text == 'hi') Send::sendMessage(Get::$chat_id, 'Hello!');
23
+if (Get::$text == 'hi') {
24
+    Send::sendMessage(Get::$chat_id, 'Hello!');
25
+}
24 26
 $admins=explode(',',getenv('ADMINS'));
25
-foreach ($admins as $admin) Send::sendMessage($admin, 'bot is run');
27
+foreach ($admins as $admin) {
28
+    Send::sendMessage($admin, 'bot is run');
29
+}
Please login to merge, or discard this patch.
Hook.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,9 @@
 block discarded – undo
2 2
 declare(strict_types=1);
3 3
 $input = file_get_contents("php://input");
4 4
 if (function_exists('exec')) {
5
-    if (!is_dir('temp')) mkdir('temp',0700);
5
+    if (!is_dir('temp')) {
6
+        mkdir('temp',0700);
7
+    }
6 8
     $temp = "temp/.up_" . rand(0, 1000) . "" . time();
7 9
     file_put_contents($temp, $input);
8 10
     exec("php main.php $temp > /dev/null &");
Please login to merge, or discard this patch.
src/DB/DB.php 1 patch
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,9 +18,13 @@
 block discarded – undo
18 18
     public static function Database()
19 19
     {
20 20
         $DB = getenv('DB');
21
-        if     ($DB == 'json') self::$instance = new Json();
22
-        elseif ($DB == 'mysql') self::$instance = new Mysql();
23
-        elseif ($DB == 'mongodb') self::$instance = new MongoDB();
21
+        if     ($DB == 'json') {
22
+            self::$instance = new Json();
23
+        } elseif ($DB == 'mysql') {
24
+            self::$instance = new Mysql();
25
+        } elseif ($DB == 'mongodb') {
26
+            self::$instance = new MongoDB();
27
+        }
24 28
         return self::$instance;
25 29
 
26 30
     }
Please login to merge, or discard this patch.
src/Get.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,8 +65,11 @@
 block discarded – undo
65 65
     public static function set($input)
66 66
     {
67 67
         if (isset($input->message) || isset($input->edited_message)) {
68
-            if (isset($input->message)) $type = 'message';
69
-            else $type = 'edited_message';
68
+            if (isset($input->message)) {
69
+                $type = 'message';
70
+            } else {
71
+                $type = 'edited_message';
72
+            }
70 73
             //
71 74
             self::$message_id = $input->$type->message_id;
72 75
             //
Please login to merge, or discard this patch.