mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 16:52:41 +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/D2085
This commit is contained in:
parent
021c1b5a05
commit
67e10e60f2
14 changed files with 29 additions and 9 deletions
|
@ -47,6 +47,7 @@ abstract class AphrontApplicationConfiguration {
|
|||
|
||||
final public function setConsole($console) {
|
||||
$this->console = $console;
|
||||
return $this;
|
||||
}
|
||||
|
||||
final public function buildController() {
|
||||
|
|
|
@ -289,6 +289,8 @@ final class AphrontRequest {
|
|||
$base_domain,
|
||||
$is_secure,
|
||||
$http_only = true);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
final public function setUser($user) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* Copyright 2011 Facebook, Inc.
|
||||
* Copyright 2012 Facebook, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -24,10 +24,12 @@ final class PhabricatorDaemonLogEventsView extends AphrontView {
|
|||
|
||||
public function setEvents(array $events) {
|
||||
$this->events = $events;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setCombinedLog($is_combined) {
|
||||
$this->combinedLog = $is_combined;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setUser(PhabricatorUser $user) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* Copyright 2011 Facebook, Inc.
|
||||
* Copyright 2012 Facebook, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -23,6 +23,7 @@ final class PhabricatorDaemonLogListView extends AphrontView {
|
|||
|
||||
public function setDaemonLogs(array $daemon_logs) {
|
||||
$this->daemonLogs = $daemon_logs;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setUser(PhabricatorUser $user) {
|
||||
|
|
|
@ -36,10 +36,12 @@ final class DifferentialAddCommentView extends AphrontView {
|
|||
|
||||
public function setActionURI($uri) {
|
||||
$this->actionURI = $uri;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setUser(PhabricatorUser $user) {
|
||||
$this->user = $user;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setDraft($draft) {
|
||||
|
|
|
@ -58,6 +58,7 @@ final class DifferentialInlineCommentView extends AphrontView {
|
|||
|
||||
public function setPreview($preview) {
|
||||
$this->preview = $preview;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function render() {
|
||||
|
|
|
@ -109,6 +109,7 @@ abstract class DiffusionFileContentQuery extends DiffusionQuery {
|
|||
|
||||
public function setNeedsBlame($needs_blame) {
|
||||
$this->needsBlame = $needs_blame;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getNeedsBlame() {
|
||||
|
|
|
@ -23,10 +23,12 @@ final class DiffusionEmptyResultView extends DiffusionView {
|
|||
|
||||
public function setBrowseQuery($browse_query) {
|
||||
$this->browseQuery = $browse_query;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setView($view) {
|
||||
$this->view = $view;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function render() {
|
||||
|
|
|
@ -31,6 +31,7 @@ abstract class ManiphestAuxiliaryFieldSpecification {
|
|||
|
||||
public function setLabel($val) {
|
||||
$this->label = $val;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLabel() {
|
||||
|
@ -39,6 +40,7 @@ abstract class ManiphestAuxiliaryFieldSpecification {
|
|||
|
||||
public function setAuxiliaryKey($val) {
|
||||
$this->auxiliaryKey = $val;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAuxiliaryKey() {
|
||||
|
@ -47,6 +49,7 @@ abstract class ManiphestAuxiliaryFieldSpecification {
|
|||
|
||||
public function setCaption($val) {
|
||||
$this->caption = $val;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCaption() {
|
||||
|
@ -55,6 +58,7 @@ abstract class ManiphestAuxiliaryFieldSpecification {
|
|||
|
||||
public function setValue($val) {
|
||||
$this->value = $val;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getValue() {
|
||||
|
@ -69,9 +73,9 @@ abstract class ManiphestAuxiliaryFieldSpecification {
|
|||
return false;
|
||||
}
|
||||
|
||||
public function setType($val)
|
||||
{
|
||||
public function setType($val) {
|
||||
$this->type = $val;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getType() {
|
||||
|
|
|
@ -134,7 +134,7 @@ class ManiphestAuxiliaryFieldDefaultSpecification
|
|||
|
||||
public function setValueFromRequest($request) {
|
||||
$aux_post_values = $request->getArr('auxiliary');
|
||||
$this->setValue(idx($aux_post_values, $this->getAuxiliaryKey(), ''));
|
||||
return $this->setValue(idx($aux_post_values, $this->getAuxiliaryKey(), ''));
|
||||
}
|
||||
|
||||
public function getValueForStorage() {
|
||||
|
@ -142,7 +142,7 @@ class ManiphestAuxiliaryFieldDefaultSpecification
|
|||
}
|
||||
|
||||
public function setValueFromStorage($value) {
|
||||
$this->setValue($value);
|
||||
return $this->setValue($value);
|
||||
}
|
||||
|
||||
public function validate() {
|
||||
|
|
|
@ -157,6 +157,7 @@ final class PhabricatorProjectEditor {
|
|||
default:
|
||||
throw new Exception("Unknown transaction type '{$type}'!");
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
private function applyTransactionEffect(
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* Copyright 2011 Facebook, Inc.
|
||||
* Copyright 2012 Facebook, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -39,6 +39,7 @@ final class CelerityResourceGraph extends AbstractDirectedGraph {
|
|||
final public function setResourceGraph(array $graph) {
|
||||
$this->resourceGraph = $graph;
|
||||
$this->graphSet = true;
|
||||
return $this;
|
||||
}
|
||||
|
||||
private function getResourceGraph() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* Copyright 2011 Facebook, Inc.
|
||||
* Copyright 2012 Facebook, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -79,6 +79,7 @@ final class CelerityResourceMap {
|
|||
|
||||
public function setPackageMap($package_map) {
|
||||
$this->packageMap = $package_map;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function packageResources(array $resolved_map) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* Copyright 2011 Facebook, Inc.
|
||||
* Copyright 2012 Facebook, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -22,6 +22,7 @@ final class AphrontHeadsupActionListView extends AphrontView {
|
|||
|
||||
public function setActions(array $actions) {
|
||||
$this->actions = $actions;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function render() {
|
||||
|
|
Loading…
Reference in a new issue