From d66cbff2981108afd9276a18c3906b722a533b4d Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Wed, 11 Feb 2015 06:52:56 +1100 Subject: [PATCH] Rename a constant Summary: Rename `DifferentialChangesetParser::WHITESPACE_IGNORE_FORCE` to `DifferentialChangesetParser::WHITESPACE_IGNORE_ALL` to better reflect reality. Test Plan: Viewed a diff with various settings for the "Whitespace changes" option. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D11730 --- .../differential/parser/DifferentialChangesetParser.php | 8 ++++---- .../view/DifferentialRevisionUpdateHistoryView.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/applications/differential/parser/DifferentialChangesetParser.php b/src/applications/differential/parser/DifferentialChangesetParser.php index e181993836..3ce27b36a7 100644 --- a/src/applications/differential/parser/DifferentialChangesetParser.php +++ b/src/applications/differential/parser/DifferentialChangesetParser.php @@ -106,7 +106,7 @@ final class DifferentialChangesetParser { const WHITESPACE_SHOW_ALL = 'show-all'; const WHITESPACE_IGNORE_TRAILING = 'ignore-trailing'; const WHITESPACE_IGNORE_MOST = 'ignore-most'; - const WHITESPACE_IGNORE_FORCE = 'ignore-force'; + const WHITESPACE_IGNORE_ALL = 'ignore-all'; public function setOldLines(array $lines) { $this->old = $lines; @@ -493,7 +493,7 @@ final class DifferentialChangesetParser { switch ($whitespace_mode) { case self::WHITESPACE_SHOW_ALL: case self::WHITESPACE_IGNORE_TRAILING: - case self::WHITESPACE_IGNORE_FORCE: + case self::WHITESPACE_IGNORE_ALL: break; default: $whitespace_mode = self::WHITESPACE_IGNORE_MOST; @@ -537,9 +537,9 @@ final class DifferentialChangesetParser { $changeset = $this->changeset; $ignore_all = (($whitespace_mode == self::WHITESPACE_IGNORE_MOST) || - ($whitespace_mode == self::WHITESPACE_IGNORE_FORCE)); + ($whitespace_mode == self::WHITESPACE_IGNORE_ALL)); - $force_ignore = ($whitespace_mode == self::WHITESPACE_IGNORE_FORCE); + $force_ignore = ($whitespace_mode == self::WHITESPACE_IGNORE_ALL); if (!$force_ignore) { if ($ignore_all && $changeset->getWhitespaceMatters()) { diff --git a/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php b/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php index f6c5910ab7..ae4f640440 100644 --- a/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php +++ b/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php @@ -205,11 +205,11 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView { )); $options = array( - DifferentialChangesetParser::WHITESPACE_IGNORE_FORCE => 'Ignore All', - DifferentialChangesetParser::WHITESPACE_IGNORE_MOST => 'Ignore Most', + DifferentialChangesetParser::WHITESPACE_IGNORE_ALL => pht('Ignore All'), + DifferentialChangesetParser::WHITESPACE_IGNORE_MOST => pht('Ignore Most'), DifferentialChangesetParser::WHITESPACE_IGNORE_TRAILING => - 'Ignore Trailing', - DifferentialChangesetParser::WHITESPACE_SHOW_ALL => 'Show All', + pht('Ignore Trailing'), + DifferentialChangesetParser::WHITESPACE_SHOW_ALL => pht('Show All'), ); foreach ($options as $value => $label) {