From 7bba30f66cee09f3f7303be7480d4f5584b09cab Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Tue, 14 Apr 2015 06:29:07 +1000 Subject: [PATCH] Various linter fixes Summary: Apply various linter fixes. Test Plan: Unit tests + eyeballing. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D12388 --- .../ArcanistDifferentialRevisionHash.php | 6 ++--- src/parser/diff/ArcanistDiffChangeType.php | 24 +++++++++---------- src/repository/api/ArcanistGitAPI.php | 4 ++-- src/workflow/ArcanistAliasWorkflow.php | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/differential/constants/ArcanistDifferentialRevisionHash.php b/src/differential/constants/ArcanistDifferentialRevisionHash.php index 6df8bc5c..4763ab42 100644 --- a/src/differential/constants/ArcanistDifferentialRevisionHash.php +++ b/src/differential/constants/ArcanistDifferentialRevisionHash.php @@ -10,9 +10,9 @@ final class ArcanistDifferentialRevisionHash { public static function getTypes() { return array( - ArcanistDifferentialRevisionHash::HASH_GIT_COMMIT, - ArcanistDifferentialRevisionHash::HASH_GIT_TREE, - ArcanistDifferentialRevisionHash::HASH_MERCURIAL_COMMIT, + self::HASH_GIT_COMMIT, + self::HASH_GIT_TREE, + self::HASH_MERCURIAL_COMMIT, ); } diff --git a/src/parser/diff/ArcanistDiffChangeType.php b/src/parser/diff/ArcanistDiffChangeType.php index 2e513922..ef84985a 100644 --- a/src/parser/diff/ArcanistDiffChangeType.php +++ b/src/parser/diff/ArcanistDiffChangeType.php @@ -53,42 +53,42 @@ final class ArcanistDiffChangeType { public static function isOldLocationChangeType($type) { static $types = array( - ArcanistDiffChangeType::TYPE_MOVE_AWAY => true, - ArcanistDiffChangeType::TYPE_COPY_AWAY => true, - ArcanistDiffChangeType::TYPE_MULTICOPY => true, + self::TYPE_MOVE_AWAY => true, + self::TYPE_COPY_AWAY => true, + self::TYPE_MULTICOPY => true, ); return isset($types[$type]); } public static function isNewLocationChangeType($type) { static $types = array( - ArcanistDiffChangeType::TYPE_MOVE_HERE => true, - ArcanistDiffChangeType::TYPE_COPY_HERE => true, + self::TYPE_MOVE_HERE => true, + self::TYPE_COPY_HERE => true, ); return isset($types[$type]); } public static function isDeleteChangeType($type) { static $types = array( - ArcanistDiffChangeType::TYPE_DELETE => true, - ArcanistDiffChangeType::TYPE_MOVE_AWAY => true, - ArcanistDiffChangeType::TYPE_MULTICOPY => true, + self::TYPE_DELETE => true, + self::TYPE_MOVE_AWAY => true, + self::TYPE_MULTICOPY => true, ); return isset($types[$type]); } public static function isCreateChangeType($type) { static $types = array( - ArcanistDiffChangeType::TYPE_ADD => true, - ArcanistDiffChangeType::TYPE_COPY_HERE => true, - ArcanistDiffChangeType::TYPE_MOVE_HERE => true, + self::TYPE_ADD => true, + self::TYPE_COPY_HERE => true, + self::TYPE_MOVE_HERE => true, ); return isset($types[$type]); } public static function isModifyChangeType($type) { static $types = array( - ArcanistDiffChangeType::TYPE_CHANGE => true, + self::TYPE_CHANGE => true, ); return isset($types[$type]); } diff --git a/src/repository/api/ArcanistGitAPI.php b/src/repository/api/ArcanistGitAPI.php index 15850c6b..f5787896 100644 --- a/src/repository/api/ArcanistGitAPI.php +++ b/src/repository/api/ArcanistGitAPI.php @@ -202,7 +202,7 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI { protected function buildBaseCommit($symbolic_commit) { if ($symbolic_commit !== null) { - if ($symbolic_commit == ArcanistGitAPI::GIT_MAGIC_ROOT_COMMIT) { + if ($symbolic_commit == self::GIT_MAGIC_ROOT_COMMIT) { $this->setBaseCommitExplanation( 'you explicitly specified the empty tree.'); return $symbolic_commit; @@ -368,7 +368,7 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI { return $this->resolvedHeadCommit; } - final public function setHeadCommit($symbolic_commit) { + public function setHeadCommit($symbolic_commit) { $this->symbolicHeadCommit = $symbolic_commit; $this->reloadCommitRange(); return $this; diff --git a/src/workflow/ArcanistAliasWorkflow.php b/src/workflow/ArcanistAliasWorkflow.php index 849d3f49..40cf9a94 100644 --- a/src/workflow/ArcanistAliasWorkflow.php +++ b/src/workflow/ArcanistAliasWorkflow.php @@ -142,7 +142,7 @@ EOTEXT array $argv, ArcanistConfigurationManager $configuration_manager) { - $aliases = ArcanistAliasWorkflow::getAliases($configuration_manager); + $aliases = self::getAliases($configuration_manager); if (!isset($aliases[$command])) { return array(null, $argv); }