@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | // Add query parameters to $path? |
49 | 49 | if (!empty($query)) { |
50 | 50 | if (strpos($path, '?') === false) { |
51 | - $path .= '?' . http_build_query($query, '', '&'); |
|
51 | + $path .= '?'.http_build_query($query, '', '&'); |
|
52 | 52 | } else { |
53 | - $path .= ini_get('arg_separator.output') . http_build_query($query, '', '&'); |
|
53 | + $path .= ini_get('arg_separator.output').http_build_query($query, '', '&'); |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 | |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | */ |
140 | 140 | protected function setUrl($params) |
141 | 141 | { |
142 | - curl_setopt($this->client->ch, CURLOPT_URL, Constants::API_URL . trim($params, '/')); |
|
142 | + curl_setopt($this->client->ch, CURLOPT_URL, Constants::API_URL.trim($params, '/')); |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | /** |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | curl_setopt($this->client->ch, CURLOPT_CUSTOMREQUEST, $request_type); |
159 | 159 | |
160 | 160 | // If additional data is delivered, we will send it along with the API request |
161 | - if (is_array($form) && ! empty($form)) { |
|
161 | + if (is_array($form) && !empty($form)) { |
|
162 | 162 | curl_setopt($this->client->ch, CURLOPT_POSTFIELDS, $this->httpBuildQuery($form, '', '&')); |
163 | 163 | } |
164 | 164 |
@@ -67,6 +67,7 @@ discard block |
||
67 | 67 | * Performs an API POST request |
68 | 68 | * |
69 | 69 | * @access public |
70 | + * @param string $path |
|
70 | 71 | * @return Response |
71 | 72 | */ |
72 | 73 | public function post($path, $form = array()) |
@@ -195,7 +196,7 @@ discard block |
||
195 | 196 | * Kept public for testing purposes. |
196 | 197 | * |
197 | 198 | * @param array $query |
198 | - * @return mixed|string |
|
199 | + * @return string |
|
199 | 200 | */ |
200 | 201 | public function httpBuildQuery($query) |
201 | 202 | { |
@@ -19,15 +19,15 @@ |
||
19 | 19 | protected $client; |
20 | 20 | |
21 | 21 | /** |
22 | - * __construct function. |
|
23 | - * |
|
24 | - * Instantiates the main class. |
|
25 | - * Creates a client which is passed to the request construct. |
|
26 | - * |
|
27 | - * @auth_string string Authentication string for QuickPay |
|
28 | - * |
|
29 | - * @access public |
|
30 | - */ |
|
22 | + * __construct function. |
|
23 | + * |
|
24 | + * Instantiates the main class. |
|
25 | + * Creates a client which is passed to the request construct. |
|
26 | + * |
|
27 | + * @auth_string string Authentication string for QuickPay |
|
28 | + * |
|
29 | + * @access public |
|
30 | + */ |
|
31 | 31 | public function __construct($auth_string = '', $additional_headers = array()) |
32 | 32 | { |
33 | 33 | $this->client = new Client($auth_string, $additional_headers); |
@@ -56,7 +56,7 @@ |
||
56 | 56 | ); |
57 | 57 | |
58 | 58 | if (!empty($this->auth_string)) { |
59 | - $this->headers[] = 'Authorization: Basic ' . base64_encode($this->auth_string); |
|
59 | + $this->headers[] = 'Authorization: Basic '.base64_encode($this->auth_string); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | // Instantiate cURL object |