1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 12:30:56 +01:00

Minor linter fixes

Summary: Fix a few minor lint issues.

Test Plan: Ran `arc lint`.

Reviewers: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11059
This commit is contained in:
Joshua Spence 2014-12-30 02:48:03 -08:00 committed by epriestley
parent 9374ace602
commit eedd7aa58b
5 changed files with 13 additions and 5 deletions

View file

@ -1331,8 +1331,9 @@ final class DifferentialTransactionEditor
$previous_comments = $comments_by_line_number[$comment->getChangesetID()] $previous_comments = $comments_by_line_number[$comment->getChangesetID()]
[$comment->getLineNumber()]; [$comment->getLineNumber()];
foreach ($previous_comments as $previous_comment) { foreach ($previous_comments as $previous_comment) {
if ($previous_comment->getID() >= $comment->getID()) if ($previous_comment->getID() >= $comment->getID()) {
break; break;
}
$nested = $this->indentForMail( $nested = $this->indentForMail(
array_merge( array_merge(
$nested, $nested,

View file

@ -43,8 +43,9 @@ final class DifferentialLandingActionMenuEventListener
foreach ($strategies as $strategy) { foreach ($strategies as $strategy) {
$viewer = $event->getUser(); $viewer = $event->getUser();
$action = $strategy->createMenuItem($viewer, $revision, $repository); $action = $strategy->createMenuItem($viewer, $revision, $repository);
if ($action == null) if ($action == null) {
continue; continue;
}
if ($strategy->isActionDisabled($viewer, $revision, $repository)) { if ($strategy->isActionDisabled($viewer, $revision, $repository)) {
$action->setDisabled(true); $action->setDisabled(true);
} }

View file

@ -127,15 +127,18 @@ final class ReleephRequest extends ReleephDAO
if ($this->getInBranch()) { if ($this->getInBranch()) {
return ReleephRequestStatus::STATUS_NEEDS_REVERT; return ReleephRequestStatus::STATUS_NEEDS_REVERT;
} else { } else {
$intent_pass = ReleephRequest::INTENT_PASS;
$intent_want = ReleephRequest::INTENT_WANT;
$has_been_in_branch = $this->getCommitIdentifier(); $has_been_in_branch = $this->getCommitIdentifier();
// Regardless of why we reverted something, always say reverted if it // Regardless of why we reverted something, always say reverted if it
// was once in the branch. // was once in the branch.
if ($has_been_in_branch) { if ($has_been_in_branch) {
return ReleephRequestStatus::STATUS_REVERTED; return ReleephRequestStatus::STATUS_REVERTED;
} else if ($this->getPusherIntent() === ReleephRequest::INTENT_PASS) { } else if ($this->getPusherIntent() === $intent_pass) {
// Otherwise, if it has never been in the branch, explicitly say why: // Otherwise, if it has never been in the branch, explicitly say why:
return ReleephRequestStatus::STATUS_REJECTED; return ReleephRequestStatus::STATUS_REJECTED;
} else if ($this->getRequestorIntent() === ReleephRequest::INTENT_WANT) { } else if ($this->getRequestorIntent() === $intent_want) {
return ReleephRequestStatus::STATUS_REQUESTED; return ReleephRequestStatus::STATUS_REQUESTED;
} else { } else {
return ReleephRequestStatus::STATUS_ABANDONED; return ReleephRequestStatus::STATUS_ABANDONED;

View file

@ -52,6 +52,7 @@ final class PhabricatorRepositoryPullEngine
break; break;
default: default:
$this->abortPull(pht('Unknown VCS "%s"!', $vcs)); $this->abortPull(pht('Unknown VCS "%s"!', $vcs));
break;
} }
$callsign = $repository->getCallsign(); $callsign = $repository->getCallsign();

View file

@ -43,7 +43,9 @@ final class PHUIInfoPanelView extends AphrontView {
$tds[] = $this->renderCell($cell); $tds[] = $this->renderCell($cell);
unset($this->infoblock[$key]); unset($this->infoblock[$key]);
$ii++; $ii++;
if ($ii > $this->columns) break; if ($ii > $this->columns) {
break;
}
} }
$trs[] = phutil_tag( $trs[] = phutil_tag(
'tr', 'tr',