Completed
Pull Request — master (#2)
by Tyler
184:30 queued 119:34
created

PasswordRebooter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

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
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
    public function __construct($host, $username, $password, $port = 22) {
19
        $config        = new Configuration($host,$port);
20
        $auth          = new Password($username, $password);
21
        $this->session = new Session($config,$auth);
22
    }
23
}