Differential D25198 Diff 688 src/applications/meta/panel/PhabricatorApplicationConfigurationPanel.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/meta/panel/PhabricatorApplicationConfigurationPanel.php
Show All 18 Lines | public function setApplication(PhabricatorApplication $application) { | ||||
$this->application = $application; | $this->application = $application; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getApplication() { | public function getApplication() { | ||||
return $this->application; | return $this->application; | ||||
} | } | ||||
public function getPanelURI($path = null) { | /** | ||||
* Get the URI for this application configuration panel. | |||||
valerio.bozzolan: ✅ It seems that most PHPDoc stuff in Phorge ends with the dot, also in the first line. | |||||
* | |||||
* @param string? Optional path to append. | |||||
Done Inline Actions✅ It seems "string?" is an usual way in Phorge to mark an optional parameter like in ./files/PhabricatorImageTransformer.php - I was honestly not aware of that, since PHPDoc does not have that formally. valerio.bozzolan: ✅ It seems "string?" is an usual way in Phorge to mark an optional parameter like in `. | |||||
* @return string Relative URI for the panel. | |||||
*/ | |||||
public function getPanelURI($path = '') { | |||||
Done Inline ActionsI verified that all the code that extends this class does not rely on the old null default. This is 100% legit since the argument goes directly into an ltrim() and so a NULL really should not arrive. valerio.bozzolan: I verified that all the code that extends this class does not rely on the old `null` default. | |||||
$app_key = get_class($this->getApplication()); | $app_key = get_class($this->getApplication()); | ||||
$panel_key = $this->getPanelKey(); | $panel_key = $this->getPanelKey(); | ||||
$base = "/applications/panel/{$app_key}/{$panel_key}/"; | $base = "/applications/panel/{$app_key}/{$panel_key}/"; | ||||
return $base.ltrim($path, '/'); | return $base.ltrim($path, '/'); | ||||
} | } | ||||
/** | /** | ||||
* Return a short, unique string key which identifies this panel. | * Return a short, unique string key which identifies this panel. | ||||
Show All 36 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
✅ It seems that most PHPDoc stuff in Phorge ends with the dot, also in the first line.