From 8fe38f8b6da6ba6b73be6b1f82e5f660a2265f4e Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 31 Jan 2012 12:07:05 -0800 Subject: [PATCH] Finalize Arcanist Classes Summary: Mark all applicable Arcanist classes as "final", except PhutilLintEngine, which needs a little finesse. @jungejason / @nh, does this break any Facebook stuff? Test Plan: Linter no longer raises warnings. Ran "testEverythingImplemented" in Phabricator. Reviewers: btrahan, jungejason, nh Reviewed By: btrahan CC: aran, epriestley Maniphest Tasks: T795 Differential Revision: https://secure.phabricator.com/D1519 --- src/branch/BranchInfo.php | 4 ++-- src/configuration/ArcanistConfiguration.php | 3 ++- src/difference/__tests__/ArcanistDiffUtilsTestCase.php | 4 ++-- .../commitmessage/ArcanistDifferentialCommitMessage.php | 2 +- .../ArcanistDifferentialCommitMessageParserException.php | 4 ++-- src/differential/revision/ArcanistDifferentialRevisionRef.php | 4 ++-- src/exception/ArcanistChooseInvalidRevisionException.php | 4 ++-- src/exception/ArcanistChooseNoRevisionsException.php | 4 ++-- src/exception/usage/ArcanistUsageException.php | 3 ++- src/exception/usage/noeffect/ArcanistNoEffectException.php | 4 ++-- src/exception/usage/noengine/ArcanistNoEngineException.php | 4 ++-- src/exception/usage/userabort/ArcanistUserAbortException.php | 4 ++-- src/lint/engine/base/ArcanistLintEngine.php | 1 + src/lint/engine/comprehensive/ComprehensiveLintEngine.php | 2 +- src/lint/engine/example/ExampleLintEngine.php | 4 ++-- src/lint/engine/liberate/ArcanistLiberateLintEngine.php | 4 ++-- src/lint/engine/phutil/PhutilLintEngine.php | 2 ++ src/lint/linter/apachelicense/ArcanistApacheLicenseLinter.php | 4 ++-- .../__tests__/ArcanistApacheLicenseLinterTestCase.php | 2 +- src/lint/linter/base/ArcanistLinter.php | 1 + src/lint/linter/conduit/ArcanistConduitLinter.php | 2 +- src/lint/linter/filename/ArcanistFilenameLinter.php | 4 ++-- src/lint/linter/generated/ArcanistGeneratedLinter.php | 4 ++-- src/lint/linter/jshint/ArcanistJSHintLinter.php | 4 ++-- src/lint/linter/nolint/ArcanistNoLintLinter.php | 4 ++-- src/lint/linter/pep8/ArcanistPEP8Linter.php | 2 +- src/lint/linter/phutilmodule/ArcanistPhutilModuleLinter.php | 4 ++-- src/lint/linter/pyflakes/ArcanistPyFlakesLinter.php | 4 ++-- src/lint/linter/pylint/ArcanistPyLintLinter.php | 4 ++-- src/lint/linter/spelling/ArcanistSpellingLinter.php | 2 +- .../spelling/__tests__/ArcanistSpellingLinterTestCase.php | 2 +- src/lint/linter/text/ArcanistTextLinter.php | 4 ++-- src/lint/linter/text/__tests__/ArcanistTextLinterTestCase.php | 4 ++-- src/lint/linter/xhpast/ArcanistXHPASTLinter.php | 2 +- .../linter/xhpast/__tests__/ArcanistXHPASTLinterTestCase.php | 2 +- src/lint/message/ArcanistLintMessage.php | 4 ++-- src/lint/renderer/ArcanistLintJSONRenderer.php | 4 ++-- src/lint/renderer/ArcanistLintRenderer.php | 4 ++-- src/lint/renderer/ArcanistLintSummaryRenderer.php | 4 ++-- src/lint/severity/ArcanistLintSeverity.php | 4 ++-- src/parser/bundle/ArcanistBundle.php | 2 +- src/parser/diff/ArcanistDiffParser.php | 4 ++-- src/parser/diff/__tests__/ArcanistDiffParserTestCase.php | 4 ++-- src/parser/diff/change/ArcanistDiffChange.php | 4 ++-- src/parser/diff/changetype/ArcanistDiffChangeType.php | 4 ++-- src/parser/diff/hunk/ArcanistDiffHunk.php | 4 ++-- src/parser/phutilmodule/PhutilModuleRequirements.php | 2 +- src/repository/api/git/ArcanistGitAPI.php | 2 +- src/repository/api/mercurial/ArcanistMercurialAPI.php | 2 +- src/repository/api/subversion/ArcanistSubversionAPI.php | 2 +- .../hookapi/subversion/ArcanistSubversionHookAPI.php | 2 +- src/unit/engine/phutil/PhutilUnitTestEngine.php | 4 ++-- .../engine/phutil/__tests__/PhutilUnitTestEngineTestCase.php | 4 ++-- .../exception/ArcanistPhutilTestTerminatedException.php | 4 ++-- src/unit/result/ArcanistUnitTestResult.php | 4 ++-- src/workflow/amend/ArcanistAmendWorkflow.php | 2 +- src/workflow/base/ArcanistBaseWorkflow.php | 3 ++- src/workflow/branch/ArcanistBranchWorkflow.php | 4 ++-- src/workflow/call-conduit/ArcanistCallConduitWorkflow.php | 4 ++-- src/workflow/commit/ArcanistCommitWorkflow.php | 2 +- src/workflow/cover/ArcanistCoverWorkflow.php | 2 +- src/workflow/diff/ArcanistDiffWorkflow.php | 2 +- .../ArcanistGitHookPreReceiveWorkflow.php | 4 ++-- src/workflow/help/ArcanistHelpWorkflow.php | 4 ++-- .../ArcanistInstallCertificateWorkflow.php | 2 +- src/workflow/land/ArcanistLandWorkflow.php | 2 +- src/workflow/liberate/ArcanistLiberateWorkflow.php | 4 ++-- src/workflow/list/ArcanistListWorkflow.php | 4 ++-- src/workflow/mark-committed/ArcanistMarkCommittedWorkflow.php | 4 ++-- src/workflow/merge/ArcanistMergeWorkflow.php | 4 ++-- src/workflow/shell-complete/ArcanistShellCompleteWorkflow.php | 2 +- .../svn-hook-pre-commit/ArcanistSvnHookPreCommitWorkflow.php | 2 +- src/workflow/unit/ArcanistUnitWorkflow.php | 2 +- src/workflow/which/ArcanistWhichWorkflow.php | 2 +- src/workingcopyidentity/ArcanistWorkingCopyIdentity.php | 4 ++-- 75 files changed, 123 insertions(+), 116 deletions(-) diff --git a/src/branch/BranchInfo.php b/src/branch/BranchInfo.php index 38881c3c..39d14d64 100644 --- a/src/branch/BranchInfo.php +++ b/src/branch/BranchInfo.php @@ -1,7 +1,7 @@ getMessages(); $path = $result->getPath(); diff --git a/src/lint/renderer/ArcanistLintSummaryRenderer.php b/src/lint/renderer/ArcanistLintSummaryRenderer.php index b5b22477..a9d05375 100644 --- a/src/lint/renderer/ArcanistLintSummaryRenderer.php +++ b/src/lint/renderer/ArcanistLintSummaryRenderer.php @@ -1,7 +1,7 @@ getMessages(); $path = $result->getPath(); diff --git a/src/lint/severity/ArcanistLintSeverity.php b/src/lint/severity/ArcanistLintSeverity.php index 62b11591..f4d3191b 100644 --- a/src/lint/severity/ArcanistLintSeverity.php +++ b/src/lint/severity/ArcanistLintSeverity.php @@ -1,7 +1,7 @@ array(), diff --git a/src/repository/api/git/ArcanistGitAPI.php b/src/repository/api/git/ArcanistGitAPI.php index c25f3d66..890f17ab 100644 --- a/src/repository/api/git/ArcanistGitAPI.php +++ b/src/repository/api/git/ArcanistGitAPI.php @@ -21,7 +21,7 @@ * * @group workingcopy */ -class ArcanistGitAPI extends ArcanistRepositoryAPI { +final class ArcanistGitAPI extends ArcanistRepositoryAPI { private $status; private $relativeCommit = null; diff --git a/src/repository/api/mercurial/ArcanistMercurialAPI.php b/src/repository/api/mercurial/ArcanistMercurialAPI.php index 9aa736b9..f7c54ffb 100644 --- a/src/repository/api/mercurial/ArcanistMercurialAPI.php +++ b/src/repository/api/mercurial/ArcanistMercurialAPI.php @@ -21,7 +21,7 @@ * * @group workingcopy */ -class ArcanistMercurialAPI extends ArcanistRepositoryAPI { +final class ArcanistMercurialAPI extends ArcanistRepositoryAPI { private $status; private $base; diff --git a/src/repository/api/subversion/ArcanistSubversionAPI.php b/src/repository/api/subversion/ArcanistSubversionAPI.php index 2070734e..d580da09 100644 --- a/src/repository/api/subversion/ArcanistSubversionAPI.php +++ b/src/repository/api/subversion/ArcanistSubversionAPI.php @@ -21,7 +21,7 @@ * * @group workingcopy */ -class ArcanistSubversionAPI extends ArcanistRepositoryAPI { +final class ArcanistSubversionAPI extends ArcanistRepositoryAPI { protected $svnStatus; protected $svnBaseRevisions; diff --git a/src/repository/hookapi/subversion/ArcanistSubversionHookAPI.php b/src/repository/hookapi/subversion/ArcanistSubversionHookAPI.php index 0982f033..2381df43 100644 --- a/src/repository/hookapi/subversion/ArcanistSubversionHookAPI.php +++ b/src/repository/hookapi/subversion/ArcanistSubversionHookAPI.php @@ -19,7 +19,7 @@ /** * Interfaces with Subversion while running as a commit hook. */ -class ArcanistSubversionHookAPI extends ArcanistHookAPI { +final class ArcanistSubversionHookAPI extends ArcanistHookAPI { protected $root; protected $transaction; diff --git a/src/unit/engine/phutil/PhutilUnitTestEngine.php b/src/unit/engine/phutil/PhutilUnitTestEngine.php index f4686228..7f8f5199 100644 --- a/src/unit/engine/phutil/PhutilUnitTestEngine.php +++ b/src/unit/engine/phutil/PhutilUnitTestEngine.php @@ -1,7 +1,7 @@