1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-26 08:42:40 +01:00

Return $this from setters

Summary:
Most setters returns `$this` but some don't.
I guess it's not by purpose.

Test Plan:
  arc lint

Reviewers: epriestley

Reviewed By: epriestley

CC: aran

Differential Revision: https://secure.phabricator.com/D2084
This commit is contained in:
vrana 2012-04-02 18:35:19 -07:00
parent 39b3778287
commit 8971a91444
7 changed files with 11 additions and 0 deletions

View file

@ -77,6 +77,7 @@ final class BranchInfo {
public function setCurrent() { public function setCurrent() {
$this->currentHead = true; $this->currentHead = true;
return $this;
} }
public function isCurrentHead() { public function isCurrentHead() {
@ -86,6 +87,7 @@ final class BranchInfo {
public function setStatus($status) { public function setStatus($status) {
$this->status = $status; $this->status = $status;
return $this;
} }
public function getStatus() { public function getStatus() {

View file

@ -119,6 +119,7 @@ abstract class ArcanistLintEngine {
public function setHookAPI(ArcanistHookAPI $hook_api) { public function setHookAPI(ArcanistHookAPI $hook_api) {
$this->hookAPI = $hook_api; $this->hookAPI = $hook_api;
return $this;
} }
public function getHookAPI() { public function getHookAPI() {

View file

@ -73,6 +73,7 @@ final class ArcanistPhutilModuleLinter extends ArcanistLinter {
private function setModuleInfo($key, array $info) { private function setModuleInfo($key, array $info) {
$this->moduleInfo[$key] = $info; $this->moduleInfo[$key] = $info;
return $this;
} }
private function getModulePathOnDisk($key) { private function getModulePathOnDisk($key) {

View file

@ -34,10 +34,12 @@ final class ArcanistBundle {
public function setConduit(ConduitClient $conduit) { public function setConduit(ConduitClient $conduit) {
$this->conduit = $conduit; $this->conduit = $conduit;
return $this;
} }
public function setProjectID($project_id) { public function setProjectID($project_id) {
$this->projectID = $project_id; $this->projectID = $project_id;
return $this;
} }
public function getProjectID() { public function getProjectID() {
@ -46,6 +48,7 @@ final class ArcanistBundle {
public function setBaseRevision($base_revision) { public function setBaseRevision($base_revision) {
$this->baseRevision = $base_revision; $this->baseRevision = $base_revision;
return $this;
} }
public function setEncoding($encoding) { public function setEncoding($encoding) {

View file

@ -50,6 +50,7 @@ final class ArcanistDiffParser {
public function setTryEncoding($encoding) { public function setTryEncoding($encoding) {
$this->tryEncoding = $encoding; $this->tryEncoding = $encoding;
return $this;
} }
public function forcePath($path) { public function forcePath($path) {

View file

@ -65,6 +65,7 @@ abstract class ArcanistBaseUnitTestEngine {
final public function setEnableAsyncTests($enable_async_tests) { final public function setEnableAsyncTests($enable_async_tests) {
$this->enableAsyncTests = $enable_async_tests; $this->enableAsyncTests = $enable_async_tests;
return $this;
} }
final public function getEnableAsyncTests() { final public function getEnableAsyncTests() {
@ -89,6 +90,7 @@ abstract class ArcanistBaseUnitTestEngine {
*/ */
public function setDifferentialDiffID($id) { public function setDifferentialDiffID($id) {
$this->diffID = $id; $this->diffID = $id;
return $this;
} }
/** /**

View file

@ -269,6 +269,7 @@ EOTEXT
if ($this->engine) { if ($this->engine) {
$this->engine->setDifferentialDiffID($id); $this->engine->setDifferentialDiffID($id);
} }
return $this;
} }
private static function formatTestDuration($seconds) { private static function formatTestDuration($seconds) {