@@ -18,9 +18,9 @@ discard block |
||
18 | 18 | * @param string $host The api host |
19 | 19 | * @param Client $client The guzzle client to use |
20 | 20 | */ |
21 | - public function __construct($token, $server_id, $host = "api.linode.com", Client $client = null){ |
|
21 | + public function __construct($token, $server_id, $host = "api.linode.com", Client $client = null) { |
|
22 | 22 | |
23 | - if(!$client instanceof Client){ |
|
23 | + if (!$client instanceof Client) { |
|
24 | 24 | $client = new Client(); |
25 | 25 | } |
26 | 26 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | * Executes a Boot command |
35 | 35 | * @return \Psr\Http\Message\ResponseInterface |
36 | 36 | */ |
37 | - public function boot(){ |
|
37 | + public function boot() { |
|
38 | 38 | return $this->exec("linode.boot"); |
39 | 39 | } |
40 | 40 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | * Executes a Reboot command |
43 | 43 | * @return \Psr\Http\Message\ResponseInterface |
44 | 44 | */ |
45 | - public function reboot(){ |
|
45 | + public function reboot() { |
|
46 | 46 | return $this->exec("linode.reboot"); |
47 | 47 | } |
48 | 48 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * Executes a Shutdown command |
51 | 51 | * @return \Psr\Http\Message\ResponseInterface |
52 | 52 | */ |
53 | - public function shutdown(){ |
|
53 | + public function shutdown() { |
|
54 | 54 | return $this->exec("linode.shutdown"); |
55 | 55 | } |
56 | 56 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * @param string $action The Linode API action |
60 | 60 | * @return string |
61 | 61 | */ |
62 | - protected function buildRequestUrl($action){ |
|
62 | + protected function buildRequestUrl($action) { |
|
63 | 63 | return "https://{$this->host}/?api_key={$this->token}&api_action={$action}&LinodeID={$this->server_id}"; |
64 | 64 | } |
65 | 65 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * @param string $action |
69 | 69 | * @return \Psr\Http\Message\ResponseInterface |
70 | 70 | */ |
71 | - protected function exec($action){ |
|
71 | + protected function exec($action) { |
|
72 | 72 | $url = $this->buildRequestUrl($action); |
73 | 73 | return $this->client->request('GET', $url); |
74 | 74 | } |