Conditions | 4 |
Paths | 8 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
46 | protected function getExtraOptions(): string |
||
47 | { |
||
48 | $extraOptions = []; |
||
49 | |||
50 | if ($this->pathToPrivateKey) { |
||
51 | $extraOptions[] = "-i {$this->pathToPrivateKey}"; |
||
52 | } |
||
53 | |||
54 | if (! is_null($this->port)) { |
||
55 | $extraOptions[] = "-p {$this->port}"; |
||
56 | } |
||
57 | |||
58 | if (! $this->enableStrictHostChecking) { |
||
59 | $extraOptions[] = '-o StrictHostKeyChecking=no'; |
||
60 | $extraOptions[] = '-o UserKnownHostsFile=/dev/null'; |
||
61 | } |
||
62 | |||
63 | return implode(' ', $extraOptions); |
||
64 | } |
||
65 | |||
71 |