| @@ 492-500 (lines=9) @@ | ||
| 489 | /** |
|
| 490 | * @throws Exception |
|
| 491 | */ |
|
| 492 | private function getRemoteType(): string { |
|
| 493 | foreach (RemoteInstance::$LIST_TYPE as $type) { |
|
| 494 | if (strtolower($this->input->getOption('type')) === strtolower($type)) { |
|
| 495 | return $type; |
|
| 496 | } |
|
| 497 | } |
|
| 498 | ||
| 499 | throw new Exception('Unknown type: ' . implode(', ', RemoteInstance::$LIST_TYPE)); |
|
| 500 | } |
|
| 501 | ||
| 502 | /** |
|
| 503 | * @throws Exception |
|
| @@ 505-513 (lines=9) @@ | ||
| 502 | /** |
|
| 503 | * @throws Exception |
|
| 504 | */ |
|
| 505 | private function getRemoteInterface(): int { |
|
| 506 | foreach (RemoteInstance::$LIST_IFACE as $iface => $def) { |
|
| 507 | if (strtolower($this->input->getOption('iface')) === strtolower($def)) { |
|
| 508 | return $iface; |
|
| 509 | } |
|
| 510 | } |
|
| 511 | ||
| 512 | throw new Exception('Unknown interface: ' . implode(', ', RemoteInstance::$LIST_IFACE)); |
|
| 513 | } |
|
| 514 | ||
| 515 | } |
|
| 516 | ||