@@ -19,7 +19,7 @@ |
||
19 | 19 | */ |
20 | 20 | public function getDroplet(Array $dropletInfo) |
21 | 21 | { |
22 | - if ( !isset($dropletInfo['image']['distribution'])) { |
|
22 | + if (!isset($dropletInfo['image']['distribution'])) { |
|
23 | 23 | throw new InvalidArgumentException('Image information not found in droplet info'); |
24 | 24 | } |
25 | 25 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | * |
49 | 49 | * @param Array $headers |
50 | 50 | * @param string $body |
51 | - * @return \GuzzleHttp\Message\Request |
|
51 | + * @return Request |
|
52 | 52 | */ |
53 | 53 | public function getRequest(Array $headers = [], $body = '') |
54 | 54 | { |
@@ -1,7 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace Billow\Actions; |
3 | 3 | use GuzzleHttp\Psr7\Request; |
4 | -use GuzzleHttp\Psr7\Stream; |
|
5 | 4 | use RuntimeException; |
6 | 5 | |
7 | 6 | /** |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * @return \GuzzleHttp\Message\ResponseInterface |
91 | 91 | * @throws \Billow\Exceptions\ProvisionException |
92 | 92 | */ |
93 | - public function create(Array $dropletRequest, Array $headers =[]) |
|
93 | + public function create(Array $dropletRequest, Array $headers = []) |
|
94 | 94 | { |
95 | 95 | $headers = $this->prepareHeaders($headers); |
96 | 96 | |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $params = ['headers' => $headers]; |
128 | 128 | $client = $this->getClient(); |
129 | 129 | try { |
130 | - $response = $client->get('droplets/' . $dropletId, $params); |
|
130 | + $response = $client->get('droplets/'.$dropletId, $params); |
|
131 | 131 | $factory = $this->getFactory(); |
132 | 132 | $dropletArray = json_decode($response->getBody(), true); |
133 | 133 | return $factory->getDroplet($dropletArray['droplet']); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $headers = $this->prepareHeaders($headers); |
157 | 157 | $params = ['headers' => $headers]; |
158 | 158 | $client = $this->getClient(); |
159 | - $endpoint = 'droplets?page='. $page .'&per_page=' . $per_page; |
|
159 | + $endpoint = 'droplets?page='.$page.'&per_page='.$per_page; |
|
160 | 160 | $dropletArray = []; |
161 | 161 | $dropletArray['droplets'] = []; |
162 | 162 | $dropletArray['meta'] = []; |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $dropletArray['meta'] = $responseArray['meta']; |
172 | 172 | $dropletArray['links'] = $responseArray['links']; |
173 | 173 | return $dropletArray; |
174 | - } catch(RequestException $e) { |
|
174 | + } catch (RequestException $e) { |
|
175 | 175 | $message = 'Retrieval of droplets failed'; |
176 | 176 | $code = 0; |
177 | 177 | if ($e->hasResponse()) { |