@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | |
91 | 91 | /** |
92 | 92 | * Gets the value of id. |
93 | - * @return mixed |
|
93 | + * @return string |
|
94 | 94 | */ |
95 | 95 | public function getId() |
96 | 96 | { |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | /** |
111 | 111 | * Gets the value of amount. |
112 | - * @return mixed |
|
112 | + * @return double |
|
113 | 113 | */ |
114 | 114 | public function getAmount() |
115 | 115 | { |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | |
129 | 129 | /** |
130 | 130 | * Gets the value of currency. |
131 | - * @return mixed |
|
131 | + * @return string |
|
132 | 132 | */ |
133 | 133 | public function getCurrency() |
134 | 134 | { |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | |
148 | 148 | /** |
149 | 149 | * Gets the value of created. |
150 | - * @return mixed |
|
150 | + * @return string |
|
151 | 151 | */ |
152 | 152 | public function getCreated() |
153 | 153 | { |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | |
167 | 167 | /** |
168 | 168 | * Gets the value of type. |
169 | - * @return mixed |
|
169 | + * @return string |
|
170 | 170 | */ |
171 | 171 | public function getType() |
172 | 172 | { |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | |
186 | 186 | /** |
187 | 187 | * Gets the value of live. |
188 | - * @return mixed |
|
188 | + * @return boolean |
|
189 | 189 | */ |
190 | 190 | public function getLive() |
191 | 191 | { |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | |
205 | 205 | /** |
206 | 206 | * Gets the value of settle. |
207 | - * @return mixed |
|
207 | + * @return boolean |
|
208 | 208 | */ |
209 | 209 | public function getSettle() |
210 | 210 | { |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | |
224 | 224 | /** |
225 | 225 | * Gets the value of status. |
226 | - * @return mixed |
|
226 | + * @return string |
|
227 | 227 | */ |
228 | 228 | public function getStatus() |
229 | 229 | { |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | |
243 | 243 | /** |
244 | 244 | * Gets the value of error. |
245 | - * @return mixed |
|
245 | + * @return string |
|
246 | 246 | */ |
247 | 247 | public function getError() |
248 | 248 | { |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | |
262 | 262 | /** |
263 | 263 | * Gets the value of orderId. |
264 | - * @return mixed |
|
264 | + * @return string |
|
265 | 265 | */ |
266 | 266 | public function getOrderId() |
267 | 267 | { |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | |
281 | 281 | /** |
282 | 282 | * Gets the value of description. |
283 | - * @return mixed |
|
283 | + * @return string |
|
284 | 284 | */ |
285 | 285 | public function getDescription() |
286 | 286 | { |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | |
300 | 300 | /** |
301 | 301 | * Gets the value of country. |
302 | - * @return mixed |
|
302 | + * @return string |
|
303 | 303 | */ |
304 | 304 | public function getCountry() |
305 | 305 | { |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | |
319 | 319 | /** |
320 | 320 | * Gets the value of paymentMethod. |
321 | - * @return mixed |
|
321 | + * @return string |
|
322 | 322 | */ |
323 | 323 | public function getPaymentMethod() |
324 | 324 | { |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | /** |
358 | 358 | * @deprecated method is deprecated and shouldn't be used. |
359 | 359 | * Gets the value of authorizeData. |
360 | - * @return mixed |
|
360 | + * @return string |
|
361 | 361 | */ |
362 | 362 | public function getAuthorizeData() |
363 | 363 | { |
@@ -426,7 +426,7 @@ |
||
426 | 426 | */ |
427 | 427 | public function setThreeDS2AuthorizationInformation( |
428 | 428 | ThreeDS2AuthorizationInformation $threeDS2AuthorizationInformation |
429 | - ){ |
|
429 | + ) { |
|
430 | 430 | $this->threeDS2AuthorizationInformation = $threeDS2AuthorizationInformation; |
431 | 431 | } |
432 | 432 |
@@ -41,11 +41,11 @@ discard block |
||
41 | 41 | { |
42 | 42 | return new Assert\Collection([ |
43 | 43 | 'amount' => $this->buildElement('float', 1), |
44 | - 'currency' => $this->buildElement('string', 1, ['min' => 3,'max' => 3]), |
|
44 | + 'currency' => $this->buildElement('string', 1, ['min' => 3, 'max' => 3]), |
|
45 | 45 | 'settle' => $this->buildElement('bool'), |
46 | - 'order_id' => $this->buildElement('string', 0, ['min' => 2,'max' => 50]), |
|
46 | + 'order_id' => $this->buildElement('string', 0, ['min' => 2, 'max' => 50]), |
|
47 | 47 | 'description' => $this->buildElement('string', 0, ['max' => 255]), |
48 | - 'country' => $this->buildElement('string', 1, ['min' => 2,'max' => 2]), |
|
48 | + 'country' => $this->buildElement('string', 1, ['min' => 2, 'max' => 2]), |
|
49 | 49 | 'payment_method' => new Assert\Required([ |
50 | 50 | new Assert\Type(['type' => 'string']), |
51 | 51 | new Assert\Choice([ |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | ]), |
74 | 74 | 'exp_year' => $this->buildElement( |
75 | 75 | 'integer', 1, |
76 | - ['min' => 4,'max' => 4], |
|
76 | + ['min' => 4, 'max' => 4], |
|
77 | 77 | new Assert\Range(['min' => date('Y')]), |
78 | 78 | ), |
79 | 79 | 'exp_month' => $this->buildElement('integer', 1), |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | ]); |
148 | 148 | } |
149 | 149 | |
150 | - private function buildElement($typeValue, $isRequired=0, $length=0, $args=0) |
|
150 | + private function buildElement($typeValue, $isRequired = 0, $length = 0, $args = 0) |
|
151 | 151 | { |
152 | 152 | $inside_array = [ |
153 | 153 | new Assert\Type(['type', $typeValue]), |
@@ -152,9 +152,15 @@ |
||
152 | 152 | $inside_array = [ |
153 | 153 | new Assert\Type(['type', $typeValue]), |
154 | 154 | ]; |
155 | - if ($isRequired) array_unshift($inside_array, new Assert\NotBlank()); |
|
156 | - if ($length) array_push($inside_array, new Assert\Length($length)); |
|
157 | - if ($args) array_push($inside_array, $args); |
|
155 | + if ($isRequired) { |
|
156 | + array_unshift($inside_array, new Assert\NotBlank()); |
|
157 | + } |
|
158 | + if ($length) { |
|
159 | + array_push($inside_array, new Assert\Length($length)); |
|
160 | + } |
|
161 | + if ($args) { |
|
162 | + array_push($inside_array, $args); |
|
163 | + } |
|
158 | 164 | |
159 | 165 | return $isRequired |
160 | 166 | ? new Assert\Required($inside_array) |