Completed
Branch master (924818)
by Adriano
04:29
created
src/Integracao/ControlPay/API/VendaApi.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function vender(Contracts\Venda\VenderRequest $venderRequest)
38 38
     {
39
-        try{
40
-            $response = $this->_httpClient->post(__FUNCTION__,[
39
+        try {
40
+            $response = $this->_httpClient->post(__FUNCTION__, [
41 41
                 'body' => json_encode($venderRequest),
42 42
             ]);
43 43
 
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
             );
48 48
         }catch (RequestException $ex) {
49 49
             $responseBody = $ex->getResponse()->json();
50
-            throw new \Exception($responseBody['message']);
51
-        }catch (\Exception $ex){
50
+            throw new \Exception($responseBody[ 'message' ]);
51
+        }catch (\Exception $ex) {
52 52
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
53 53
         }
54 54
     }
@@ -57,13 +57,13 @@  discard block
 block discarded – undo
57 57
      * @return Contracts\Venda\ConsultarVendasResponse
58 58
      * @throws \Exception
59 59
      */
60
-    public function consultarVendas(array $ids = [])
60
+    public function consultarVendas(array $ids = [ ])
61 61
     {
62
-        try{
62
+        try {
63 63
             $response = $this->_httpClient->post(__FUNCTION__, [
64
-                'body' => json_encode(array_map(function($id){
64
+                'body' => json_encode(array_map(function($id) {
65 65
                     return [
66
-                        'Id' => (string)$id
66
+                        'Id' => (string) $id
67 67
                     ];
68 68
                 },$ids))
69 69
             ]);
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
         }catch (RequestException $ex) {
76 76
             $responseBody = $ex->getResponse()->json();
77 77
             var_dump($responseBody);
78
-            throw new \Exception($responseBody['message']);
79
-        }catch (\Exception $ex){
78
+            throw new \Exception($responseBody[ 'message' ]);
79
+        }catch (\Exception $ex) {
80 80
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
81 81
         }
82 82
     }
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
                 $response->json(),
46 46
                 Contracts\Venda\VenderResponse::class
47 47
             );
48
-        }catch (RequestException $ex) {
48
+        } catch (RequestException $ex) {
49 49
             $responseBody = $ex->getResponse()->json();
50 50
             throw new \Exception($responseBody['message']);
51
-        }catch (\Exception $ex){
51
+        } catch (\Exception $ex){
52 52
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
53 53
         }
54 54
     }
@@ -72,11 +72,11 @@  discard block
 block discarded – undo
72 72
                 $response->json(),
73 73
                 Contracts\Venda\ConsultarVendasResponse::class
74 74
             );
75
-        }catch (RequestException $ex) {
75
+        } catch (RequestException $ex) {
76 76
             $responseBody = $ex->getResponse()->json();
77 77
             var_dump($responseBody);
78 78
             throw new \Exception($responseBody['message']);
79
-        }catch (\Exception $ex){
79
+        } catch (\Exception $ex){
80 80
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
81 81
         }
82 82
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/API/LoginApi.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function login(Contracts\Login\LoginRequest $loginRequest)
33 33
     {
34
-        try{
35
-            $response = $this->_httpClient->post(__FUNCTION__,[
34
+        try {
35
+            $response = $this->_httpClient->post(__FUNCTION__, [
36 36
                 'body' => json_encode($loginRequest)
37 37
             ]);
38 38
 
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
             );
43 43
         }catch (RequestException $ex) {
44 44
             $responseBody = $ex->getResponse()->json();
45
-            throw new \Exception($responseBody['message']);
46
-        }catch (\Exception $ex){
45
+            throw new \Exception($responseBody[ 'message' ]);
46
+        }catch (\Exception $ex) {
47 47
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
48 48
         }
49 49
     }
@@ -54,14 +54,14 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function logOut()
56 56
     {
57
-        try{
58
-            $this->_httpClient->post(__FUNCTION__,[]);
57
+        try {
58
+            $this->_httpClient->post(__FUNCTION__, [ ]);
59 59
 
60 60
             return true;
61 61
         }catch (RequestException $ex) {
62 62
             $responseBody = $ex->getResponse()->json();
63
-            throw new \Exception($responseBody['message']);
64
-        }catch (\Exception $ex){
63
+            throw new \Exception($responseBody[ 'message' ]);
64
+        }catch (\Exception $ex) {
65 65
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
66 66
         }
67 67
     }
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function consultaLogin(Contracts\Login\ConsultaLoginRequest $consultaLoginRequest)
75 75
     {
76
-        try{
77
-            $response = $this->_httpClient->post(__FUNCTION__,[
76
+        try {
77
+            $response = $this->_httpClient->post(__FUNCTION__, [
78 78
                 'body' => json_encode($consultaLoginRequest)
79 79
             ]);
80 80
 
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
             );
85 85
         }catch (RequestException $ex) {
86 86
             $responseBody = $ex->getResponse()->json();
87
-            throw new \Exception($responseBody['message']);
88
-        }catch (\Exception $ex){
87
+            throw new \Exception($responseBody[ 'message' ]);
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.
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.
src/Integracao/ControlPay/Client.php 2 patches
Spacing   +14 added lines, -14 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,17 +96,17 @@  discard block
 block discarded – undo
96 96
      */
97 97
     private function loadParameters($params, IAuthentication $authentication = null)
98 98
     {
99
-        $this->_params[ControlPayParameter::CONTROLPAY_HOST] = getenv('CONTROLPAY_HOST');
100
-        $this->_params[ControlPayParameter::CONTROLPAY_TIMEOUT] = getenv('CONTROLPAY_TIMEOUT');
101
-        $this->_params[ControlPayParameter::CONTROLPAY_USER] = getenv('CONTROLPAY_USER');
102
-        $this->_params[ControlPayParameter::CONTROLPAY_PWD] = getenv('CONTROLPAY_PWD');
103
-        $this->_params[ControlPayParameter::CONTROLPAY_KEY] = getenv('CONTROLPAY_KEY');
104
-        $this->_params[ControlPayParameter::CONTROLPAY_OAUTH_TYPE] = KeyQueryStringAuthentication::class;
105
-
106
-        if(!is_null($params))
99
+        $this->_params[ ControlPayParameter::CONTROLPAY_HOST ] = getenv('CONTROLPAY_HOST');
100
+        $this->_params[ ControlPayParameter::CONTROLPAY_TIMEOUT ] = getenv('CONTROLPAY_TIMEOUT');
101
+        $this->_params[ ControlPayParameter::CONTROLPAY_USER ] = getenv('CONTROLPAY_USER');
102
+        $this->_params[ ControlPayParameter::CONTROLPAY_PWD ] = getenv('CONTROLPAY_PWD');
103
+        $this->_params[ ControlPayParameter::CONTROLPAY_KEY ] = getenv('CONTROLPAY_KEY');
104
+        $this->_params[ ControlPayParameter::CONTROLPAY_OAUTH_TYPE ] = KeyQueryStringAuthentication::class;
105
+
106
+        if (!is_null($params))
107 107
             foreach ($params as $key => $param)
108 108
             {
109
-                if(!in_array($key, [
109
+                if (!in_array($key, [
110 110
                     ControlPayParameter::CONTROLPAY_HOST,
111 111
                     ControlPayParameter::CONTROLPAY_TIMEOUT,
112 112
                     ControlPayParameter::CONTROLPAY_USER,
@@ -117,11 +117,11 @@  discard block
 block discarded – undo
117 117
                     throw new \Exception(sprintf("Parâmetro %s inválido", $key));
118 118
             }
119 119
 
120
-        if(!is_null($params) && is_array($params))
120
+        if (!is_null($params) && is_array($params))
121 121
             foreach ($params as $key => $value)
122
-                $this->_params[$key] = $value;
122
+                $this->_params[ $key ] = $value;
123 123
 
124
-        if(is_null($authentication))
124
+        if (is_null($authentication))
125 125
         {
126 126
             $this->authentication = AuthenticationFactory::getInstance($this->_params, $this);
127 127
             return;
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -103,8 +103,8 @@  discard block
 block discarded – undo
103 103
         $this->_params[ControlPayParameter::CONTROLPAY_KEY] = getenv('CONTROLPAY_KEY');
104 104
         $this->_params[ControlPayParameter::CONTROLPAY_OAUTH_TYPE] = KeyQueryStringAuthentication::class;
105 105
 
106
-        if(!is_null($params))
107
-            foreach ($params as $key => $param)
106
+        if(!is_null($params)) {
107
+                    foreach ($params as $key => $param)
108 108
             {
109 109
                 if(!in_array($key, [
110 110
                     ControlPayParameter::CONTROLPAY_HOST,
@@ -115,11 +115,13 @@  discard block
 block discarded – undo
115 115
                     ControlPayParameter::CONTROLPAY_OAUTH_TYPE
116 116
                 ]))
117 117
                     throw new \Exception(sprintf("Parâmetro %s inválido", $key));
118
+        }
118 119
             }
119 120
 
120
-        if(!is_null($params) && is_array($params))
121
-            foreach ($params as $key => $value)
121
+        if(!is_null($params) && is_array($params)) {
122
+                    foreach ($params as $key => $value)
122 123
                 $this->_params[$key] = $value;
124
+        }
123 125
 
124 126
         if(is_null($authentication))
125 127
         {
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Login/LoginResponse.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     {
85 85
         $this->pessoa = $pessoa;
86 86
 
87
-        if(is_array($pessoa))
87
+        if (is_array($pessoa))
88 88
             $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
89 89
 
90 90
         return $this;
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     {
107 107
         $this->operador = $operador;
108 108
 
109
-        if(is_array($this->operador))
109
+        if (is_array($this->operador))
110 110
             $this->operador = SerializerHelper::denormalize($this->operador, Operador::class);
111 111
 
112 112
         return $this;
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     {
129 129
         $this->android = $android;
130 130
 
131
-        if(is_array($this->android))
131
+        if (is_array($this->android))
132 132
             $this->android = SerializerHelper::denormalize($this->android, Device::class);
133 133
 
134 134
         return $this;
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     {
151 151
         $this->ios = $ios;
152 152
 
153
-        if(is_array($this->ios))
153
+        if (is_array($this->ios))
154 154
             $this->ios = SerializerHelper::denormalize($this->ios, Device::class);
155 155
 
156 156
         return $this;
Please login to merge, or discard this patch.
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -84,8 +84,9 @@  discard block
 block discarded – undo
84 84
     {
85 85
         $this->pessoa = $pessoa;
86 86
 
87
-        if(is_array($pessoa))
88
-            $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
87
+        if(is_array($pessoa)) {
88
+                    $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
89
+        }
89 90
 
90 91
         return $this;
91 92
     }
@@ -106,8 +107,9 @@  discard block
 block discarded – undo
106 107
     {
107 108
         $this->operador = $operador;
108 109
 
109
-        if(is_array($this->operador))
110
-            $this->operador = SerializerHelper::denormalize($this->operador, Operador::class);
110
+        if(is_array($this->operador)) {
111
+                    $this->operador = SerializerHelper::denormalize($this->operador, Operador::class);
112
+        }
111 113
 
112 114
         return $this;
113 115
     }
@@ -128,8 +130,9 @@  discard block
 block discarded – undo
128 130
     {
129 131
         $this->android = $android;
130 132
 
131
-        if(is_array($this->android))
132
-            $this->android = SerializerHelper::denormalize($this->android, Device::class);
133
+        if(is_array($this->android)) {
134
+                    $this->android = SerializerHelper::denormalize($this->android, Device::class);
135
+        }
133 136
 
134 137
         return $this;
135 138
     }
@@ -150,8 +153,9 @@  discard block
 block discarded – undo
150 153
     {
151 154
         $this->ios = $ios;
152 155
 
153
-        if(is_array($this->ios))
154
-            $this->ios = SerializerHelper::denormalize($this->ios, Device::class);
156
+        if(is_array($this->ios)) {
157
+                    $this->ios = SerializerHelper::denormalize($this->ios, Device::class);
158
+        }
155 159
 
156 160
         return $this;
157 161
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Venda/VenderResponse.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.
Integracao/ControlPay/Contracts/PagamentoExterno/GetByFiltrosResponse.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 ($pagamentosExterno as $item)
69
-            $this->pagamentosExterno[] = SerializerHelper::denormalize($item, PagamentoExterno::class);
69
+            $this->pagamentosExterno[ ] = SerializerHelper::denormalize($item, PagamentoExterno::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 setPagamentosExterno($pagamentosExterno)
66 67
     {
67 68
 
68
-        foreach ($pagamentosExterno as $item)
69
-            $this->pagamentosExterno[] = SerializerHelper::denormalize($item, PagamentoExterno::class);
69
+        foreach ($pagamentosExterno as $item) {
70
+                    $this->pagamentosExterno[] = SerializerHelper::denormalize($item, PagamentoExterno::class);
71
+        }
70 72
 
71 73
         return $this;
72 74
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Terminal/GetByPessoaIdResponse.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;
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     public function setTerminais($terminais)
67 67
     {
68 68
         foreach ($terminais as $item)
69
-            $this->terminais[] = SerializerHelper::denormalize($item, Terminal::class);
69
+            $this->terminais[ ] = SerializerHelper::denormalize($item, Terminal::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
@@ -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
     }
@@ -65,8 +66,9 @@  discard block
 block discarded – undo
65 66
      */
66 67
     public function setTerminais($terminais)
67 68
     {
68
-        foreach ($terminais as $item)
69
-            $this->terminais[] = SerializerHelper::denormalize($item, Terminal::class);
69
+        foreach ($terminais as $item) {
70
+                    $this->terminais[] = SerializerHelper::denormalize($item, Terminal::class);
71
+        }
70 72
 
71 73
         return $this;
72 74
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Terminal/InsertResponse.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
         $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.
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
     }
@@ -66,8 +67,9 @@  discard block
 block discarded – undo
66 67
     {
67 68
         $this->terminal = $terminal;
68 69
 
69
-        if(is_array($this->terminal))
70
-            $this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class);
70
+        if(is_array($this->terminal)) {
71
+                    $this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class);
72
+        }
71 73
 
72 74
         return $this;
73 75
     }
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.