Differential D25182 Diff 749 src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php
Show First 20 Lines • Show All 213 Lines • ▼ Show 20 Lines | private function buildBasics() { | ||||
$name = $repository->getName(); | $name = $repository->getName(); | ||||
$view->addProperty(pht('Name'), $name); | $view->addProperty(pht('Name'), $name); | ||||
$type = PhabricatorRepositoryType::getNameForRepositoryType( | $type = PhabricatorRepositoryType::getNameForRepositoryType( | ||||
$repository->getVersionControlSystem()); | $repository->getVersionControlSystem()); | ||||
$view->addProperty(pht('Type'), $type); | $view->addProperty(pht('Type'), $type); | ||||
$callsign = $repository->getCallsign(); | $callsign = $repository->getCallsign(); | ||||
if (!strlen($callsign)) { | if (!phutil_nonempty_string($callsign)) { | ||||
valerio.bozzolan: ✅ I verified the above line
The `$callsign` is really always a string or null.
The function… | |||||
$callsign = phutil_tag('em', array(), pht('No Callsign')); | $callsign = phutil_tag('em', array(), pht('No Callsign')); | ||||
} | } | ||||
$view->addProperty(pht('Callsign'), $callsign); | $view->addProperty(pht('Callsign'), $callsign); | ||||
$short_name = $repository->getRepositorySlug(); | $short_name = $repository->getRepositorySlug(); | ||||
if ($short_name === null) { | if ($short_name === null) { | ||||
$short_name = phutil_tag('em', array(), pht('No Short Name')); | $short_name = phutil_tag('em', array(), pht('No Short Name')); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 591 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
✅ I verified the above line
The $callsign is really always a string or null.
The function phutil_nonempty_string() will report any alien type, and that is OK.