Completed
Push — master ( 0db6cd...731920 )
by Jamie
04:49 queued 02:46
created
src/Eventbrite.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
     /**
164 164
      * Checks if the HTTP method being used is correct.
165 165
      *
166
-     * @param $http_method
166
+     * @param string $http_method
167 167
      *
168 168
      * @return bool
169 169
      */
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -242,8 +242,7 @@
 block discarded – undo
242 242
         if ($this->validMethod($method)) {
243 243
             array_unshift($args, $method);
244 244
             return call_user_func_array(array($this, 'makeRequest'), $args);
245
-        }
246
-        else {
245
+        } else {
247 246
             throw new \BadMethodCallException('Method not found in class.');
248 247
         }
249 248
     }
Please login to merge, or discard this patch.