@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | * @param string $host The api host |
| 14 | 14 | * @param Client $client The guzzle client to use |
| 15 | 15 | */ |
| 16 | - public function __construct($token, $server_id, $host = "api.vultr.com", Client $client = null){ |
|
| 16 | + public function __construct($token, $server_id, $host = "api.vultr.com", Client $client = null) { |
|
| 17 | 17 | parent::__construct($token, $server_id, $host, $client); |
| 18 | 18 | } |
| 19 | 19 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | * Executes a Boot command |
| 22 | 22 | * @return \Psr\Http\Message\ResponseInterface |
| 23 | 23 | */ |
| 24 | - public function boot(){ |
|
| 24 | + public function boot() { |
|
| 25 | 25 | return $this->exec("start"); |
| 26 | 26 | } |
| 27 | 27 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | * Executes a Reboot command |
| 30 | 30 | * @return \Psr\Http\Message\ResponseInterface |
| 31 | 31 | */ |
| 32 | - public function reboot(){ |
|
| 32 | + public function reboot() { |
|
| 33 | 33 | return $this->exec("reboot"); |
| 34 | 34 | } |
| 35 | 35 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | * Executes a Shutdown command |
| 38 | 38 | * @return \Psr\Http\Message\ResponseInterface |
| 39 | 39 | */ |
| 40 | - public function shutdown(){ |
|
| 40 | + public function shutdown() { |
|
| 41 | 41 | return $this->exec("halt"); |
| 42 | 42 | } |
| 43 | 43 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | * @param string $action The Vultr API action |
| 47 | 47 | * @return string |
| 48 | 48 | */ |
| 49 | - protected function buildRequestUrl($action){ |
|
| 49 | + protected function buildRequestUrl($action) { |
|
| 50 | 50 | return "https://{$this->host}/v1/server/{$action}"; |
| 51 | 51 | } |
| 52 | 52 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | * @param string $action The Vultr API action |
| 56 | 56 | * @return array |
| 57 | 57 | */ |
| 58 | - protected function buildRequestData($action){ |
|
| 58 | + protected function buildRequestData($action) { |
|
| 59 | 59 | return ["SUBID"=>$this->server_id]; |
| 60 | 60 | } |
| 61 | 61 | |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | * @param string $action |
| 65 | 65 | * @return \Psr\Http\Message\ResponseInterface |
| 66 | 66 | */ |
| 67 | - protected function exec($action){ |
|
| 67 | + protected function exec($action) { |
|
| 68 | 68 | $url = $this->buildRequestUrl($action); |
| 69 | 69 | $data = $this->buildRequestData($action); |
| 70 | 70 | |