Completed
Push — master ( 9537bc...5cf1f6 )
by Adriano
07:28
created
src/Integracao/ControlPay/Contracts/Terminal/GetByIdResponse.php 1 patch
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
         $this->terminal = $terminal;
68 68
 
69
-        if(is_array($this->terminal))
69
+        if (is_array($this->terminal))
70 70
             $this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class);
71 71
 
72 72
         return $this;
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/IntencaoVenda/GetByFiltrosResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
     {
63 63
 
64 64
         foreach ($intencoesVendas as $intencaoVenda)
65
-            $this->intencoesVendas[] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class);
65
+            $this->intencoesVendas[ ] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class);
66 66
 
67 67
         return $this;
68 68
     }
Please login to merge, or discard this patch.
Integracao/ControlPay/Contracts/IntencaoVenda/GetByIntegracaoIdResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
     {
63 63
 
64 64
         foreach ($intencoesVendas as $intencaoVenda)
65
-            $this->intencoesVendas[] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class);
65
+            $this->intencoesVendas[ ] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class);
66 66
 
67 67
         return $this;
68 68
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Impl/BasicAuthentication.php 1 patch
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.
src/Integracao/ControlPay/Contracts/Venda/VenderRequest.php 1 patch
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.
src/Integracao/ControlPay/Contracts/IntencaoVenda/GetByIdResponse.php 1 patch
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.
src/Integracao/ControlPay/Client.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      */
71 71
     public function getParameter($key)
72 72
     {
73
-        return isset($this->_params[$key]) ? $this->_params[$key] : null;
73
+        return isset($this->_params[ $key ]) ? $this->_params[ $key ] : null;
74 74
     }
75 75
 
76 76
     /**
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      */
83 83
     public function setParameter($key, $value)
84 84
     {
85
-        $this->_params[$key] = $value;
85
+        $this->_params[ $key ] = $value;
86 86
         $this->loadParameters($this->_params, $this->authentication);
87 87
         return $this;
88 88
     }
@@ -96,22 +96,22 @@  discard block
 block discarded – undo
96 96
      */
97 97
     private function loadParameters($params, IAuthentication $authentication = null)
98 98
     {
99
-        $this->_params[ControlPayParameterConst::CONTROLPAY_HOST] = getenv('CONTROLPAY_HOST');
100
-        $this->_params[ControlPayParameterConst::CONTROLPAY_TIMEOUT] = getenv('CONTROLPAY_TIMEOUT');
101
-        $this->_params[ControlPayParameterConst::CONTROLPAY_USER] = getenv('CONTROLPAY_USER');
102
-        $this->_params[ControlPayParameterConst::CONTROLPAY_PWD] = getenv('CONTROLPAY_PWD');
103
-        $this->_params[ControlPayParameterConst::CONTROLPAY_KEY] = getenv('CONTROLPAY_KEY');
104
-        $this->_params[ControlPayParameterConst::CONTROLPAY_DEFAULT_PESSOA_ID] = getenv('CONTROLPAY_DEFAULT_PESSOA_ID');
105
-        $this->_params[ControlPayParameterConst::CONTROLPAY_DEFAULT_TERMINAL_ID] = getenv('CONTROLPAY_DEFAULT_TERMINAL_ID');
106
-        $this->_params[ControlPayParameterConst::CONTROLPAY_DEFAULT_PRODUTO_ID] = getenv('CONTROLPAY_DEFAULT_PRODUTO_ID');
107
-        $this->_params[ControlPayParameterConst::CONTROLPAY_DEFAULT_FORMA_PAGAMENTO_ID] = getenv('CONTROLPAY_DEFAULT_FORMA_PAGAMENTO_ID');
108
-        $this->_params[ControlPayParameterConst::CONTROLPAY_DEFAULT_FORMA_AGUARDA_TEF] = getenv('CONTROLPAY_DEFAULT_FORMA_AGUARDA_TEF');
109
-        $this->_params[ControlPayParameterConst::CONTROLPAY_OAUTH_TYPE] = KeyQueryStringAuthentication::class;
110
-
111
-        if(!is_null($params))
99
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_HOST ] = getenv('CONTROLPAY_HOST');
100
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_TIMEOUT ] = getenv('CONTROLPAY_TIMEOUT');
101
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_USER ] = getenv('CONTROLPAY_USER');
102
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_PWD ] = getenv('CONTROLPAY_PWD');
103
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_KEY ] = getenv('CONTROLPAY_KEY');
104
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_DEFAULT_PESSOA_ID ] = getenv('CONTROLPAY_DEFAULT_PESSOA_ID');
105
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_DEFAULT_TERMINAL_ID ] = getenv('CONTROLPAY_DEFAULT_TERMINAL_ID');
106
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_DEFAULT_PRODUTO_ID ] = getenv('CONTROLPAY_DEFAULT_PRODUTO_ID');
107
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_DEFAULT_FORMA_PAGAMENTO_ID ] = getenv('CONTROLPAY_DEFAULT_FORMA_PAGAMENTO_ID');
108
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_DEFAULT_FORMA_AGUARDA_TEF ] = getenv('CONTROLPAY_DEFAULT_FORMA_AGUARDA_TEF');
109
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_OAUTH_TYPE ] = KeyQueryStringAuthentication::class;
110
+
111
+        if (!is_null($params))
112 112
             foreach ($params as $key => $param)
