Passed
Branch main (6b1f09)
by Max Alex
02:26
created
src/Connection.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,30 +11,30 @@  discard block
 block discarded – undo
11 11
 
12 12
     public function __construct($token, $status) {
13 13
 
14
-        if($status == 'producao'){
14
+        if ($status == 'producao') {
15 15
             $this->api_status = false;
16
-        }elseif($status == 'homologacao'){
16
+        }elseif ($status == 'homologacao') {
17 17
             $this->api_status = 1;
18
-        }else{
18
+        }else {
19 19
             die('Tipo de homologação invalida');
20 20
         }
21 21
         $this->api_key = $token;
22 22
         //$this->api_status = PAYMENT['asaas']['status'];
23
-        $this->base_url = "https://" . (($this->api_status) ? 'sandbox' : 'www');
23
+        $this->base_url = "https://".(($this->api_status) ? 'sandbox' : 'www');
24 24
 
25 25
         return $this;
26 26
     }
27 27
 
28 28
 
29
-    public function get($url, $option = false, $custom = false )
29
+    public function get($url, $option = false, $custom = false)
30 30
     {
31 31
 
32 32
         $ch = curl_init();
33
-        curl_setopt($ch, CURLOPT_URL, $this->base_url .'.asaas.com/api/v3'. $url.$option);
33
+        curl_setopt($ch, CURLOPT_URL, $this->base_url.'.asaas.com/api/v3'.$url.$option);
34 34
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
35 35
         curl_setopt($ch, CURLOPT_HEADER, FALSE);
36 36
 
37
-        if(!empty($custom)){
37
+        if (!empty($custom)) {
38 38
             curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $custom);
39 39
         }
40 40
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         $params = json_encode($params);
58 58
         $ch = curl_init();
59 59
 
60
-        curl_setopt($ch, CURLOPT_URL, $this->base_url .'.asaas.com/api/v3'. $url);
60
+        curl_setopt($ch, CURLOPT_URL, $this->base_url.'.asaas.com/api/v3'.$url);
61 61
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
62 62
         curl_setopt($ch, CURLOPT_HEADER, FALSE);
63 63
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@
 block discarded – undo
13 13
 
14 14
         if($status == 'producao'){
15 15
             $this->api_status = false;
16
-        }elseif($status == 'homologacao'){
16
+        } elseif($status == 'homologacao'){
17 17
             $this->api_status = 1;
18
-        }else{
18
+        } else{
19 19
             die('Tipo de homologação invalida');
20 20
         }
21 21
         $this->api_key = $token;
Please login to merge, or discard this patch.