@@ -1,6 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Billow\Droplets; |
| 3 | -use RuntimeException; |
|
| 4 | 3 | /** |
| 5 | 4 | * @author Matt Frost<[email protected] |
| 6 | 5 | * @package Billow |
@@ -2,14 +2,14 @@ |
||
| 2 | 2 | namespace Billow\Droplets; |
| 3 | 3 | use RuntimeException; |
| 4 | 4 | /** |
| 5 | - * @author Matt Frost<[email protected] |
|
| 6 | - * @package Billow |
|
| 7 | - * @license http://opensource.org/licenses/MIT MIT |
|
| 8 | - * @method validate ensure all required values are set |
|
| 9 | - * @method toJson represent the droplet as JSON |
|
| 10 | - * @method toArray represent the droplet as an Array |
|
| 11 | - * @method setImage set the image name |
|
| 12 | - */ |
|
| 5 | + * @author Matt Frost<[email protected] |
|
| 6 | + * @package Billow |
|
| 7 | + * @license http://opensource.org/licenses/MIT MIT |
|
| 8 | + * @method validate ensure all required values are set |
|
| 9 | + * @method toJson represent the droplet as JSON |
|
| 10 | + * @method toArray represent the droplet as an Array |
|
| 11 | + * @method setImage set the image name |
|
| 12 | + */ |
|
| 13 | 13 | abstract class Droplet |
| 14 | 14 | { |
| 15 | 15 | /** |
@@ -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 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | * @return \GuzzleHttp\Message\Response |
| 92 | 92 | * @throws \Billow\Exceptions\ProvisionException |
| 93 | 93 | */ |
| 94 | - public function create(Array $dropletRequest, Array $headers =[]) |
|
| 94 | + public function create(Array $dropletRequest, Array $headers = []) |
|
| 95 | 95 | { |
| 96 | 96 | $headers = $this->prepareHeaders($headers); |
| 97 | 97 | |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | $headers = $this->prepareHeaders($headers); |
| 159 | 159 | $params = ['headers' => $headers]; |
| 160 | 160 | $client = $this->getClient(); |
| 161 | - $endpoint = 'droplets?page='. $page .'&per_page=' . $per_page; |
|
| 161 | + $endpoint = 'droplets?page=' . $page . '&per_page=' . $per_page; |
|
| 162 | 162 | $dropletArray = []; |
| 163 | 163 | try { |
| 164 | 164 | $response = $client->get($endpoint, $params); |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | $dropletArray[] = $factory->getDroplet($droplet); |
| 169 | 169 | } |
| 170 | 170 | return $dropletArray; |
| 171 | - } catch(RequestException $e) { |
|
| 171 | + } catch (RequestException $e) { |
|
| 172 | 172 | $message = 'Retrieval of droplets failed'; |
| 173 | 173 | $code = 0; |
| 174 | 174 | if ($e->hasResponse()) { |