Passed
Branch master (66f18e)
by Mohammadreza
05:15 queued 14s
created
tgmethod.php 1 patch
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
         if (strlen($this->token)==45 && count(explode(':',$this->token))==2){
23 23
             $this->ch = curl_init();
24 24
             return true;
25
+        } else {
26
+                    return false;
25 27
         }
26
-        else
27
-            return false;
28 28
     }
29 29
 
30 30
     /**
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $res = curl_exec($this->ch);
50 50
         if(curl_error($this->ch)){
51 51
             return false;
52
-        }else{
52
+        } else{
53 53
             $res=json_decode($res);
54 54
             if ($res->ok){
55 55
                 $res=$res->result;
@@ -400,8 +400,9 @@  discard block
 block discarded – undo
400 400
      */
401 401
     public function getFileLink($file_path)
402 402
     {
403
-        if (is_object($file_path))
404
-            $file_path=$file_path->file_path;
403
+        if (is_object($file_path)) {
404
+                    $file_path=$file_path->file_path;
405
+        }
405 406
         return 'https://api.telegram.org/file/bot'.$this->token.'/'.$file_path;
406 407
     }
407 408
 
Please login to merge, or discard this patch.