Conditions | 3 |
Paths | 4 |
Total Lines | 22 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 3.0261 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
39 | 1 | protected function buildCommand() |
|
40 | { |
||
41 | 1 | $command = new Command(); |
|
42 | $command |
||
43 | 1 | ->setCommand('ssh') |
|
44 | 1 | ->addArgument(new Argument($this->sshString)); |
|
45 | |||
46 | 1 | if (null !== $this->sshPort) { |
|
47 | 1 | $command->addArgument(new Argument('-p', $this->sshPort)); |
|
48 | 1 | } |
|
49 | |||
50 | 1 | if (null !== $this->sshIdentityFile) { |
|
51 | $command->addArgument(new Argument('-i', $this->sshIdentityFile)); |
||
52 | } |
||
53 | |||
54 | $command |
||
55 | 1 | ->addArgument(new Argument('top', null, null, false)) |
|
56 | 1 | ->addArgument(new Argument('-b')) |
|
57 | 1 | ->addArgument(new Argument('-n', 1)); |
|
58 | |||
59 | 1 | return $command; |
|
60 | } |
||
61 | } |