From eedd7aa58bc49d1d66f6c13b419dd581397d492f Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Tue, 30 Dec 2014 02:48:03 -0800 Subject: [PATCH] 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 --- .../differential/editor/DifferentialTransactionEditor.php | 3 ++- .../landing/DifferentialLandingActionMenuEventListener.php | 3 ++- src/applications/releeph/storage/ReleephRequest.php | 7 +++++-- .../repository/engine/PhabricatorRepositoryPullEngine.php | 1 + src/view/phui/PHUIInfoPanelView.php | 4 +++- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/applications/differential/editor/DifferentialTransactionEditor.php b/src/applications/differential/editor/DifferentialTransactionEditor.php index f2adcfc78f..a0981544b9 100644 --- a/src/applications/differential/editor/DifferentialTransactionEditor.php +++ b/src/applications/differential/editor/DifferentialTransactionEditor.php @@ -1331,8 +1331,9 @@ final class DifferentialTransactionEditor $previous_comments = $comments_by_line_number[$comment->getChangesetID()] [$comment->getLineNumber()]; foreach ($previous_comments as $previous_comment) { - if ($previous_comment->getID() >= $comment->getID()) + if ($previous_comment->getID() >= $comment->getID()) { break; + } $nested = $this->indentForMail( array_merge( $nested, diff --git a/src/applications/differential/landing/DifferentialLandingActionMenuEventListener.php b/src/applications/differential/landing/DifferentialLandingActionMenuEventListener.php index f2fb2b16c1..32dda41932 100644 --- a/src/applications/differential/landing/DifferentialLandingActionMenuEventListener.php +++ b/src/applications/differential/landing/DifferentialLandingActionMenuEventListener.php @@ -43,8 +43,9 @@ final class DifferentialLandingActionMenuEventListener foreach ($strategies as $strategy) { $viewer = $event->getUser(); $action = $strategy->createMenuItem($viewer, $revision, $repository); - if ($action == null) + if ($action == null) { continue; + } if ($strategy->isActionDisabled($viewer, $revision, $repository)) { $action->setDisabled(true); } diff --git a/src/applications/releeph/storage/ReleephRequest.php b/src/applications/releeph/storage/ReleephRequest.php index 22a6270a2b..3eba151048 100644 --- a/src/applications/releeph/storage/ReleephRequest.php +++ b/src/applications/releeph/storage/ReleephRequest.php @@ -127,15 +127,18 @@ final class ReleephRequest extends ReleephDAO if ($this->getInBranch()) { return ReleephRequestStatus::STATUS_NEEDS_REVERT; } else { + $intent_pass = ReleephRequest::INTENT_PASS; + $intent_want = ReleephRequest::INTENT_WANT; + $has_been_in_branch = $this->getCommitIdentifier(); // Regardless of why we reverted something, always say reverted if it // was once in the branch. if ($has_been_in_branch) { 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: return ReleephRequestStatus::STATUS_REJECTED; - } else if ($this->getRequestorIntent() === ReleephRequest::INTENT_WANT) { + } else if ($this->getRequestorIntent() === $intent_want) { return ReleephRequestStatus::STATUS_REQUESTED; } else { return ReleephRequestStatus::STATUS_ABANDONED; diff --git a/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php b/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php index 4165723c90..8ac193fad7 100644 --- a/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php +++ b/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php @@ -52,6 +52,7 @@ final class PhabricatorRepositoryPullEngine break; default: $this->abortPull(pht('Unknown VCS "%s"!', $vcs)); + break; } $callsign = $repository->getCallsign(); diff --git a/src/view/phui/PHUIInfoPanelView.php b/src/view/phui/PHUIInfoPanelView.php index 182398c858..91f9d2b8e4 100644 --- a/src/view/phui/PHUIInfoPanelView.php +++ b/src/view/phui/PHUIInfoPanelView.php @@ -43,7 +43,9 @@ final class PHUIInfoPanelView extends AphrontView { $tds[] = $this->renderCell($cell); unset($this->infoblock[$key]); $ii++; - if ($ii > $this->columns) break; + if ($ii > $this->columns) { + break; + } } $trs[] = phutil_tag( 'tr',