1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2025-01-23 21:18:18 +01:00

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
This commit is contained in:
Joshua Spence 2015-04-14 06:29:07 +10:00
parent c011f948d3
commit 7bba30f66c
4 changed files with 18 additions and 18 deletions

View file

@ -10,9 +10,9 @@ final class ArcanistDifferentialRevisionHash {
public static function getTypes() { public static function getTypes() {
return array( return array(
ArcanistDifferentialRevisionHash::HASH_GIT_COMMIT, self::HASH_GIT_COMMIT,
ArcanistDifferentialRevisionHash::HASH_GIT_TREE, self::HASH_GIT_TREE,
ArcanistDifferentialRevisionHash::HASH_MERCURIAL_COMMIT, self::HASH_MERCURIAL_COMMIT,
); );
} }

View file

@ -53,42 +53,42 @@ final class ArcanistDiffChangeType {
public static function isOldLocationChangeType($type) { public static function isOldLocationChangeType($type) {
static $types = array( static $types = array(
ArcanistDiffChangeType::TYPE_MOVE_AWAY => true, self::TYPE_MOVE_AWAY => true,
ArcanistDiffChangeType::TYPE_COPY_AWAY => true, self::TYPE_COPY_AWAY => true,
ArcanistDiffChangeType::TYPE_MULTICOPY => true, self::TYPE_MULTICOPY => true,
); );
return isset($types[$type]); return isset($types[$type]);
} }
public static function isNewLocationChangeType($type) { public static function isNewLocationChangeType($type) {
static $types = array( static $types = array(
ArcanistDiffChangeType::TYPE_MOVE_HERE => true, self::TYPE_MOVE_HERE => true,
ArcanistDiffChangeType::TYPE_COPY_HERE => true, self::TYPE_COPY_HERE => true,
); );
return isset($types[$type]); return isset($types[$type]);
} }
public static function isDeleteChangeType($type) { public static function isDeleteChangeType($type) {
static $types = array( static $types = array(
ArcanistDiffChangeType::TYPE_DELETE => true, self::TYPE_DELETE => true,
ArcanistDiffChangeType::TYPE_MOVE_AWAY => true, self::TYPE_MOVE_AWAY => true,
ArcanistDiffChangeType::TYPE_MULTICOPY => true, self::TYPE_MULTICOPY => true,
); );
return isset($types[$type]); return isset($types[$type]);
} }
public static function isCreateChangeType($type) { public static function isCreateChangeType($type) {
static $types = array( static $types = array(
ArcanistDiffChangeType::TYPE_ADD => true, self::TYPE_ADD => true,
ArcanistDiffChangeType::TYPE_COPY_HERE => true, self::TYPE_COPY_HERE => true,
ArcanistDiffChangeType::TYPE_MOVE_HERE => true, self::TYPE_MOVE_HERE => true,
); );
return isset($types[$type]); return isset($types[$type]);
} }
public static function isModifyChangeType($type) { public static function isModifyChangeType($type) {
static $types = array( static $types = array(
ArcanistDiffChangeType::TYPE_CHANGE => true, self::TYPE_CHANGE => true,
); );
return isset($types[$type]); return isset($types[$type]);
} }

View file

@ -202,7 +202,7 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI {
protected function buildBaseCommit($symbolic_commit) { protected function buildBaseCommit($symbolic_commit) {
if ($symbolic_commit !== null) { if ($symbolic_commit !== null) {
if ($symbolic_commit == ArcanistGitAPI::GIT_MAGIC_ROOT_COMMIT) { if ($symbolic_commit == self::GIT_MAGIC_ROOT_COMMIT) {
$this->setBaseCommitExplanation( $this->setBaseCommitExplanation(
'you explicitly specified the empty tree.'); 'you explicitly specified the empty tree.');
return $symbolic_commit; return $symbolic_commit;
@ -368,7 +368,7 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI {
return $this->resolvedHeadCommit; return $this->resolvedHeadCommit;
} }
final public function setHeadCommit($symbolic_commit) { public function setHeadCommit($symbolic_commit) {
$this->symbolicHeadCommit = $symbolic_commit; $this->symbolicHeadCommit = $symbolic_commit;
$this->reloadCommitRange(); $this->reloadCommitRange();
return $this; return $this;

View file

@ -142,7 +142,7 @@ EOTEXT
array $argv, array $argv,
ArcanistConfigurationManager $configuration_manager) { ArcanistConfigurationManager $configuration_manager) {
$aliases = ArcanistAliasWorkflow::getAliases($configuration_manager); $aliases = self::getAliases($configuration_manager);
if (!isset($aliases[$command])) { if (!isset($aliases[$command])) {
return array(null, $argv); return array(null, $argv);
} }