@@ -46,10 +46,10 @@ |
||
| 46 | 46 | |
| 47 | 47 | try { |
| 48 | 48 | $response = $this->request($method, $url, $options); |
| 49 | - } catch(GuzzleClientException $e) { |
|
| 49 | + } catch (GuzzleClientException $e) { |
|
| 50 | 50 | // This is for 400 errors |
| 51 | 51 | $response = $e->getResponse(); |
| 52 | - } catch(GuzzleServerException $e) { |
|
| 52 | + } catch (GuzzleServerException $e) { |
|
| 53 | 53 | // This is for 500 errors |
| 54 | 54 | $response = $e->getResponse(); |
| 55 | 55 | } catch (GuzzleTransferException $e) { |
@@ -37,31 +37,31 @@ |
||
| 37 | 37 | |
| 38 | 38 | if (isset($config['api'])) { |
| 39 | 39 | if (!empty($config['api']['host'])) { |
| 40 | - $container->setParameter($this->getAlias().'.api.host', $config['api']['host']); |
|
| 40 | + $container->setParameter($this->getAlias() . '.api.host', $config['api']['host']); |
|
| 41 | 41 | } |
| 42 | 42 | if (!empty($config['api']['port'])) { |
| 43 | - $container->setParameter($this->getAlias().'.api.port', $config['api']['port']); |
|
| 43 | + $container->setParameter($this->getAlias() . '.api.port', $config['api']['port']); |
|
| 44 | 44 | } |
| 45 | 45 | if (!empty($config['api']['protocol'])) { |
| 46 | - $container->setParameter($this->getAlias().'.api.protocol', $config['api']['protocol']); |
|
| 46 | + $container->setParameter($this->getAlias() . '.api.protocol', $config['api']['protocol']); |
|
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | if (isset($config['auth'])) { |
| 51 | 51 | if (!empty($config['auth']['client_id'])) { |
| 52 | - $container->setParameter($this->getAlias().'.auth.client_id', $config['auth']['client_id']); |
|
| 52 | + $container->setParameter($this->getAlias() . '.auth.client_id', $config['auth']['client_id']); |
|
| 53 | 53 | } |
| 54 | 54 | if (!empty($config['auth']['username'])) { |
| 55 | - $container->setParameter($this->getAlias().'.auth.username', $config['auth']['username']); |
|
| 55 | + $container->setParameter($this->getAlias() . '.auth.username', $config['auth']['username']); |
|
| 56 | 56 | } |
| 57 | 57 | if (!empty($config['auth']['password'])) { |
| 58 | - $container->setParameter($this->getAlias().'.auth.password', $config['auth']['password']); |
|
| 58 | + $container->setParameter($this->getAlias() . '.auth.password', $config['auth']['password']); |
|
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | if (isset($config['options']) && is_array($config['options'])) { |
| 63 | 63 | $defaultOptions = $config['options']; |
| 64 | 64 | } |
| 65 | - $container->setParameter($this->getAlias().'.options', $defaultOptions); |
|
| 65 | + $container->setParameter($this->getAlias() . '.options', $defaultOptions); |
|
| 66 | 66 | } |
| 67 | 67 | } |