Passed
Push — main ( e8ebe8...e1a2dc )
by Miaad
01:30
created
receiver/multi/curl.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@
 block discarded – undo
12 12
     public static function init (): string {
13 13
         if (self::checkIP()) {
14 14
             return self::getUpdate();
15
-        }
16
-        else {
15
+        } else {
17 16
             logger::write('not authorized access denied. IP : '. $_SERVER['REMOTE_ADDR'] ?? 'unknown','error');
18 17
             BPT::exit();
19 18
         }
Please login to merge, or discard this patch.
receiver/multi/exec.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@
 block discarded – undo
22 22
             $update = file_get_contents($up);
23 23
             unlink($up);
24 24
             return $update;
25
-        }
26
-        else {
25
+        } else {
27 26
             logger::write('not authorized access denied. IP : '. $_SERVER['REMOTE_ADDR'] ?? 'unknown','error');
28 27
             BPT::exit();
29 28
         }
Please login to merge, or discard this patch.
receiver/webhook.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -13,14 +13,12 @@  discard block
 block discarded – undo
13 13
     public static function init () {
14 14
         if (settings::$multi) {
15 15
             multi::init();
16
-        }
17
-        else {
16
+        } else {
18 17
             if (lock::exist('BPT-HOOK')) {
19 18
                 receiver::telegramVerify();
20 19
                 BPT::$update = receiver::processUpdate();
21 20
                 logger::write('Update received , lets process it ;)');
22
-            }
23
-            else {
21
+            } else {
24 22
                 self::deleteOldLocks();
25 23
                 self::checkURL();
26 24
                 self::setCertificate();
@@ -48,8 +46,7 @@  discard block
 block discarded – undo
48 46
             lock::set('BPT');
49 47
             logger::write('Webhook was set successfully','info');
50 48
             BPT::exit('Done');
51
-        }
52
-        else {
49
+        } else {
53 50
             logger::write("There is some problem happened , telegram response : \n".json_encode($res),'error');
54 51
             BPT::exit(print_r($res,true));
55 52
         }
@@ -71,8 +68,7 @@  discard block
 block discarded – undo
71 68
             if (is_string(settings::$certificate)) {
72 69
                 if (file_exists(settings::$certificate)) {
73 70
                     settings::$certificate = new CURLFile(settings::$certificate);
74
-                }
75
-                else {
71
+                } else {
76 72
                     settings::$certificate = null;
77 73
                 }
78 74
             }
Please login to merge, or discard this patch.
receiver/multi.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,11 +12,9 @@
 block discarded – undo
12 12
     public static function init() {
13 13
         if (lock::exist('BPT-MULTI-EXEC')) {
14 14
             self::setUpdate(exec::init());
15
-        }
16
-        elseif(lock::exist('BPT-MULTI-CURL')) {
15
+        } elseif(lock::exist('BPT-MULTI-CURL')) {
17 16
             self::setUpdate(curl::init());
18
-        }
19
-        else {
17
+        } else {
20 18
             self::deleteOldLocks();
21 19
             self::checkURL();
22 20
             self::setCertificate();
Please login to merge, or discard this patch.