Completed
Push — master ( 741114...78e68a )
by Adriano
09:10
created
src/Integracao/ControlPay/API/IntencaoVendaApi.php 2 patches
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
                 $response->json(),
41 41
                 Contracts\Login\LoginResponse::class
42 42
             );
43
-        }catch (RequestException $ex) {
43
+        } catch (RequestException $ex) {
44 44
             $responseBody = $ex->getResponse()->json();
45 45
             throw new \Exception($responseBody['message']);
46
-        }catch (\Exception $ex){
46
+        } catch (\Exception $ex){
47 47
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
48 48
         }
49 49
     }
@@ -58,10 +58,10 @@  discard block
 block discarded – undo
58 58
             $this->_httpClient->post(__FUNCTION__,[]);
59 59
 
60 60
             return true;
61
-        }catch (RequestException $ex) {
61
+        } catch (RequestException $ex) {
62 62
             $responseBody = $ex->getResponse()->json();
63 63
             throw new \Exception($responseBody['message']);
64
-        }catch (\Exception $ex){
64
+        } catch (\Exception $ex){
65 65
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
66 66
         }
67 67
     }
@@ -82,10 +82,10 @@  discard block
 block discarded – undo
82 82
                 $response->json(),
83 83
                 Contracts\Login\ConsultaLoginResponse::class
84 84
             );
85
-        }catch (RequestException $ex) {
85
+        } catch (RequestException $ex) {
86 86
             $responseBody = $ex->getResponse()->json();
87 87
             throw new \Exception($responseBody['message']);
88
-        }catch (\Exception $ex){
88
+        } catch (\Exception $ex){
89 89
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
90 90
         }
91 91
     }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function getByPessoaId($pessoaId)
