Completed
Push — master ( 33d1c7...a9495c )
by Petrică
02:29
created

RemoteProcessesGauge   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 2
dl 0
loc 35
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Petrica
5
 * Date: 5/29/2016
6
 * Time: 16:24
7
 */
8
namespace Petrica\StatsdSystem\Gauge;
9
10
use Petrica\StatsdSystem\Model\RemoteTopCommand;
11
12
class RemoteProcessesGauge extends ProcessesGauge
13
{
14
    /**
15
     * SSH Connection string
16
     *
17
     * @var string
18
     */
19
    protected $sshString;
20
21
    /**
22
     * Path to private key
23
     *
24
     * @var string
25
     */
26
    protected $sshIdentityFile;
27
28
    /**
29
     * Ssh port
30
     *
31
     * @var string
32
     */
33
    protected $sshPort;
34
35
36
    public function __construct($sshString, $sshPort = null, $sshIdentityFile = null, $cpuAbove = 5.0, $memoryAbove = 1.0)
37
    {
38
        parent::__construct($cpuAbove, $memoryAbove);
0 ignored issues
show
Bug introduced by
The call to ProcessesGauge::__construct() misses some required arguments starting with $sshString.
Loading history...
39
40
        $this->sshString = $sshString;
41
        $this->sshIdentityFile = $sshIdentityFile;
42
        $this->sshPort = $sshPort;
43
44
        $this->command = new RemoteTopCommand($this->sshString, $this->sshPort, $this->sshIdentityFile);
45
    }
46
}