SSH2Config   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 56
rs 10
c 0
b 0
f 0
ccs 11
cts 11
cp 1
wmc 4
lcom 0
cbo 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getHost() 0 4 1
A getPort() 0 4 1
A getMethods() 0 4 1
1
<?php
2
3
namespace Dazzle\SSH;
4
5
class SSH2Config implements SSH2ConfigInterface
6
{
7
    /**
8
     * @var string
9
     */
10
    protected $host;
11
12
    /**
13
     * @var int
14
     */
15
    protected $port;
16
17
    /**
18
     * @var mixed
19
     */
20
    protected $methods;
21
22
    /**
23
     * @param string $host
24
     * @param int $port
25
     * @param mixed $methods
26
     */
27 28
    public function __construct($host = 'localhost', $port = 22, $methods = [])
28
    {
29 28
        $this->host = $host;
30 28
        $this->port = $port;
31 28
        $this->methods = $methods;
32 28
    }
33
34
    /**
35
     * @override
36
     * @inheritDoc
37
     */
38 23
    public function getHost()
39
    {
40 23
        return $this->host;
41
    }
42
43
    /**
44
     * @override
45
     * @inheritDoc
46
     */
47 23
    public function getPort()
48
    {
49 23
        return $this->port;
50
    }
51
52
    /**
53
     * @override
54
     * @inheritDoc
55
     */
56 23
    public function getMethods()
57
    {
58 23
        return $this->methods;
59
    }
60
}
61