Passed
Push — master ( 66f18e...deb202 )
by Mohammadreza
02:44 queued 19s
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
     /**
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             $r->description=curl_error($this->ch);
54 54
             $r->errno=curl_errno($this->ch);
55 55
             return $r;
56
-        }else{
56
+        } else{
57 57
             $res=json_decode($res);
58 58
             if ($res->ok){
59 59
                 $res=$res->result;
@@ -404,8 +404,9 @@  discard block
 block discarded – undo
404 404
      */
405 405
     public function getFileLink($file_path)
406 406
     {
407
-        if (is_object($file_path))
408
-            $file_path=$file_path->file_path;
407
+        if (is_object($file_path)) {
408
+                    $file_path=$file_path->file_path;
409
+        }
409 410
         return 'https://api.telegram.org/file/bot'.$this->token.'/'.$file_path;
410 411
     }
411 412
 
Please login to merge, or discard this patch.