32 32
     {
33
-        try{
34
-            $this->response = $this->_httpClient->post(__FUNCTION__,[
33
+        try {
34
+            $this->response = $this->_httpClient->post(__FUNCTION__, [
35 35
                 'query' => $this->addQueryAdditionalParameters([
36 36
                     'pessoaId' => $pessoaId
37 37
                 ])
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             );
44 44
         }catch (RequestException $ex) {
45 45
             $this->requestException($ex);
46
-        }catch (\Exception $ex){
46
+        }catch (\Exception $ex) {
47 47
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
48 48
         }
49 49
     }
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function getById($terminalId)
57 57
     {
58
-        try{
59
-            $this->response = $this->_httpClient->post(__FUNCTION__,[
58
+        try {
59
+            $this->response = $this->_httpClient->post(__FUNCTION__, [
60 60
                 'query' => $this->addQueryAdditionalParameters([
61 61
                     'terminalId' => $terminalId
62 62
                 ])
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             );
69 69
         }catch (RequestException $ex) {
70 70
             $this->requestException($ex);
71
-        }catch (\Exception $ex){
71
+        }catch (\Exception $ex) {
72 72
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
73 73
         }
74 74
     }
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public function insert(Contracts\Terminal\InsertRequest $insertRequest)
82 82
     {
83
-        try{
84
-            $this->response = $this->_httpClient->post(__FUNCTION__,[
83
+        try {
84
+            $this->response = $this->_httpClient->post(__FUNCTION__, [
85 85
                 'body' => json_encode($insertRequest)
86 86
             ]);
87 87
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             );
92 92
         }catch (RequestException $ex) {
93 93
             $this->requestException($ex);
94
-        }catch (\Exception $ex){
94
+        }catch (\Exception $ex) {
95 95
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
96 96
         }
97 97
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/API/PagamentoExternoApi.php 2 patches
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,10 +41,10 @@
 block discarded – undo
41 41
                 $response->json(),
42 42
                 Contracts\Produto\GetByAtivosByPessoaIdResponse::class
43 43
             );
44
-        }catch (RequestException $ex) {
44
+        } catch (RequestException $ex) {
45 45
             $responseBody = $ex->getResponse()->json();
46 46
             throw new \Exception($responseBody['message']);
47
-        }catch (\Exception $ex){
47
+        } catch (\Exception $ex){
48 48
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
49 49
         }
50 50
     }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function getByFiltros(Contracts\PagamentoExterno\GetByFiltrosRequest $getByFiltrosRequest)
32 32
     {
33
-        try{
34
-            $this->response = $this->_httpClient->post(__FUNCTION__,[
33
+        try {
34
+            $this->response = $this->_httpClient->post(__FUNCTION__, [
35 35
                 'body' => json_encode($getByFiltrosRequest),
36 36
             ]);
37 37
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
             );
42 42
         }catch (RequestException $ex) {
43 43
             $this->requestException($ex);
44
-        }catch (\Exception $ex){
44
+        }catch (\Exception $ex) {
45 45
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
46 46
         }
47 47
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/API/TerminalApi.php 2 patches
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
                 $response->json(),
41 41
                 Contracts\Login\LoginResponse::class
42 42
             );
43
-        }catch (RequestException $ex) {
43
+        } catch (RequestException $ex) {
44 44
             $responseBody = $ex->getResponse()->json();
45 45
             throw new \Exception($responseBody['message']);
46
-        }catch (\Exception $ex){
46
+        } catch (\Exception $ex){
47 47
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
48 48
         }
49 49
     }
@@ -58,10 +58,10 @@  discard block
 block discarded – undo
58 58
             $this->_httpClient->post(__FUNCTION__,[]);
59 59
 
60 60
             return true;
61
-        }catch (RequestException $ex) {
61
+        } catch (RequestException $ex) {
62 62
             $responseBody = $ex->getResponse()->json();
63 63
             throw new \Exception($responseBody['message']);
64
-        }catch (\Exception $ex){
64
+        } catch (\Exception $ex){
65 65
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
66 66
         }
67 67
     }
@@ -82,10 +82,10 @@  discard block
 block discarded – undo
82 82
                 $response->json(),
83 83
                 Contracts\Login\ConsultaLoginResponse::class
84 84
             );
85
-        }catch (RequestException $ex) {
85
+        } catch (RequestException $ex) {
86 86
             $responseBody = $ex->getResponse()->json();
87 87
             throw new \Exception($responseBody['message']);
88
-        }catch (\Exception $ex){
88
+        } catch (\Exception $ex){
89 89
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
90 90
         }
91 91
     }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function getByPessoaId($pessoaId)
32 32
     {
33
-        try{
34
-            $this->response = $this->_httpClient->post(__FUNCTION__,[
33
+        try {
34
+            $this->response = $this->_httpClient->post(__FUNCTION__, [
35 35
                 'query' => $this->addQueryAdditionalParameters([
36 36
                     'pessoaId' => $pessoaId
37 37
                 ])
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             );
44 44
         }catch (RequestException $ex) {
45 45
             $this->requestException($ex);
46
-        }catch (\Exception $ex){
46
+        }catch (\Exception $ex) {
47 47
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
48 48
         }
49 49
     }
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function getById($terminalId)
57 57
     {
58
-        try{
59
-            $this->response = $this->_httpClient->post(__FUNCTION__,[
58
+        try {
59
+            $this->response = $this->_httpClient->post(__FUNCTION__, [
60 60
                 'query' => $this->addQueryAdditionalParameters([
61 61
                     'terminalId' => $terminalId
62 62
                 ])
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             );
69 69
         }catch (RequestException $ex) {
70 70
             $this->requestException($ex);
71
-        }catch (\Exception $ex){
71
+        }catch (\Exception $ex) {
72 72
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
73 73
         }
74 74
     }
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public function insert(Contracts\Terminal\InsertRequest $insertRequest)
82 82
     {
83
-        try{
84
-            $this->response = $this->_httpClient->post(__FUNCTION__,[
83
+        try {
84
+            $this->response = $this->_httpClient->post(__FUNCTION__, [
85 85
                 'body' => json_encode($insertRequest)
86 86
             ]);
87 87
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             );
92 92
         }catch (RequestException $ex) {
93 93
             $this->requestException($ex);
94
-        }catch (\Exception $ex){
94
+        }catch (\Exception $ex) {
95 95
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
96 96
         }
97 97
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Venda/VenderRequest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -337,7 +337,7 @@
 block discarded – undo
337 337
     {
338 338
 
339 339
         foreach ($produtosVendidos as $produto)
340
-            $this->produtosVendidos[] = is_array($produto) ? SerializerHelper::denormalize($produto, Produto::class) : $produto;
340
+            $this->produtosVendidos[ ] = is_array($produto) ? SerializerHelper::denormalize($produto, Produto::class) : $produto;
341 341
 
342 342
         return $this;
343 343
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -336,8 +336,9 @@
 block discarded – undo
336 336
     public function setProdutosVendidos($produtosVendidos)
337 337
     {
338 338
 
339
-        foreach ($produtosVendidos as $produto)
340
-            $this->produtosVendidos[] = is_array($produto) ? SerializerHelper::denormalize($produto, Produto::class) : $produto;
339
+        foreach ($produtosVendidos as $produto) {
340
+                    $this->produtosVendidos[] = is_array($produto) ? SerializerHelper::denormalize($produto, Produto::class) : $produto;
341
+        }
341 342
 
342 343
         return $this;
343 344
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/IntencaoVenda/GetByIdResponse.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
     {
63 63
         $this->intencaoVenda = $intencaoVenda;
64 64
 
65
-        if(is_array($this->intencaoVenda))
65
+        if (is_array($this->intencaoVenda))
66 66
             $this->intencaoVenda = SerializerHelper::denormalize($this->intencaoVenda, IntencaoVenda::class);
67 67
 
68 68
         return $this;
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,8 +62,9 @@
 block discarded – undo
62 62
     {
63 63
         $this->intencaoVenda = $intencaoVenda;
64 64
 
65
-        if(is_array($this->intencaoVenda))
66
-            $this->intencaoVenda = SerializerHelper::denormalize($this->intencaoVenda, IntencaoVenda::class);
65
+        if(is_array($this->intencaoVenda)) {
66
+                    $this->intencaoVenda = SerializerHelper::denormalize($this->intencaoVenda, IntencaoVenda::class);
67
+        }
67 68
 
68 69
         return $this;
69 70
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Pedido/GetByFiltrosResponse.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
     /**
46 46
      * @param \DateTime $data
47
-     * @return InserirResponse
47
+     * @return GetByFiltrosResponse
48 48
      */
49 49
     public function setData($data)
50 50
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
     public function setPedidos($pedidos)
68 68
     {
69 69
         foreach ($pedidos as $pedido)
70
-            $this->pedidos[] = SerializerHelper::denormalize($pedido, Pedido::class);
70
+            $this->pedidos[ ] = SerializerHelper::denormalize($pedido, Pedido::class);
71 71
 
72 72
         return $this;
73 73
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,9 @@
 block discarded – undo
66 66
      */
67 67
     public function setPedidos($pedidos)
68 68
     {
69
-        foreach ($pedidos as $pedido)
70
-            $this->pedidos[] = SerializerHelper::denormalize($pedido, Pedido::class);
69
+        foreach ($pedidos as $pedido) {
70
+                    $this->pedidos[] = SerializerHelper::denormalize($pedido, Pedido::class);
71
+        }
71 72
 
72 73
         return $this;
73 74
     }
Please login to merge, or discard this patch.
ControlPay/Contracts/Pedido/GetByPessoaIdByReferenciaResponse.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
     /**
46 46
      * @param \DateTime $data
47
-     * @return InserirResponse
47
+     * @return GetByPessoaIdByReferenciaResponse
48 48
      */
49 49
     public function setData($data)
50 50
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
     public function setPedidos($pedidos)
68 68
     {
69 69
         foreach ($pedidos as $pedido)
70
-            $this->pedidos[] = SerializerHelper::denormalize($pedido, Pedido::class);
70
+            $this->pedidos[ ] = SerializerHelper::denormalize($pedido, Pedido::class);
71 71
 
72 72
         return $this;
73 73
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,9 @@
 block discarded – undo
66 66
      */
67 67
     public function setPedidos($pedidos)
68 68
     {
69
-        foreach ($pedidos as $pedido)
70
-            $this->pedidos[] = SerializerHelper::denormalize($pedido, Pedido::class);
69
+        foreach ($pedidos as $pedido) {
70
+                    $this->pedidos[] = SerializerHelper::denormalize($pedido, Pedido::class);
71
+        }
71 72
 
72 73
         return $this;
73 74
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Pedido/GetPedidosByPessoaIdResponse.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
     /**
46 46
      * @param \DateTime $data
47
-     * @return InserirResponse
47
+     * @return GetPedidosByPessoaIdResponse
48 48
      */
49 49
     public function setData($data)
50 50
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
     public function setPedidos($pedidos)
68 68
     {
69 69
         foreach ($pedidos as $pedido)
70
-            $this->pedidos[] = SerializerHelper::denormalize($pedido, Pedido::class);
70
+            $this->pedidos[ ] = SerializerHelper::denormalize($pedido, Pedido::class);
71 71
 
72 72
         return $this;
73 73
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,9 @@
 block discarded – undo
66 66
      */
67 67
     public function setPedidos($pedidos)
68 68
     {
69
-        foreach ($pedidos as $pedido)
70
-            $this->pedidos[] = SerializerHelper::denormalize($pedido, Pedido::class);
69
+        foreach ($pedidos as $pedido) {
70
+                    $this->pedidos[] = SerializerHelper::denormalize($pedido, Pedido::class);
71
+        }
71 72
 
72 73
         return $this;
73 74
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Pedido/InserirRequest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Integracao\ControlPay\Contracts\Pedido;
4 4
 
5
-use Integracao\ControlPay\Helpers\SerializerHelper;
6 5
 use Integracao\ControlPay\Model\Produto;
7 6
 
8 7
 /**
Please login to merge, or discard this patch.