@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $this->auth_string = $auth_string; |
54 | 54 | |
55 | 55 | // Set base url of selected API |
56 | - $this->base_url = $base_url; |
|
56 | + $this->base_url = $base_url; |
|
57 | 57 | |
58 | 58 | // Instantiate cURL object |
59 | 59 | $this->authenticate(); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | break; |
92 | 92 | |
93 | 93 | case Constants::API_URL: |
94 | - $headers[] = 'Accept-Version: v' . Constants::API_VERSION; |
|
94 | + $headers[] = 'Accept-Version: v'.Constants::API_VERSION; |
|
95 | 95 | $headers[] = 'Accept: application/json'; |
96 | 96 | break; |
97 | 97 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | } |
101 | 101 | |
102 | 102 | if (!empty($this->auth_string)) { |
103 | - $headers[] = 'Authorization: Basic ' . base64_encode($this->auth_string); |
|
103 | + $headers[] = 'Authorization: Basic '.base64_encode($this->auth_string); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | $options = array( |
@@ -1,7 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace QuickPay\API; |
3 | 3 | |
4 | -use QuickPay\API\Constants; |
|
5 | 4 | use QuickPay\API\Response; |
6 | 5 | |
7 | 6 | /** |
@@ -49,9 +49,9 @@ discard block |
||
49 | 49 | // Add query parameters to $path? |
50 | 50 | if (!empty($query)) { |
51 | 51 | if (strpos($path, '?') === false) { |
52 | - $path .= '?' . http_build_query($query, '', '&'); |
|
52 | + $path .= '?'.http_build_query($query, '', '&'); |
|
53 | 53 | } else { |
54 | - $path .= ini_get('arg_separator.output') . http_build_query($query, '', '&'); |
|
54 | + $path .= ini_get('arg_separator.output').http_build_query($query, '', '&'); |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | */ |
141 | 141 | protected function setUrl($params) |
142 | 142 | { |
143 | - curl_setopt($this->client->ch, CURLOPT_URL, $this->client->base_url . trim($params, '/')); |
|
143 | + curl_setopt($this->client->ch, CURLOPT_URL, $this->client->base_url.trim($params, '/')); |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | curl_setopt($this->client->ch, CURLOPT_CUSTOMREQUEST, $request_type); |
160 | 160 | |
161 | 161 | // If additional data is delivered, we will send it along with the API request |
162 | - if (is_array($form) && ! empty($form)) { |
|
162 | + if (is_array($form) && !empty($form)) { |
|
163 | 163 | curl_setopt($this->client->ch, CURLOPT_POSTFIELDS, $this->httpBuildQuery($form, '', '&')); |
164 | 164 | } |
165 | 165 |