Completed
Push — master ( f72045...c6c2e9 )
by Tyler
02:09
created
src/Api/LinodeRebooter.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
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, $linodeId, $host = "api.linode.com", Client $client = null){
21
+    public function __construct($token, $linodeId, $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
 block discarded – undo
34 34
      * Executes a Boot command
35 35
      * @return asdfasdfkdkdkdkd
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
 block discarded – undo
42 42
      * Executes a Reboot command
43 43
      * @return asdfasdfkdkdkdkd
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
 block discarded – undo
50 50
      * Executes a Shutdown command
51 51
      * @return asdfasdfkdkdkdkd
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
 block discarded – undo
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->linodeId}";
64 64
     }
65 65
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      * Executes a command on the API
68 68
      * @return asdfasdfkdkdkdkd
69 69
      */
70
-    protected function exec($action){
70
+    protected function exec($action) {
71 71
         $url = $this->buildRequestUrl($action);
72 72
         $res = $this->client->request('GET', $url);
73 73
 
Please login to merge, or discard this patch.
Doc Comments   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     /**
34 34
      * Executes a Boot command
35
-     * @return GuzzleHttp\Psr7\Response
35
+     * @return \Psr\Http\Message\ResponseInterface
36 36
      */
37 37
     public function boot(){
38 38
         return $this->exec("linode.boot");
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
     /**
42 42
      * Executes a Reboot command
43
-     * @return GuzzleHttp\Psr7\Response
43
+     * @return \Psr\Http\Message\ResponseInterface
44 44
      */
45 45
     public function reboot(){
46 46
         return $this->exec("linode.reboot");
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     /**
50 50
      * Executes a Shutdown command
51
-     * @return GuzzleHttp\Psr7\Response
51
+     * @return \Psr\Http\Message\ResponseInterface
52 52
      */
53 53
     public function shutdown(){
54 54
         return $this->exec("linode.shutdown");
@@ -65,7 +65,8 @@  discard block
 block discarded – undo
65 65
 
66 66
     /**
67 67
      * Executes a command on the API
68
-     * @return GuzzleHttp\Psr7\Response
68
+     * @param string $action
69
+     * @return \Psr\Http\Message\ResponseInterface
69 70
      */
70 71
     protected function exec($action){
71 72
         $url = $this->buildRequestUrl($action);
Please login to merge, or discard this patch.