@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | $this->checkForCurl(); |
| 28 | 28 | |
| 29 | 29 | return $this->send($json); |
| 30 | - }catch (UnavailableException $e) { |
|
| 30 | + } catch (UnavailableException $e) { |
|
| 31 | 31 | |
| 32 | 32 | } |
| 33 | 33 | } |
@@ -66,15 +66,15 @@ discard block |
||
| 66 | 66 | CURLOPT_HTTPHEADER, |
| 67 | 67 | array( |
| 68 | 68 | 'Content-Type: application/json', |
| 69 | - 'Content-Length: ' . strlen($data) |
|
| 69 | + 'Content-Length: '.strlen($data) |
|
| 70 | 70 | ) |
| 71 | 71 | ); |
| 72 | 72 | $return = curl_exec($ch); |
| 73 | 73 | $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); |
| 74 | - if ($code >= 500) { |
|
| 74 | + if ($code>=500) { |
|
| 75 | 75 | throw new UnavailableException('The API could not be reached.'); |
| 76 | 76 | } |
| 77 | - if ($code >= 400) { |
|
| 77 | + if ($code>=400) { |
|
| 78 | 78 | throw new UnavailableException('There has been an error reaching the API.'); |
| 79 | 79 | } |
| 80 | 80 | |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | $this->checkForCurl(); |
| 28 | 28 | |
| 29 | 29 | return $this->send($json); |
| 30 | - }catch (UnavailableException $e) { |
|
| 30 | + } catch (UnavailableException $e) { |
|
| 31 | 31 | |
| 32 | 32 | } |
| 33 | 33 | } |