Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/cluster/PhabricatorDatabaseRef.php
Show First 20 Lines • Show All 223 Lines • ▼ Show 20 Lines | final class PhabricatorDatabaseRef | ||||
public function getDisplayName() { | public function getDisplayName() { | ||||
return $this->getRefKey(); | return $this->getRefKey(); | ||||
} | } | ||||
public function getRefKey() { | public function getRefKey() { | ||||
$host = $this->getHost(); | $host = $this->getHost(); | ||||
$port = $this->getPort(); | $port = $this->getPort(); | ||||
if (strlen($port)) { | if ($port) { | ||||
valerio.bozzolan: This short syntax is appropriate for this case where the subject must be a valid port, and zero… | |||||
return "{$host}:{$port}"; | return "{$host}:{$port}"; | ||||
} | } | ||||
return $host; | return $host; | ||||
} | } | ||||
public static function getConnectionStatusMap() { | public static function getConnectionStatusMap() { | ||||
return array( | return array( | ||||
▲ Show 20 Lines • Show All 508 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
This short syntax is appropriate for this case where the subject must be a valid port, and zero is not a valid port.