@@ -13,7 +13,7 @@ |
||
13 | 13 | public function __construct($payment_id, $chargeback_id) |
14 | 14 | { |
15 | 15 | $this->payment_id = $payment_id; |
16 | - $this->chargeback_id =$chargeback_id; |
|
16 | + $this->chargeback_id = $chargeback_id; |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | public function getChargebackId() |
@@ -30,7 +30,7 @@ |
||
30 | 30 | |
31 | 31 | public function getAction() |
32 | 32 | { |
33 | - if($this->payment_id == null){ |
|
33 | + if ($this->payment_id == null) { |
|
34 | 34 | return 'payments/chargebacks'; |
35 | 35 | } else { |
36 | 36 | return sprintf('payments/%s/chargebacks/', $this->payment_id); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | $validator = Validation::createValidator(); |
64 | 64 | |
65 | - if(isset($options['apiEndpoint'])){ |
|
65 | + if (isset($options['apiEndpoint'])) { |
|
66 | 66 | self::validateClientEndpoint($options, $validator); |
67 | 67 | self::$url = $options['apiEndpoint']; |
68 | 68 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | $this->getOptions($method) |
143 | 143 | ); |
144 | 144 | |
145 | - if(!is_array($result)){ |
|
145 | + if (!is_array($result)) { |
|
146 | 146 | throw new Exception\UnexpectedError('Unexpected error :'.$result); |
147 | 147 | } |
148 | 148 | |
@@ -205,11 +205,11 @@ discard block |
||
205 | 205 | * @param [Validator] $validator |
206 | 206 | * @return void |
207 | 207 | */ |
208 | - private static function validateClientEndpoint($options, $validator){ |
|
208 | + private static function validateClientEndpoint($options, $validator) { |
|
209 | 209 | $violations = $validator->validate($options['apiEndpoint'], [ |
210 | 210 | new Url(), |
211 | 211 | ]); |
212 | - if(count($violations) != 0){ |
|
212 | + if (count($violations) != 0) { |
|
213 | 213 | throw new Exception\InvalidAttributeValue( |
214 | 214 | 'Your API endpoint is not a valid URL', |
215 | 215 | $violations |
@@ -81,7 +81,7 @@ |
||
81 | 81 | $resultObject = new Error(); |
82 | 82 | } |
83 | 83 | |
84 | - if(!is_array($response)){ |
|
84 | + if (!is_array($response)) { |
|
85 | 85 | throw new UnexpectedError('Unexpected error : "'.$exception->getMessage().'"', $exception->getCode()); |
86 | 86 | } |
87 | 87 |