@@ -32,7 +32,7 @@ |
||
| 32 | 32 | 'certificate' => '/path/to/certificate.pem', |
| 33 | 33 | 'key' => '/path/to/key.pem', |
| 34 | 34 | ], |
| 35 | - */ |
|
| 35 | + */ |
|
| 36 | 36 | /** |
| 37 | 37 | * Either use a token or a username + password login. |
| 38 | 38 | * Note for 2fa users, you can only use tokens. |
@@ -25,12 +25,16 @@ |
||
| 25 | 25 | if (isset($configuration['ssl'])) { |
| 26 | 26 | $origin = 'https://' . $configuration['hostname']; |
| 27 | 27 | |
| 28 | - if ($configuration['ssl']['port'] !== 443) $origin .= ':' . $configuration['ssl']['port']; |
|
| 29 | -} else { |
|
| 28 | + if ($configuration['ssl']['port'] !== 443) { |
|
| 29 | + $origin .= ':' . $configuration['ssl']['port']; |
|
| 30 | + } |
|
| 31 | + } else { |
|
| 30 | 32 | $origin = 'http://' . $configuration['hostname']; |
| 31 | 33 | |
| 32 | - if ($configuration['expose']['port'] !== 80) $origin .= ':' . $configuration['expose']['port']; |
|
| 33 | -} |
|
| 34 | + if ($configuration['expose']['port'] !== 80) { |
|
| 35 | + $origin .= ':' . $configuration['expose']['port']; |
|
| 36 | + } |
|
| 37 | + } |
|
| 34 | 38 | |
| 35 | 39 | $injector->define(Handler::class, [ |
| 36 | 40 | ':origin' => $origin, |
@@ -53,11 +53,11 @@ |
||
| 53 | 53 | $promise = $this->client->request($request); |
| 54 | 54 | |
| 55 | 55 | $promise->when(function($error, $result) { |
| 56 | - if($result->getStatus() !== 200) { |
|
| 56 | + if ($result->getStatus() !== 200) { |
|
| 57 | 57 | throw new RequestFailedException( |
| 58 | 58 | 'A non-200 response status (' |
| 59 | 59 | . $result->getStatus() . ' - ' |
| 60 | - . $result->getReason() .') was encountered' |
|
| 60 | + . $result->getReason() . ') was encountered' |
|
| 61 | 61 | ); |
| 62 | 62 | } |
| 63 | 63 | }); |