1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-28 17:52:42 +01:00

Made some additional methods final.

Summary: Just some minor tidying up. I don't think that these methods should ever be overridden in subclasses.

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9569
This commit is contained in:
Joshua Spence 2014-06-17 00:30:04 +10:00
parent 523d767646
commit 497229acd8
2 changed files with 7 additions and 7 deletions

View file

@ -48,7 +48,7 @@ abstract class ArcanistBaseXHPASTLinter extends ArcanistFutureLinter {
$replace); $replace);
} }
protected function buildFutures(array $paths) { final protected function buildFutures(array $paths) {
return $this->getXHPASTLinter()->buildSharedFutures($paths); return $this->getXHPASTLinter()->buildSharedFutures($paths);
} }
@ -69,7 +69,7 @@ abstract class ArcanistBaseXHPASTLinter extends ArcanistFutureLinter {
* @return ArcanistBaseXHPASTLinter Responsible linter. * @return ArcanistBaseXHPASTLinter Responsible linter.
* @task sharing * @task sharing
*/ */
protected function getXHPASTLinter() { final protected function getXHPASTLinter() {
$resource_key = 'xhpast.linter'; $resource_key = 'xhpast.linter';
// If we're the first linter to run, share ourselves. Otherwise, grab the // If we're the first linter to run, share ourselves. Otherwise, grab the
@ -102,7 +102,7 @@ abstract class ArcanistBaseXHPASTLinter extends ArcanistFutureLinter {
* @return list<ExecFuture> Futures. * @return list<ExecFuture> Futures.
* @task sharing * @task sharing
*/ */
protected function buildSharedFutures(array $paths) { final protected function buildSharedFutures(array $paths) {
foreach ($paths as $path) { foreach ($paths as $path) {
if (!isset($this->futures[$path])) { if (!isset($this->futures[$path])) {
$this->futures[$path] = xhpast_get_parser_future($this->getData($path)); $this->futures[$path] = xhpast_get_parser_future($this->getData($path));
@ -119,7 +119,7 @@ abstract class ArcanistBaseXHPASTLinter extends ArcanistFutureLinter {
* @return XHPASTTree|null Tree, or null if unparseable. * @return XHPASTTree|null Tree, or null if unparseable.
* @task sharing * @task sharing
*/ */
protected function getXHPASTTreeForPath($path) { final protected function getXHPASTTreeForPath($path) {
// If we aren't the linter responsible for actually building the parse // If we aren't the linter responsible for actually building the parse
// trees, go get the tree from that linter. // trees, go get the tree from that linter.
@ -152,7 +152,7 @@ abstract class ArcanistBaseXHPASTLinter extends ArcanistFutureLinter {
* @return Exeption|null Parse exception, if available. * @return Exeption|null Parse exception, if available.
* @task sharing * @task sharing
*/ */
protected function getXHPASTExceptionForPath($path) { final protected function getXHPASTExceptionForPath($path) {
if ($this->getXHPASTLinter() !== $this) { if ($this->getXHPASTLinter() !== $this) {
return $this->getXHPASTLinter()->getXHPASTExceptionForPath($path); return $this->getXHPASTLinter()->getXHPASTExceptionForPath($path);
} }

View file

@ -174,7 +174,7 @@ abstract class ArcanistLinter {
return $this->data[$path]; return $this->data[$path];
} }
public function setEngine(ArcanistLintEngine $engine) { final public function setEngine(ArcanistLintEngine $engine) {
$this->engine = $engine; $this->engine = $engine;
return $this; return $this;
} }
@ -476,7 +476,7 @@ abstract class ArcanistLinter {
* @param wild Default value to return if key is not present in config. * @param wild Default value to return if key is not present in config.
* @return wild Configured value, or default if no configuration exists. * @return wild Configured value, or default if no configuration exists.
*/ */
protected function getDeprecatedConfiguration($key, $default = null) { final protected function getDeprecatedConfiguration($key, $default = null) {
// If we're being called in a context without an engine (probably from // If we're being called in a context without an engine (probably from
// `arc linters`), just return the default value. // `arc linters`), just return the default value.