@@ -62,10 +62,10 @@ discard block |
||
62 | 62 | public function __construct($token, $config = []) |
63 | 63 | { |
64 | 64 | $default_config = [ |
65 | - 'base_uri' => 'https://www.eventbriteapi.com/v3/', |
|
66 | - // Turn exceptions off so we can handle the responses ourselves. |
|
67 | - 'exceptions' => false, |
|
68 | - 'timeout' => 30, |
|
65 | + 'base_uri' => 'https://www.eventbriteapi.com/v3/', |
|
66 | + // Turn exceptions off so we can handle the responses ourselves. |
|
67 | + 'exceptions' => false, |
|
68 | + 'timeout' => 30, |
|
69 | 69 | ]; |
70 | 70 | $config = array_merge($config, $default_config); |
71 | 71 | // Add this last so it's always there and isn't overwritten. |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | } else { |
114 | 114 | // This only really happens when the network is interrupted. |
115 | 115 | throw new BadResponseException('A bad response was received.', |
116 | - $request); |
|
116 | + $request); |
|
117 | 117 | } |
118 | 118 | } else { |
119 | 119 | throw new \Exception('Unrecognised HTTP verb.'); |
@@ -145,8 +145,8 @@ discard block |
||
145 | 145 | } |
146 | 146 | // Merge the mergeable arrays if necessary. |
147 | 147 | $mergeable = [ |
148 | - 'query' => $params, |
|
149 | - 'headers' => $headers, |
|
148 | + 'query' => $params, |
|
149 | + 'headers' => $headers, |
|
150 | 150 | ]; |
151 | 151 | foreach ($mergeable as $key => $value) { |
152 | 152 | if ($value !== null) { |
@@ -186,9 +186,9 @@ discard block |
||
186 | 186 | { |
187 | 187 | $body = $response->getBody()->getContents(); |
188 | 188 | return [ |
189 | - 'code' => $response->getStatusCode(), |
|
190 | - 'headers' => $response->getHeaders(), |
|
191 | - 'body' => ($this->isValidJson($body)) ? json_decode($body, |
|
189 | + 'code' => $response->getStatusCode(), |
|
190 | + 'headers' => $response->getHeaders(), |
|
191 | + 'body' => ($this->isValidJson($body)) ? json_decode($body, |
|
192 | 192 | true) : $body, |
193 | 193 | ]; |
194 | 194 | } |