Completed
Push — master ( 434411...5e8f86 )
by Tyler
05:44
created

PasswordRebooter::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
ccs 5
cts 5
cp 1
rs 9.4285
cc 1
eloc 4
nc 1
nop 4
crap 1
1
<?php
2
3
namespace Tylercd100\Rebooter\Drivers\Ssh;
4
5
use Ssh\Authentication\Password;
6
use Ssh\Configuration;
7
use Ssh\Session;
8
9
class PasswordRebooter extends SshRebooter
10
{
11
    /**
12
     * @param string  $host     The host, url or IP address to use
13
     * @param string  $username The username to use
14
     * @param string  $password The password to use
15
     * @param integer $port     The port to use
16
     */
17 12
    public function __construct($host, $username, $password, $port = 22) {
18 12
        $config        = new Configuration($host, $port);
19 12
        $auth          = new Password($username, $password);
20 12
        $this->session = new Session($config, $auth);
21
    }
22
}