Code Duplication    Length = 11-11 lines in 2 locations

src/Api/DigitalOceanRebooter.php 1 location

@@ 21-31 (lines=11) @@
18
     * @param string $host      The api host
19
     * @param Client $client    The guzzle client to use
20
     */
21
    public function __construct($token, $server_id, $host = "api.digitalocean.com", Client $client = null){
22
23
        if(!$client instanceof Client){
24
            $client = new Client();
25
        }
26
27
        $this->client = $client;
28
        $this->token = $token;
29
        $this->server_id = $server_id;
30
        $this->host = $host;
31
    }
32
33
    /**
34
     * Executes a Boot command

src/Api/LinodeRebooter.php 1 location

@@ 21-31 (lines=11) @@
18
     * @param string $host      The api host
19
     * @param Client $client    The guzzle client to use
20
     */
21
    public function __construct($token, $server_id, $host = "api.linode.com", Client $client = null){
22
23
        if(!$client instanceof Client){
24
            $client = new Client();
25
        }
26
27
        $this->client = $client;
28
        $this->token = $token;
29
        $this->server_id = $server_id;
30
        $this->host = $host;
31
    }
32
33
    /**
34
     * Executes a Boot command