mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Replace elseif
by else if
Summary: Mostly written by me. Omit external libraries. Test Plan: http://phabricator.com/docs/phabricator/article/PHP_Coding_Standards.html Reviewers: epriestley Reviewed By: epriestley CC: aran Differential Revision: https://secure.phabricator.com/D2104
This commit is contained in:
parent
b8cb52a9da
commit
bc61f36beb
5 changed files with 9 additions and 9 deletions
|
@ -406,9 +406,9 @@ final class DifferentialRevisionListController extends DifferentialController {
|
||||||
case 'status':
|
case 'status':
|
||||||
if ($params['status'] == 'open') {
|
if ($params['status'] == 'open') {
|
||||||
$query->withStatus(DifferentialRevisionQuery::STATUS_OPEN);
|
$query->withStatus(DifferentialRevisionQuery::STATUS_OPEN);
|
||||||
} elseif ($params['status'] == 'committed') {
|
} else if ($params['status'] == 'committed') {
|
||||||
$query->withStatus(DifferentialRevisionQuery::STATUS_COMMITTED);
|
$query->withStatus(DifferentialRevisionQuery::STATUS_COMMITTED);
|
||||||
} elseif ($params['status'] == 'abandoned') {
|
} else if ($params['status'] == 'abandoned') {
|
||||||
$query->withStatus(DifferentialRevisionQuery::STATUS_ABANDONED);
|
$query->withStatus(DifferentialRevisionQuery::STATUS_ABANDONED);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1355,7 +1355,7 @@ final class DifferentialChangesetParser {
|
||||||
if ($this->old[$ii]['type'] == '\\') {
|
if ($this->old[$ii]['type'] == '\\') {
|
||||||
$o_text = $this->old[$ii]['text'];
|
$o_text = $this->old[$ii]['text'];
|
||||||
$o_attr = ' class="comment"';
|
$o_attr = ' class="comment"';
|
||||||
} elseif (empty($this->new[$ii])) {
|
} else if (empty($this->new[$ii])) {
|
||||||
$o_attr = ' class="old old-full"';
|
$o_attr = ' class="old old-full"';
|
||||||
} else {
|
} else {
|
||||||
$o_attr = ' class="old"';
|
$o_attr = ' class="old"';
|
||||||
|
@ -1389,7 +1389,7 @@ final class DifferentialChangesetParser {
|
||||||
if ($this->new[$ii]['type'] == '\\') {
|
if ($this->new[$ii]['type'] == '\\') {
|
||||||
$n_text = $this->new[$ii]['text'];
|
$n_text = $this->new[$ii]['text'];
|
||||||
$n_attr = ' class="comment"';
|
$n_attr = ' class="comment"';
|
||||||
} elseif (empty($this->old[$ii])) {
|
} else if (empty($this->old[$ii])) {
|
||||||
$n_attr = ' class="new new-full"';
|
$n_attr = ' class="new new-full"';
|
||||||
} else {
|
} else {
|
||||||
$n_attr = ' class="new"';
|
$n_attr = ' class="new"';
|
||||||
|
|
|
@ -89,7 +89,7 @@ final class DifferentialRevisionCommentListView extends AphrontView {
|
||||||
$view->setVersusDiffID($this->versusDiffID);
|
$view->setVersusDiffID($this->versusDiffID);
|
||||||
if ($comment->getAction() == DifferentialAction::ACTION_SUMMARIZE) {
|
if ($comment->getAction() == DifferentialAction::ACTION_SUMMARIZE) {
|
||||||
$view->setAnchorName('summary');
|
$view->setAnchorName('summary');
|
||||||
} elseif ($comment->getAction() == DifferentialAction::ACTION_TESTPLAN) {
|
} else if ($comment->getAction() == DifferentialAction::ACTION_TESTPLAN) {
|
||||||
$view->setAnchorName('test-plan');
|
$view->setAnchorName('test-plan');
|
||||||
} else {
|
} else {
|
||||||
$view->setAnchorName('comment-'.$num);
|
$view->setAnchorName('comment-'.$num);
|
||||||
|
|
|
@ -239,7 +239,7 @@ final class PhabricatorSearchController
|
||||||
->loadOneWhere('callsign = %s', $match[1]);
|
->loadOneWhere('callsign = %s', $match[1]);
|
||||||
if ($match[2] == '') {
|
if ($match[2] == '') {
|
||||||
$jump = $repository;
|
$jump = $repository;
|
||||||
} elseif ($repository) {
|
} else if ($repository) {
|
||||||
$jump = id(new PhabricatorRepositoryCommit())->loadOneWhere(
|
$jump = id(new PhabricatorRepositoryCommit())->loadOneWhere(
|
||||||
'repositoryID = %d AND commitIdentifier = %s',
|
'repositoryID = %d AND commitIdentifier = %s',
|
||||||
$repository->getID(),
|
$repository->getID(),
|
||||||
|
@ -255,9 +255,9 @@ final class PhabricatorSearchController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif (preg_match('/^d(\d+)$/i', $query_str, $match)) {
|
} else if (preg_match('/^d(\d+)$/i', $query_str, $match)) {
|
||||||
$jump = id(new DifferentialRevision())->load($match[1]);
|
$jump = id(new DifferentialRevision())->load($match[1]);
|
||||||
} elseif (preg_match('/^t(\d+)$/i', $query_str, $match)) {
|
} else if (preg_match('/^t(\d+)$/i', $query_str, $match)) {
|
||||||
$jump = id(new ManiphestTask())->load($match[1]);
|
$jump = id(new ManiphestTask())->load($match[1]);
|
||||||
}
|
}
|
||||||
if ($jump) {
|
if ($jump) {
|
||||||
|
|
|
@ -745,7 +745,7 @@ final class PhabricatorSetup {
|
||||||
if (!$r->isSubclassOf($instanceof)) {
|
if (!$r->isSubclassOf($instanceof)) {
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
"Config setting '$key' must be an instance of '$instanceof'.");
|
"Config setting '$key' must be an instance of '$instanceof'.");
|
||||||
} elseif (!$r->isInstantiable()) {
|
} else if (!$r->isInstantiable()) {
|
||||||
throw new Exception("Config setting '$key' must be instantiable.");
|
throw new Exception("Config setting '$key' must be instantiable.");
|
||||||
}
|
}
|
||||||
} catch (Exception $ex) {
|
} catch (Exception $ex) {
|
||||||
|
|
Loading…
Reference in a new issue