1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-12-23 14:00:55 +01:00

Return $this from setter methods

Summary: Return `$this` from a bunch of setter methods for consistency. See also D13422.

Test Plan: Eyeball it.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13423
This commit is contained in:
Joshua Spence 2015-06-25 22:30:33 +10:00
parent 04d788c79e
commit 5466451b76
4 changed files with 6 additions and 3 deletions

View file

@ -13,6 +13,7 @@ final class ArcanistConfigurationManager extends Phobject {
public function setWorkingCopyIdentity(
ArcanistWorkingCopyIdentity $working_copy) {
$this->workingCopy = $working_copy;
return $this;
}
/* -( Get config )--------------------------------------------------------- */
@ -243,6 +244,7 @@ final class ArcanistConfigurationManager extends Phobject {
$this->customArcrcFilename = $custom_arcrc;
$this->userConfigCache = null;
return $this;
}
public function getUserConfigurationFileLocation() {

View file

@ -69,6 +69,7 @@ abstract class ArcanistXHPASTLinterRule extends Phobject {
final public function setLinter(ArcanistXHPASTLinter $linter) {
$this->linter = $linter;
return $this;
}
/**

View file

@ -64,7 +64,7 @@ final class NoseTestEngine extends ArcanistUnitTestEngine {
foreach ($futures as $test_path => $future) {
try {
list($stdout, $stderr) = $future->resolvex();
} catch(CommandException $exc) {
} catch (CommandException $exc) {
if ($exc->getError() > 1) {
// 'nose' returns 1 when tests are failing/broken.
throw $exc;

View file

@ -250,7 +250,7 @@ class XUnitTestEngine extends ArcanistUnitTestEngine {
try {
$regenerate_future->resolvex();
$result->setResult(ArcanistUnitTestResult::RESULT_PASS);
} catch(CommandException $exc) {
} catch (CommandException $exc) {
if ($exc->getError() > 1) {
throw $exc;
}
@ -296,7 +296,7 @@ class XUnitTestEngine extends ArcanistUnitTestEngine {
try {
$future->resolvex();
$result->setResult(ArcanistUnitTestResult::RESULT_PASS);
} catch(CommandException $exc) {
} catch (CommandException $exc) {
if ($exc->getError() > 1) {
throw $exc;
}