@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace Cardinity\Method\Payment; |
| 4 | 4 | |
| 5 | 5 | use Cardinity\Method\ResultObject; |
| 6 | -use Cardinity\Method\Payment\ThreeDS2Data; |
|
| 7 | 6 | use Cardinity\Method\Payment\ThreeDS2AuthorizationInformation; |
| 8 | 7 | |
| 9 | 8 | class Payment extends ResultObject |
@@ -174,9 +174,15 @@ |
||
| 174 | 174 | 'message' => 'The value {{ value }} is not a valid {{ type }}.' |
| 175 | 175 | ]), |
| 176 | 176 | ]; |
| 177 | - if ($isRequired) array_unshift($inside_array, new Assert\NotBlank()); |
|
| 178 | - if ($length) array_push($inside_array, new Assert\Length($length)); |
|
| 179 | - if ($args) array_push($inside_array, $args); |
|
| 177 | + if ($isRequired) { |
|
| 178 | + array_unshift($inside_array, new Assert\NotBlank()); |
|
| 179 | + } |
|
| 180 | + if ($length) { |
|
| 181 | + array_push($inside_array, new Assert\Length($length)); |
|
| 182 | + } |
|
| 183 | + if ($args) { |
|
| 184 | + array_push($inside_array, $args); |
|
| 185 | + } |
|
| 180 | 186 | |
| 181 | 187 | return $isRequired |
| 182 | 188 | ? new Assert\Required($inside_array) |