@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | /** |
81 | 81 | * Make the call to Eventbrite, only synchronous calls at present. |
82 | 82 | * |
83 | - * @param $http_method |
|
83 | + * @param string $http_method |
|
84 | 84 | * @param $endpoint |
85 | 85 | * @param array $options |
86 | 86 | * |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | /** |
161 | 161 | * Checks a string to see if it's JSON. True if it is, false if it's not. |
162 | 162 | * |
163 | - * @param $string |
|
163 | + * @param string $string |
|
164 | 164 | * |
165 | 165 | * @return bool |
166 | 166 | */ |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | /** |
195 | 195 | * Wrapper shortcut on the call method for "GET" requests. |
196 | 196 | * |
197 | - * @param $endpoint |
|
197 | + * @param string $endpoint |
|
198 | 198 | * @param array $options |
199 | 199 | * |
200 | 200 | * @return array|mixed|\Psr\Http\Message\ResponseInterface |
@@ -58,13 +58,13 @@ discard block |
||
58 | 58 | public function __construct($token, $config = []) |
59 | 59 | { |
60 | 60 | $default_config = [ |
61 | - 'base_uri' => 'https://www.eventbriteapi.com/v3/', |
|
62 | - 'headers' => [ |
|
61 | + 'base_uri' => 'https://www.eventbriteapi.com/v3/', |
|
62 | + 'headers' => [ |
|
63 | 63 | 'User-Agent' => 'jamiehollern\eventbrite v' . self::VERSION . ' ' . \GuzzleHttp\default_user_agent(), |
64 | 64 | 'timeout' => 30, |
65 | - ], |
|
66 | - // Turn exceptions off so we can handle the responses ourselves. |
|
67 | - 'exceptions' => false, |
|
65 | + ], |
|
66 | + // Turn exceptions off so we can handle the responses ourselves. |
|
67 | + 'exceptions' => false, |
|
68 | 68 | ]; |
69 | 69 | $config = array_merge($config, $default_config); |
70 | 70 | if (!empty($token)) { |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | } else { |
117 | 117 | // This only really happens when the network is interrupted. |
118 | 118 | throw new BadResponseException('A bad response was received.', |
119 | - $request); |
|
119 | + $request); |
|
120 | 120 | } |
121 | 121 | } else { |
122 | 122 | throw new \Exception('Unrecognised HTTP verb.'); |
@@ -150,9 +150,9 @@ discard block |
||
150 | 150 | { |
151 | 151 | $body = $response->getBody()->getContents(); |
152 | 152 | return [ |
153 | - 'code' => $response->getStatusCode(), |
|
154 | - 'headers' => $response->getHeaders(), |
|
155 | - 'body' => ($this->isValidJson($body)) ? json_decode($body, |
|
153 | + 'code' => $response->getStatusCode(), |
|
154 | + 'headers' => $response->getHeaders(), |
|
155 | + 'body' => ($this->isValidJson($body)) ? json_decode($body, |
|
156 | 156 | true) : $body, |
157 | 157 | ]; |
158 | 158 | } |