Completed
Push — master ( 0f09a1...af57be )
by Adriano
04:45
created
src/Integracao/ControlPay/Contracts/Terminal/GetByIdResponse.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     {
46 46
         $this->data = \DateTime::createFromFormat('d/m/Y H:i:s.u', $data);
47 47
 
48
-        if(!$this->data)
48
+        if (!$this->data)
49 49
             $this->data = \DateTime::createFromFormat('d/m/Y H:i:s', $data);
50 50
 
51 51
         return $this;
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     {
68 68
         $this->terminal = $terminal;
69 69
 
70
-        if(is_array($this->terminal))
70
+        if (is_array($this->terminal))
71 71
             $this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class);
72 72
 
73 73
         return $this;
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,8 +45,9 @@  discard block
 block discarded – undo
45 45
     {
46 46
         $this->data = \DateTime::createFromFormat('d/m/Y H:i:s.u', $data);
47 47
 
48
-        if(!$this->data)
49
-            $this->data = \DateTime::createFromFormat('d/m/Y H:i:s', $data);
48
+        if(!$this->data) {
49
+                    $this->data = \DateTime::createFromFormat('d/m/Y H:i:s', $data);
50
+        }
50 51
 
51 52
         return $this;
52 53
     }
@@ -67,8 +68,9 @@  discard block
 block discarded – undo
67 68
     {
68 69
         $this->terminal = $terminal;
69 70
 
70
-        if(is_array($this->terminal))
71
-            $this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class);
71
+        if(is_array($this->terminal)) {
72
+                    $this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class);
73
+        }
72 74
 
73 75
         return $this;
74 76
     }
Please login to merge, or discard this patch.
Integracao/ControlPay/Contracts/Produto/GetByAtivosByPessoaIdResponse.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     {
45 45
         $this->data = \DateTime::createFromFormat('d/m/Y H:i:s.u', $data);
46 46
 
47
-        if(!$this->data)
47
+        if (!$this->data)
48 48
             $this->data = \DateTime::createFromFormat('d/m/Y H:i:s', $data);
49 49
 
50 50
         return $this;
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     {
67 67
 
68 68
         foreach ($produtos as $item)
69
-            $this->produtos[] = SerializerHelper::denormalize($item, Produto::class);
69
+            $this->produtos[ ] = SerializerHelper::denormalize($item, Produto::class);
70 70
 
71 71
         return $this;
72 72
     }
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,8 +44,9 @@  discard block
 block discarded – undo
44 44
     {
45 45
         $this->data = \DateTime::createFromFormat('d/m/Y H:i:s.u', $data);
46 46
 
47
-        if(!$this->data)
48
-            $this->data = \DateTime::createFromFormat('d/m/Y H:i:s', $data);
47
+        if(!$this->data) {
48
+                    $this->data = \DateTime::createFromFormat('d/m/Y H:i:s', $data);
49
+        }
49 50
 
50 51
         return $this;
51 52
     }
@@ -65,8 +66,9 @@  discard block
 block discarded – undo
65 66
     public function setProdutos($produtos)
66 67
     {
67 68
 
68
-        foreach ($produtos as $item)
69
-            $this->produtos[] = SerializerHelper::denormalize($item, Produto::class);
69
+        foreach ($produtos as $item) {
70
+                    $this->produtos[] = SerializerHelper::denormalize($item, Produto::class);
71
+        }
70 72
 
71 73
         return $this;
72 74
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Impl/BasicAuthentication.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
     {
48 48
         throw new \Exception("Basic authenticanão não é suportado pela api por enquanto");
49 49
 
50
-        if(!empty($this->key))
50
+        if (!empty($this->key))
51 51
             return sprintf("Basic %s", $this->key);
52 52
 
53 53
         return sprintf("Basic %s", base64_encode(sprintf("%s:%s", $this->user, $this->password)));
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,9 @@
 block discarded – undo
47 47
     {
48 48
         throw new \Exception("Basic authenticanão não é suportado pela api por enquanto");
49 49
 
50
-        if(!empty($this->key))
51
-            return sprintf("Basic %s", $this->key);
50
+        if(!empty($this->key)) {
51
+                    return sprintf("Basic %s", $this->key);
52
+        }
52 53
 
53 54
         return sprintf("Basic %s", base64_encode(sprintf("%s:%s", $this->user, $this->password)));
54 55
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Impl/KeyQueryStringAuthentication.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
      */
53 53
     public function getAuthorization()
54 54
     {
55
-        if(!empty($this->key))
55
+        if (!empty($this->key))
56 56
             return $this->key;
57 57
 
58 58
         $response = $this->_loginApi->login(
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,9 @@
 block discarded – undo
52 52
      */
53 53
     public function getAuthorization()
54 54
     {
55
-        if(!empty($this->key))
56
-            return $this->key;
55
+        if(!empty($this->key)) {
56
+                    return $this->key;
57
+        }
57 58
 
58 59
         $response = $this->_loginApi->login(
59 60
             (new LoginRequest())
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/CancelarResponse.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace Integracao\ControlPay\Contracts\Pedido;
4 4
 
5 5
 use Integracao\ControlPay\Helpers\SerializerHelper;
6
-use Integracao\ControlPay\Model\IntencaoVenda;
7 6
 use Integracao\ControlPay\Model\Pedido;
8 7
 
9 8
 /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
     {
64 64
         $this->pedido = $pedido;
65 65
 
66
-        if(is_array($this->pedido))
66
+        if (is_array($this->pedido))
67 67
             $this->pedido = SerializerHelper::denormalize($this->pedido, Pedido::class);
68 68
 
69 69
         return $this;
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,9 @@
 block discarded – undo
63 63
     {
64 64
         $this->pedido = $pedido;
65 65
 
66
-        if(is_array($this->pedido))
67
-            $this->pedido = SerializerHelper::denormalize($this->pedido, Pedido::class);
66
+        if(is_array($this->pedido)) {
67
+                    $this->pedido = SerializerHelper::denormalize($this->pedido, Pedido::class);
68
+        }
68 69
 
69 70
         return $this;
70 71
     }
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.