Completed
Push — master ( 0190e6...eed21f )
by Tyler
495:46 queued 493:37
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\Ssh;
4
5
use Ssh\Authentication\Password;
6
use Ssh\Configuration;
7
use Ssh\Session;
8
use Tylercd100\Rebooter\SshRebooter;
9
10
class PasswordRebooter extends SshRebooter
11
{
12
    /**
13
     * @param string  $host     The host, url or IP address to use
14
     * @param string  $username The username to use
15
     * @param string  $password The password to use
16
     * @param integer $port     The port to use
17
     */
18 12
    public function __construct($host, $username, $password, $port = 22) {
19 12
        $config        = new Configuration($host,$port);
20 12
        $auth          = new Password($username, $password);
21 12
        $this->session = new Session($config,$auth);
22
    }
23
}