From 4754a3e15639604812204db56f35dc9d164b3c67 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Tue, 2 Jun 2015 22:13:21 +1000 Subject: [PATCH] Linter fixes Summary: Apply various minor linter fixes. Test Plan: `arc lint` Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: aurelijus, Korvin, epriestley Differential Revision: https://secure.phabricator.com/D13106 --- src/lint/linter/__tests__/ArcanistExternalLinterTestCase.php | 2 +- src/lint/linter/__tests__/ArcanistLinterTestCase.php | 4 ++-- src/unit/engine/phutil/PhutilTestCase.php | 2 +- src/unit/parser/ArcanistPhpunitTestResultParser.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lint/linter/__tests__/ArcanistExternalLinterTestCase.php b/src/lint/linter/__tests__/ArcanistExternalLinterTestCase.php index bd7407c1..fe68a509 100644 --- a/src/lint/linter/__tests__/ArcanistExternalLinterTestCase.php +++ b/src/lint/linter/__tests__/ArcanistExternalLinterTestCase.php @@ -2,7 +2,7 @@ abstract class ArcanistExternalLinterTestCase extends ArcanistLinterTestCase { - public final function testVersion() { + final public function testVersion() { try { $version = $this->getLinter()->getVersion(); $this->assertTrue( diff --git a/src/lint/linter/__tests__/ArcanistLinterTestCase.php b/src/lint/linter/__tests__/ArcanistLinterTestCase.php index 564f57bc..c023efd1 100644 --- a/src/lint/linter/__tests__/ArcanistLinterTestCase.php +++ b/src/lint/linter/__tests__/ArcanistLinterTestCase.php @@ -10,7 +10,7 @@ abstract class ArcanistLinterTestCase extends PhutilTestCase { * * @return ArcanistLinter */ - protected final function getLinter() { + final protected function getLinter() { $matches = null; if (!preg_match('/^(\w+Linter)TestCase$/', get_class($this), $matches) || !is_subclass_of($matches[1], 'ArcanistLinter')) { @@ -20,7 +20,7 @@ abstract class ArcanistLinterTestCase extends PhutilTestCase { return newv($matches[1], array()); } - public abstract function testLinter(); + abstract public function testLinter(); /** * Executes all tests from the specified subdirectory. If a linter is not diff --git a/src/unit/engine/phutil/PhutilTestCase.php b/src/unit/engine/phutil/PhutilTestCase.php index 68f0cdb3..544384fc 100644 --- a/src/unit/engine/phutil/PhutilTestCase.php +++ b/src/unit/engine/phutil/PhutilTestCase.php @@ -668,7 +668,7 @@ abstract class PhutilTestCase { * * @return map */ - private static final function getCallerInfo() { + final private static function getCallerInfo() { $callee = array(); $caller = array(); $seen = false; diff --git a/src/unit/parser/ArcanistPhpunitTestResultParser.php b/src/unit/parser/ArcanistPhpunitTestResultParser.php index 8eaeb1ab..10a09051 100644 --- a/src/unit/parser/ArcanistPhpunitTestResultParser.php +++ b/src/unit/parser/ArcanistPhpunitTestResultParser.php @@ -138,9 +138,9 @@ final class ArcanistPhpunitTestResultParser extends ArcanistTestResultParser { if ($line->getAttribute('type') != 'stmt') { $coverage .= 'N'; } else { - if ((int) $line->getAttribute('count') == 0) { + if ((int)$line->getAttribute('count') == 0) { $coverage .= 'U'; - } else if ((int) $line->getAttribute('count') > 0) { + } else if ((int)$line->getAttribute('count') > 0) { $coverage .= 'C'; } }