Passed
Push — master ( f107f9...34b1fd )
by Max Alex
01:49
created
src/Transferencia.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -13,35 +13,35 @@
 block discarded – undo
13 13
     }
14 14
 
15 15
 
16
-    public function getAll($parametos = false){
16
+    public function getAll($parametos = false) {
17 17
         $filtro = '';
18
-        if(is_array($parametos)){
19
-            if($parametos){
20
-                foreach($parametos as $key => $f){
21
-                    if(!empty($f)){
22
-                        if($filtro){
18
+        if (is_array($parametos)) {
19
+            if ($parametos) {
20
+                foreach ($parametos as $key => $f) {
21
+                    if (!empty($f)) {
22
+                        if ($filtro) {
23 23
                             $filtro .= '&';
24 24
                         }
25
-                        $filtro .= $key.'='.$f;
25
+                        $filtro .= $key . '=' . $f;
26 26
                     }
27 27
                 }
28
-                $filtro = '?'.$filtro;
28
+                $filtro = '?' . $filtro;
29 29
             }
30 30
         }
31
-        return $this->http->get('/transfers/'.$filtro);
31
+        return $this->http->get('/transfers/' . $filtro);
32 32
         //https://www.asaas.com/api/v3/subscriptions/id/invoices?offset=&limit=&status=
33 33
     }
34 34
 
35
-    public function consultaSaldo(){
35
+    public function consultaSaldo() {
36 36
         return $this->http->get('/finance/getCurrentBalance');
37 37
     }
38 38
 
39
-    public function consultaWalletId(){
39
+    public function consultaWalletId() {
40 40
         return $this->http->get('/wallets');
41 41
     }
42 42
 
43 43
 
44
-    public function conta($dadosConta){
44
+    public function conta($dadosConta) {
45 45
         return $this->http->post('/transfers', $dadosConta);
46 46
     }
47 47
 }
Please login to merge, or discard this patch.
src/Assinatura.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -13,100 +13,100 @@
 block discarded – undo
13 13
     }
14 14
 
15 15
     // Retorna a listagem de assinaturas
16
-    public function getAll(array $filtros){
16
+    public function getAll(array $filtros) {
17 17
         $filtro = '';
18
-        if(is_array($filtros)){
19
-            if($filtros){
20
-                foreach($filtros as $key => $f){
21
-                    if(!empty($f)){
22
-                        if($filtro){
18
+        if (is_array($filtros)) {
19
+            if ($filtros) {
20
+                foreach ($filtros as $key => $f) {
21
+                    if (!empty($f)) {
22
+                        if ($filtro) {
23 23
                             $filtro .= '&';
24 24
                         }
25
-                        $filtro .= $key.'='.$f;
25
+                        $filtro .= $key . '=' . $f;
26 26
                     }
27 27
                 }
28
-                $filtro = '?'.$filtro;
28
+                $filtro = '?' . $filtro;
29 29
             }
30 30
         }
31
-        return $this->http->get('/subscriptions'.$filtro);
31
+        return $this->http->get('/subscriptions' . $filtro);
32 32
 
33 33
     }
34 34
 
35 35
     // Retorna os dados da assinatura de acordo com o Id
36
-    public function getById($id){
37
-        return $this->http->get('/subscriptions/'.$id);
36
+    public function getById($id) {
37
+        return $this->http->get('/subscriptions/' . $id);
38 38
 
39 39
     }
40 40
 
41 41
     // Retorna a listagem de assinaturas de acordo com o Id do Cliente
42
-    public function getByCustomer($customer_id){
43
-        return $this->http->get('/subscriptions?customer='.$customer_id);
42
+    public function getByCustomer($customer_id) {
43
+        return $this->http->get('/subscriptions?customer=' . $customer_id);
44 44
     }
45 45
 
46 46
 
47 47
     // Retorna a listagem de todos os pagamentos da assinatura
48
-    public function getByPayment($subscription_id){
49
-        return $this->http->get('/subscriptions/'.$subscription_id.'/payments');
48
+    public function getByPayment($subscription_id) {
49
+        return $this->http->get('/subscriptions/' . $subscription_id . '/payments');
50 50
     }
51 51
 
52 52
     // Insere uma nova assinatura
53 53
 
54
-    public function create(array $dadosAssinatura){
54
+    public function create(array $dadosAssinatura) {
55 55
         return $this->http->post('/subscriptions', $dadosAssinatura);
56 56
     }
57 57
 
58 58
     // Atualiza os dados da assinatura
59
-    public function update($id, array $dadosAssinatura){
59
+    public function update($id, array $dadosAssinatura) {
60 60
 
61 61
         return $this->http->post('/subscriptions/' . $id, $dadosCliente);
62 62
     }
63 63
 
64
-    public function getNotaFiscal($id, array $parametos){
64
+    public function getNotaFiscal($id, array $parametos) {
65 65
         $filtro = '';
66
-        if(is_array($parametos)){
67
-            if($parametos){
68
-                foreach($parametos as $key => $f){
69
-                    if(!empty($f)){
70
-                        if($filtro){
66
+        if (is_array($parametos)) {
67
+            if ($parametos) {
68
+                foreach ($parametos as $key => $f) {
69
+                    if (!empty($f)) {
70
+                        if ($filtro) {
71 71
                             $filtro .= '&';
72 72
                         }
73
-                        $filtro .= $key.'='.$f;
73
+                        $filtro .= $key . '=' . $f;
74 74
                     }
75 75
                 }
76
-                $filtro = '?'.$filtro;
76
+                $filtro = '?' . $filtro;
77 77
             }
78 78
         }
79
-        return $this->http->get('/subscriptions/'.$id.$filtro);
79
+        return $this->http->get('/subscriptions/' . $id . $filtro);
80 80
         //https://www.asaas.com/api/v3/subscriptions/id/invoices?offset=&limit=&status=
81 81
     }
82 82
 
83
-    public function createNotaFiscal($subscription_id, $dadosAssinatura){
83
+    public function createNotaFiscal($subscription_id, $dadosAssinatura) {
84 84
 
85 85
         return $this->http->post('/subscriptions', $dadosAssinatura);
86 86
         //https://www.asaas.com/api/v3/subscriptions/id/invoiceSettings
87 87
     }
88 88
 
89 89
     // Atualiza Nota Fiscal da assinatura
90
-    public function updateNotaFiscal($subscription_id, $dadosAssinatura){
90
+    public function updateNotaFiscal($subscription_id, $dadosAssinatura) {
91 91
 
92 92
         return $this->http->post('/subscriptions', $dadosAssinatura);
93 93
         //https://www.asaas.com/api/v3/subscriptions/id/invoiceSettings
94 94
     }
95 95
 
96 96
     // Recuperar configuração para emissão de Notas Fiscais
97
-    public function getConfigNotaFiscal($subscription_id){
98
-        return $this->http->get('/subscriptions/'.$subscription_id.'/invoiceSettings');
97
+    public function getConfigNotaFiscal($subscription_id) {
98
+        return $this->http->get('/subscriptions/' . $subscription_id . '/invoiceSettings');
99 99
         //https://www.asaas.com/api/v3/subscriptions/id/invoiceSettings
100 100
     }
101 101
 
102 102
     // Deleta configuração para emissão de Notas Fiscais
103
-    public function deleteConfigNotaFiscal($id){
104
-        return $this->http->get('/subscriptions/'.$subscription_id.'/invoiceSettings','','DELETE');
103
+    public function deleteConfigNotaFiscal($id) {
104
+        return $this->http->get('/subscriptions/' . $subscription_id . '/invoiceSettings', '', 'DELETE');
105 105
     }
106 106
 
107 107
     // Deleta uma assinatura
108
-    public function delete($id){
109
-        return $this->http->get('/subscriptions/'.$id,'','DELETE');
108
+    public function delete($id) {
109
+        return $this->http->get('/subscriptions/' . $id, '', 'DELETE');
110 110
     }
111 111
 
112 112
 }
Please login to merge, or discard this patch.
src/Cobranca.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -14,78 +14,78 @@  discard block
 block discarded – undo
14 14
     }
15 15
 
16 16
     // Retorna a listagem de cobranças
17
-    public function getAll(array $filtros){
17
+    public function getAll(array $filtros) {
18 18
         $filtro = '';
19
-        if(is_array($filtros)){
20
-            if($filtros){
21
-                foreach($filtros as $key => $f){
22
-                    if(!empty($f)){
23
-                        if($filtro){
19
+        if (is_array($filtros)) {
20
+            if ($filtros) {
21
+                foreach ($filtros as $key => $f) {
22
+                    if (!empty($f)) {
23
+                        if ($filtro) {
24 24
                             $filtro .= '&';
25 25
                         }
26
-                        $filtro .= $key.'='.$f;
26
+                        $filtro .= $key . '=' . $f;
27 27
                     }
28 28
                 }
29
-                $filtro = '?'.$filtro;
29
+                $filtro = '?' . $filtro;
30 30
             }
31 31
         }
32
-        return $this->http->get('/cities'.$filtro);
32
+        return $this->http->get('/cities' . $filtro);
33 33
     }
34 34
 
35 35
     // Retorna os dados da cobrança de acordo com o Id
36
-    public function getById($id){
37
-        return $this->http->get('/payments/'.$id);
36
+    public function getById($id) {
37
+        return $this->http->get('/payments/' . $id);
38 38
     }
39 39
 
40 40
     // Retorna a listagem de cobranças de acordo com o Id do Cliente
41
-    public function getByCustomer($customer_id){
42
-        return $this->http->get('/payments?customer='.$customer_id);
41
+    public function getByCustomer($customer_id) {
42
+        return $this->http->get('/payments?customer=' . $customer_id);
43 43
     }
44 44
 
45 45
     // Retorna a listagem de cobranças de acordo com o Id da Assinaturas
46
-    public function getBySubscription($subscription_id){
47
-        return $this->http->get('/payments?subscription='.$subscription_id);
46
+    public function getBySubscription($subscription_id) {
47
+        return $this->http->get('/payments?subscription=' . $subscription_id);
48 48
     }
49 49
 
50 50
     // Insere uma nova cobrança
51
-    public function create(array $dadosCobranca){
51
+    public function create(array $dadosCobranca) {
52 52
         $dadosCobranca = $this->setCobranca($dadosCobranca);
53
-        if(!empty($dadosCobranca['error'])){
53
+        if (!empty($dadosCobranca['error'])) {
54 54
             return $dadosCobranca;
55
-        }else {
55
+        } else {
56 56
             return $this->http->post('/payments', $dadosCobranca);
57 57
         }
58 58
     }
59 59
 
60 60
     // Insere uma nova cobrança parcelada
61
-    public function parcelada(array $dadosCobranca){
61
+    public function parcelada(array $dadosCobranca) {
62 62
 
63 63
     }
64 64
 
65 65
     // Insere uma nova cobrança com split
66 66
         /* Saldo dividido em multiplas contas do Asaas*/
67
-    public function split(array $dadosCobranca){
67
+    public function split(array $dadosCobranca) {
68 68
 
69 69
     }
70 70
 
71 71
     // Atualiza os dados da cobrança
72
-    public function update($id, array $dadosCobranca){
72
+    public function update($id, array $dadosCobranca) {
73 73
 
74 74
         return $this->http->post('/payments/' . $id, $dadosCliente);
75 75
     }
76 76
 
77 77
     // Restaura cobrança removida
78
-    public function restore($id){
78
+    public function restore($id) {
79 79
 
80 80
     }
81 81
 
82 82
     // Estorna cobrança
83
-    public function estorno($id){
83
+    public function estorno($id) {
84 84
 
85 85
     }
86 86
 
87 87
     // Confirmação em dinheiro
88
-    public function confirmacao($id, $dados){
88
+    public function confirmacao($id, $dados) {
89 89
         $data = array(
90 90
             "paymentDate" => "2019-09-03",
91 91
             "value" => 100.00,
@@ -94,8 +94,8 @@  discard block
 block discarded – undo
94 94
     }
95 95
 
96 96
     // Deleta uma cobrança
97
-    public function delete($id){
98
-        return $this->http->get('/payments/'.$id,'','DELETE');
97
+    public function delete($id) {
98
+        return $this->http->get('/payments/' . $id, '', 'DELETE');
99 99
     }
100 100
 
101 101
     /**
Please login to merge, or discard this patch.
src/Notificacao.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -14,47 +14,47 @@
 block discarded – undo
14 14
     }
15 15
 
16 16
     // Retorna a listagem de notificações
17
-    public function getAll(array $filtros){
17
+    public function getAll(array $filtros) {
18 18
         $filtro = '';
19
-        if(is_array($filtros)){
20
-            if($filtros){
21
-                foreach($filtros as $key => $f){
22
-                    if(!empty($f)){
23
-                        if($filtro){
19
+        if (is_array($filtros)) {
20
+            if ($filtros) {
21
+                foreach ($filtros as $key => $f) {
22
+                    if (!empty($f)) {
23
+                        if ($filtro) {
24 24
                             $filtro .= '&';
25 25
                         }
26
-                        $filtro .= $key.'='.$f;
26
+                        $filtro .= $key . '=' . $f;
27 27
                     }
28 28
                 }
29
-                $filtro = '?'.$filtro;
29
+                $filtro = '?' . $filtro;
30 30
             }
31 31
         }
32
-        return $this->http->get('/notifications'.$filtro);
32
+        return $this->http->get('/notifications' . $filtro);
33 33
     }
34 34
     
35 35
     // Retorna os dados da notificação de acordo com o Id
36
-    public function getById($id){
37
-        return $this->http->get('/notifications/'.$id);
36
+    public function getById($id) {
37
+        return $this->http->get('/notifications/' . $id);
38 38
     }
39 39
     
40 40
     // Retorna a listagem de notificações de acordo com o Id do Cliente
41
-    public function getByCustomer($customer_id){
42
-        return $this->http->get('/customers/'.$id.'/notifications');
41
+    public function getByCustomer($customer_id) {
42
+        return $this->http->get('/customers/' . $id . '/notifications');
43 43
     }
44 44
     
45 45
     // Insere uma nova notificação
46
-    public function create(array $dadosNotificacao){
46
+    public function create(array $dadosNotificacao) {
47 47
         return $this->http->post('/notifications', $dadosNotificacao);
48 48
     }
49 49
     
50 50
     // Atualiza os dados da notificação
51
-    public function update($id, array $dadosNotificacao){
51
+    public function update($id, array $dadosNotificacao) {
52 52
         return $this->http->post('/notifications', $dadosNotificacao);
53 53
     }
54 54
 
55 55
     // Deleta uma notificação
56
-    public function delete($id){
57
-        return $this->http->get('/notifications/'.$id,'','DELETE');
56
+    public function delete($id) {
57
+        return $this->http->get('/notifications/' . $id, '', 'DELETE');
58 58
     }
59 59
 
60 60
 }
Please login to merge, or discard this patch.
src/Cidades.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -13,27 +13,27 @@
 block discarded – undo
13 13
     }
14 14
 
15 15
     // Retorna a listagem de cobranças
16
-    public function getAll(array $filtros){
16
+    public function getAll(array $filtros) {
17 17
         $filtro = '';
18
-        if(is_array($filtros)){
19
-            if($filtros){
20
-                foreach($filtros as $key => $f){
21
-                    if(!empty($f)){
22
-                        if($filtro){
18
+        if (is_array($filtros)) {
19
+            if ($filtros) {
20
+                foreach ($filtros as $key => $f) {
21
+                    if (!empty($f)) {
22
+                        if ($filtro) {
23 23
                             $filtro .= '&';
24 24
                         }
25
-                        $filtro .= $key.'='.$f;
25
+                        $filtro .= $key . '=' . $f;
26 26
                     }
27 27
                 }
28
-                $filtro = '?'.$filtro;
28
+                $filtro = '?' . $filtro;
29 29
             }
30 30
         }
31
-        return $this->http->get('/cities'.$filtro);
31
+        return $this->http->get('/cities' . $filtro);
32 32
     }
33 33
 
34 34
     // Retorna os dados da cobrança de acordo com o Id
35
-    public function getById($id){
36
-        return $this->http->get('/cities/'.$id);
35
+    public function getById($id) {
36
+        return $this->http->get('/cities/' . $id);
37 37
     }
38 38
 
39 39
 }
Please login to merge, or discard this patch.