Differential D25132 Diff 537 src/applications/search/menuitem/PhabricatorEditEngineProfileMenuItem.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/menuitem/PhabricatorEditEngineProfileMenuItem.php
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | final class PhabricatorEditEngineProfileMenuItem | ||||
} | } | ||||
public function getDisplayName( | public function getDisplayName( | ||||
PhabricatorProfileMenuItemConfiguration $config) { | PhabricatorProfileMenuItemConfiguration $config) { | ||||
$form = $this->getForm(); | $form = $this->getForm(); | ||||
if (!$form) { | if (!$form) { | ||||
return pht('(Restricted/Invalid Form)'); | return pht('(Restricted/Invalid Form)'); | ||||
} | } | ||||
if (strlen($this->getName($config))) { | if (phutil_nonempty_string($this->getName($config))) { | ||||
valerio.bozzolan: ✅ OK since the expected input domain is **NULL** (default) or a **string**. The phutil will… | |||||
return $this->getName($config); | return $this->getName($config); | ||||
} else { | } else { | ||||
return $form->getName(); | return $form->getName(); | ||||
} | } | ||||
} | } | ||||
public function buildEditEngineFields( | public function buildEditEngineFields( | ||||
PhabricatorProfileMenuItemConfiguration $config) { | PhabricatorProfileMenuItemConfiguration $config) { | ||||
▲ Show 20 Lines • Show All 95 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
✅ OK since the expected input domain is NULL (default) or a string. The phutil will throw for alien types, and it's OK.
Context input: