Completed
Push — master ( dc1ac5...ac28ba )
by Adriano
07:48
created
src/Integracao/ControlPay/Client.php 1 patch
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.
src/Integracao/ControlPay/Contracts/Login/LoginResponse.php 1 patch
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.
src/Integracao/ControlPay/Contracts/Login/ConsultaLoginResponse.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     {
69 69
         $this->pessoa = $pessoa;
70 70
 
71
-        if(is_array($pessoa))
71
+        if (is_array($pessoa))
72 72
             $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
73 73
 
74 74
         return $this;
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     {
91 91
         $this->operador = $operador;
92 92
 
93
-        if(is_array($this->operador))
93
+        if (is_array($this->operador))
94 94
             $this->operador = SerializerHelper::denormalize($this->operador, Operador::class);
95 95
 
96 96
         return $this;
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Venda/VenderResponse.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.
Integracao/ControlPay/Contracts/PagamentoExterno/GetByFiltrosResponse.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
 
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.
src/Integracao/ControlPay/Contracts/Terminal/GetByPessoaIdResponse.php 1 patch
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.
src/Integracao/ControlPay/Contracts/Terminal/InsertRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     {
93 93
         $this->impressora = $impressora;
94 94
 
95
-        if(is_array($this->impressora))
95
+        if (is_array($this->impressora))
96 96
             $this->impressora = SerializerHelper::denormalize($this->impressora, Impressora::class);
97 97
 
98 98
         return $this;
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     {
115 115
         $this->pessoa = $pessoa;
116 116
 
117
-        if(is_array($this->pessoa))
117
+        if (is_array($this->pessoa))
118 118
             $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
119 119
 
120 120
         return $this;
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Terminal/InsertResponse.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.
Integracao/ControlPay/Contracts/Produto/GetByAtivosByPessoaIdResponse.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
 
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.