mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01:00
Return $this
from setter methods
Summary: Return `$this` from setter methods for consistency. I started writing a [[https://secure.phabricator.com/differential/diff/32506/ | linter rule]] to detect this, but I don't think it is trivial to do this properly. Test Plan: Eyeball it. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D13422
This commit is contained in:
parent
acb1eb81cc
commit
f2435fd1d0
12 changed files with 15 additions and 0 deletions
|
@ -88,6 +88,7 @@ abstract class PhabricatorAphlictManagementWorkflow
|
|||
|
||||
final protected function setDebug($debug) {
|
||||
$this->debug = $debug;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public static function requireExtensions() {
|
||||
|
|
|
@ -257,6 +257,7 @@ final class DifferentialChangesetParser extends Phobject {
|
|||
|
||||
$this->originalLeft = $left;
|
||||
$this->originalRight = $right;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function diffOriginals() {
|
||||
|
|
|
@ -370,6 +370,7 @@ final class DivinerAtom extends Phobject {
|
|||
|
||||
public function setProperty($key, $value) {
|
||||
$this->properties[$key] = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getProperties() {
|
||||
|
|
|
@ -15,6 +15,7 @@ final class LegalpadDocumentEditor
|
|||
|
||||
private function setIsContribution($is_contribution) {
|
||||
$this->isContribution = $is_contribution;
|
||||
return $this;
|
||||
}
|
||||
|
||||
private function isContribution() {
|
||||
|
|
|
@ -20,6 +20,7 @@ final class PhabricatorMetaMTAMailBody extends Phobject {
|
|||
|
||||
public function setViewer($viewer) {
|
||||
$this->viewer = $viewer;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/* -( Composition )-------------------------------------------------------- */
|
||||
|
|
|
@ -24,6 +24,7 @@ final class PasteEmbedView extends AphrontView {
|
|||
|
||||
public function setLines($lines) {
|
||||
$this->lines = $lines;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function render() {
|
||||
|
|
|
@ -302,6 +302,8 @@ final class ReleephRequestTransactionalEditor
|
|||
'RQ'.$id));
|
||||
break;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -110,6 +110,7 @@ abstract class ReleephFieldSpecification
|
|||
$this->getRequiredStorageKey());
|
||||
$this->validate($value);
|
||||
$this->setValue($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -118,6 +118,7 @@ abstract class ReleephLevelFieldSpecification
|
|||
pht("Unknown %s level name '%s'", $label, $name));
|
||||
}
|
||||
$this->setValue($level);
|
||||
return $this;
|
||||
}
|
||||
|
||||
private $nameMap = array();
|
||||
|
|
|
@ -438,6 +438,8 @@ final class PhabricatorRepositoryRefEngine
|
|||
PhabricatorWorker::scheduleTask($class, $data);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -513,6 +513,8 @@ abstract class PhabricatorApplicationSearchEngine extends Phobject {
|
|||
PhabricatorProjectObjectHasProjectEdgeType::EDGECONST,
|
||||
$constraints);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ abstract class PhabricatorStandardCustomFieldPHIDs
|
|||
}
|
||||
}
|
||||
$this->setFieldValue($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function readApplicationSearchValueFromRequest(
|
||||
|
|
Loading…
Reference in a new issue