Completed
Push — master ( 0190e6...eed21f )
by Tyler
495:46 queued 493:37
created

PasswordRebooter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 4
dl 0
loc 14
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 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
}