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

RemoteProcessesGauge::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 10
rs 9.4285
cc 1
eloc 6
nc 1
nop 5
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
}