Differential D25162 Diff 584 src/applications/transactions/editengine/PhabricatorEditEngineSubtype.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/editengine/PhabricatorEditEngineSubtype.php
Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | public function setMutations($mutations) { | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getMutations() { | public function getMutations() { | ||||
return $this->mutations; | return $this->mutations; | ||||
} | } | ||||
public function hasTagView() { | public function hasTagView() { | ||||
return (bool)strlen($this->getTagText()); | return phutil_nonempty_string($this->getTagText()); | ||||
valerio.bozzolan: ✅ The only usage of `setTagText()` seems to be in `PhabricatorEditEngineSubtype` and the input… | |||||
} | } | ||||
public function newTagView() { | public function newTagView() { | ||||
$view = id(new PHUITagView()) | $view = id(new PHUITagView()) | ||||
->setType(PHUITagView::TYPE_OUTLINE) | ->setType(PHUITagView::TYPE_OUTLINE) | ||||
->setName($this->getTagText()); | ->setName($this->getTagText()); | ||||
$color = $this->getColor(); | $color = $this->getColor(); | ||||
▲ Show 20 Lines • Show All 217 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
✅ The only usage of setTagText() seems to be in PhabricatorEditEngineSubtype and the input domain is just a string coming from phutil_utf8_strtoupper() (like "BUG") or null (default). The phutil_nonempty_string() will report alien values and this is OK.
Also, the method was returning a bool, and it still returns a bool.