Completed
Push — develop ( eaa9a9...0f88f6 )
by Jamie
02:23
created
src/Eventbrite.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -57,10 +57,10 @@  discard block
 block discarded – undo
57 57
     public function __construct($token, $config = [])
58 58
     {
59 59
         $default_config = [
60
-          'base_uri' => 'https://www.eventbriteapi.com/v3/',
61
-          // Turn exceptions off so we can handle the responses ourselves.
62
-          'exceptions' => false,
63
-          'timeout' => 30,
60
+            'base_uri' => 'https://www.eventbriteapi.com/v3/',
61
+            // Turn exceptions off so we can handle the responses ourselves.
62
+            'exceptions' => false,
63
+            'timeout' => 30,
64 64
         ];
65 65
         $config = array_merge($config, $default_config);
66 66
         // Add this last so it's always there and isn't overwritten.
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             } else {
109 109
                 // This only really happens when the network is interrupted.
110 110
                 throw new BadResponseException('A bad response was received.',
111
-                  $request);
111
+                    $request);
112 112
             }
113 113
         } else {
114 114
             throw new \Exception('Unrecognised HTTP verb.');
@@ -140,8 +140,8 @@  discard block
 block discarded – undo
140 140
         }
141 141
         // Merge the mergeable arrays if necessary.
142 142
         $mergeable = [
143
-          'query' => $params,
144
-          'headers' => $headers,
143
+            'query' => $params,
144
+            'headers' => $headers,
145 145
         ];
146 146
         foreach ($mergeable as $key => $value) {
147 147
             if ($value !== null) {
@@ -182,9 +182,9 @@  discard block
 block discarded – undo
182 182
     {
183 183
         $body = $response->getBody()->getContents();
184 184
         return [
185
-          'code' => $response->getStatusCode(),
186
-          'headers' => $response->getHeaders(),
187
-          'body' => ($this->isValidJson($body)) ? json_decode($body,
185
+            'code' => $response->getStatusCode(),
186
+            'headers' => $response->getHeaders(),
187
+            'body' => ($this->isValidJson($body)) ? json_decode($body,
188 188
             true) : $body,
189 189
         ];
190 190
     }
@@ -233,14 +233,14 @@  discard block
 block discarded – undo
233 233
      * @throws \Exception
234 234
      */
235 235
     public function get(
236
-      $endpoint,
237
-      $params = null,
238
-      $body = null,
239
-      $headers = null,
240
-      $options = []
236
+        $endpoint,
237
+        $params = null,
238
+        $body = null,
239
+        $headers = null,
240
+        $options = []
241 241
     ) {
242 242
         return $this->makeRequest('GET', $endpoint, $params, $body, $headers,
243
-          $options);
243
+            $options);
244 244
     }
245 245
 
246 246
     /**
@@ -253,14 +253,14 @@  discard block
 block discarded – undo
253 253
      * @throws \Exception
254 254
      */
255 255
     public function post(
256
-      $endpoint,
257
-      $params = null,
258
-      $body = null,
259
-      $headers = null,
260
-      $options = []
256
+        $endpoint,
257
+        $params = null,
258
+        $body = null,
259
+        $headers = null,
260
+        $options = []
261 261
     ) {
262 262
         return $this->makeRequest('POST', $endpoint, $params, $body, $headers,
263
-          $options);
263
+            $options);
264 264
     }
265 265
 
266 266
     /**
@@ -273,14 +273,14 @@  discard block
 block discarded – undo
273 273
      * @throws \Exception
274 274
      */
275 275
     public function put(
276
-      $endpoint,
277
-      $params = null,
278
-      $body = null,
279
-      $headers = null,
280
-      $options = []
276
+        $endpoint,
277
+        $params = null,
278
+        $body = null,
279
+        $headers = null,
280
+        $options = []
281 281
     ) {
282 282
         return $this->makeRequest('PUT', $endpoint, $params, $body, $headers,
283
-          $options);
283
+            $options);
284 284
     }
285 285
 
286 286
     /**
@@ -293,14 +293,14 @@  discard block
 block discarded – undo
293 293
      * @throws \Exception
294 294
      */
295 295
     public function patch(
296
-      $endpoint,
297
-      $params = null,
298
-      $body = null,
299
-      $headers = null,
300
-      $options = []
296
+        $endpoint,
297
+        $params = null,
298
+        $body = null,
299
+        $headers = null,
300
+        $options = []
301 301
     ) {
302 302
         return $this->makeRequest('PATCH', $endpoint, $params, $body, $headers,
303
-          $options);
303
+            $options);
304 304
     }
305 305
 
306 306
     /**
@@ -313,14 +313,14 @@  discard block
 block discarded – undo
313 313
      * @throws \Exception
314 314
      */
315 315
     public function delete(
316
-      $endpoint,
317
-      $params = null,
318
-      $body = null,
319
-      $headers = null,
320
-      $options = []
316
+        $endpoint,
317
+        $params = null,
318
+        $body = null,
319
+        $headers = null,
320
+        $options = []
321 321
     ) {
322 322
         return $this->makeRequest('DELETE', $endpoint, $params, $body, $headers,
323
-          $options);
323
+            $options);
324 324
     }
325 325
 
326 326
     /**
Please login to merge, or discard this patch.