Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/PhabricatorRepository.php
Show First 20 Lines • Show All 2,474 Lines • ▼ Show 20 Lines | public function newBuiltinURIs() { | ||||
$has_http = ($has_http && $allow_http); | $has_http = ($has_http && $allow_http); | ||||
// HTTP is not supported for Subversion. | // HTTP is not supported for Subversion. | ||||
if ($this->isSVN()) { | if ($this->isSVN()) { | ||||
$has_http = false; | $has_http = false; | ||||
$has_https = false; | $has_https = false; | ||||
} | } | ||||
$has_ssh = (bool)strlen(PhabricatorEnv::getEnvConfig('phd.user')); | $has_ssh = PhabricatorEnv::getEnvConfigStr('phd.user') !== ''; | ||||
valerio.bozzolan: Using `strlen()` to assure the value as a string, then getting its char count, then casting to… | |||||
Done Inline ActionsI mean, it was definitely too much. I have no doubts about that. It was just to say. valerio.bozzolan: I mean, it was definitely too much. I have no doubts about that. It was just to say. | |||||
$protocol_map = array( | $protocol_map = array( | ||||
PhabricatorRepositoryURI::BUILTIN_PROTOCOL_SSH => $has_ssh, | PhabricatorRepositoryURI::BUILTIN_PROTOCOL_SSH => $has_ssh, | ||||
PhabricatorRepositoryURI::BUILTIN_PROTOCOL_HTTPS => $has_https, | PhabricatorRepositoryURI::BUILTIN_PROTOCOL_HTTPS => $has_https, | ||||
PhabricatorRepositoryURI::BUILTIN_PROTOCOL_HTTP => $has_http, | PhabricatorRepositoryURI::BUILTIN_PROTOCOL_HTTP => $has_http, | ||||
); | ); | ||||
$uris = array(); | $uris = array(); | ||||
▲ Show 20 Lines • Show All 393 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
Using strlen() to assure the value as a string, then getting its char count, then casting to bool was probably too much.