From 21a4574922ac2436eb05333f7640d9ef7b73fa60 Mon Sep 17 00:00:00 2001 From: vrana Date: Fri, 22 Feb 2013 16:12:53 -0800 Subject: [PATCH] Change ArcanistLintRenderer to class Summary: Renderers **are** renderers not **can** render. Test Plan: This diff. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5092 --- src/lint/renderer/ArcanistLintConsoleRenderer.php | 2 +- src/lint/renderer/ArcanistLintJSONRenderer.php | 2 +- src/lint/renderer/ArcanistLintLikeCompilerRenderer.php | 2 +- src/lint/renderer/ArcanistLintRenderer.php | 8 +++++--- src/lint/renderer/ArcanistLintSummaryRenderer.php | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/lint/renderer/ArcanistLintConsoleRenderer.php b/src/lint/renderer/ArcanistLintConsoleRenderer.php index cea91f50..bb295b96 100644 --- a/src/lint/renderer/ArcanistLintConsoleRenderer.php +++ b/src/lint/renderer/ArcanistLintConsoleRenderer.php @@ -5,7 +5,7 @@ * * @group lint */ -final class ArcanistLintConsoleRenderer implements ArcanistLintRenderer { +final class ArcanistLintConsoleRenderer extends ArcanistLintRenderer { private $showAutofixPatches = false; public function setShowAutofixPatches($show_autofix_patches) { diff --git a/src/lint/renderer/ArcanistLintJSONRenderer.php b/src/lint/renderer/ArcanistLintJSONRenderer.php index ce824224..1a3ee2eb 100644 --- a/src/lint/renderer/ArcanistLintJSONRenderer.php +++ b/src/lint/renderer/ArcanistLintJSONRenderer.php @@ -5,7 +5,7 @@ * * @group lint */ -final class ArcanistLintJSONRenderer implements ArcanistLintRenderer { +final class ArcanistLintJSONRenderer extends ArcanistLintRenderer { const LINES_OF_CONTEXT = 3; public function renderLintResult(ArcanistLintResult $result) { diff --git a/src/lint/renderer/ArcanistLintLikeCompilerRenderer.php b/src/lint/renderer/ArcanistLintLikeCompilerRenderer.php index 1b0f4323..435a134e 100644 --- a/src/lint/renderer/ArcanistLintLikeCompilerRenderer.php +++ b/src/lint/renderer/ArcanistLintLikeCompilerRenderer.php @@ -5,7 +5,7 @@ * * @group lint */ -final class ArcanistLintLikeCompilerRenderer implements ArcanistLintRenderer { +final class ArcanistLintLikeCompilerRenderer extends ArcanistLintRenderer { public function renderLintResult(ArcanistLintResult $result) { $lines = array(); $messages = $result->getMessages(); diff --git a/src/lint/renderer/ArcanistLintRenderer.php b/src/lint/renderer/ArcanistLintRenderer.php index 47b793fe..1b1c19fd 100644 --- a/src/lint/renderer/ArcanistLintRenderer.php +++ b/src/lint/renderer/ArcanistLintRenderer.php @@ -5,7 +5,9 @@ * * @group lint */ -interface ArcanistLintRenderer { - public function renderLintResult(ArcanistLintResult $result); - public function renderOkayResult(); +abstract class ArcanistLintRenderer { + + abstract public function renderLintResult(ArcanistLintResult $result); + abstract public function renderOkayResult(); + } diff --git a/src/lint/renderer/ArcanistLintSummaryRenderer.php b/src/lint/renderer/ArcanistLintSummaryRenderer.php index bb3542ba..adeae65c 100644 --- a/src/lint/renderer/ArcanistLintSummaryRenderer.php +++ b/src/lint/renderer/ArcanistLintSummaryRenderer.php @@ -5,7 +5,7 @@ * * @group lint */ -final class ArcanistLintSummaryRenderer implements ArcanistLintRenderer { +final class ArcanistLintSummaryRenderer extends ArcanistLintRenderer { public function renderLintResult(ArcanistLintResult $result) { $messages = $result->getMessages(); $path = $result->getPath();