113 113
             {
114
-                if(!in_array($key, [
114
+                if (!in_array($key, [
115 115
                     ControlPayParameterConst::CONTROLPAY_HOST,
116 116
                     ControlPayParameterConst::CONTROLPAY_TIMEOUT,
117 117
                     ControlPayParameterConst::CONTROLPAY_USER,
@@ -127,11 +127,11 @@  discard block
 block discarded – undo
127 127
                     throw new \Exception(sprintf("Parâmetro %s inválido", $key));
128 128
             }
129 129
 
130
-        if(!is_null($params) && is_array($params))
130
+        if (!is_null($params) && is_array($params))
131 131
             foreach ($params as $key => $value)
132
-                $this->_params[$key] = $value;
132
+                $this->_params[ $key ] = $value;
133 133
 
134
-        if(is_null($authentication))
134
+        if (is_null($authentication))
135 135
         {
136 136
             $this->authentication = AuthenticationFactory::getInstance($this->_params, $this);
137 137
             return;
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Model/Pedido.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
     public function setProdutos($produtos)
205 205
     {
206 206
         foreach ($produtos as $produto)
207
-            $this->produtos[] = SerializerHelper::denormalize($produto, Produto::class);
207
+            $this->produtos[ ] = SerializerHelper::denormalize($produto, Produto::class);
208 208
 
209 209
         return $this;
210 210
     }
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
     {
442 442
         $this->pedidoStatus = $pedidoStatus;
443 443
 
444
-        if(is_array($this->pedidoStatus))
444
+        if (is_array($this->pedidoStatus))
445 445
             $this->pedidoStatus = SerializerHelper::denormalize($this->pedidoStatus, PedidoStatus::class);
446 446
 
447 447
         return $this;
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Pedido/GetByFiltrosRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@
 block discarded – undo
155 155
         return [
156 156
             'status' => $this->status,
157 157
             'dataInicio' => empty($this->dataInicio) ? null : $this->dataInicio->format('d/m/Y H:i:s'),
158
-            'dataFim' => empty($this->dataFim) ? null :$this->dataFim->format('d/m/Y H:i:s'),
158
+            'dataFim' => empty($this->dataFim) ? null : $this->dataFim->format('d/m/Y H:i:s'),
159 159
             'tipo' => $this->tipo,
160 160
             'valorComDivergencia' => $this->valorComDivergencia,
161 161
             'referencia' => $this->referencia
Please login to merge, or discard this patch.