Completed
Push — master ( 924818...a51019 )
by Adriano
02:59
created
src/Integracao/ControlPay/API/TerminalApi.php 1 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/API/IntencaoVendaApi.php 1 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/VendaApi.php 1 patch
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.
src/Integracao/ControlPay/Contracts/Venda/VenderRequest.php 1 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.