Passed
Branch master (792fcf)
by Mohammadreza
09:50
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
             var_dump(curl_error($this->ch));
52
-        }else{
52
+        } else{
53 53
             $res=json_decode($res);
54 54
             if ($res->ok){
55 55
                 $res=$res->result;
@@ -366,8 +366,9 @@  discard block
 block discarded – undo
366 366
      */
367 367
     public function getFileLink($file_path)
368 368
     {
369
-        if (is_object($file_path))
370
-            $file_path=$file_path->file_path;
369
+        if (is_object($file_path)) {
370
+                    $file_path=$file_path->file_path;
371
+        }
371 372
         return 'https://api.telegram.org/file/bot'.$this->token.'/'.$file_path;
372 373
     }
373 374
 
Please login to merge, or discard this patch.