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