]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Linter fixes
authorJoshua Spence <josh@joshuaspence.com>
Tue, 2 Jun 2015 12:13:21 +0000 (22:13 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Tue, 2 Jun 2015 12:13:21 +0000 (22:13 +1000)
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
src/lint/linter/__tests__/ArcanistLinterTestCase.php
src/unit/engine/phutil/PhutilTestCase.php
src/unit/parser/ArcanistPhpunitTestResultParser.php

index bd7407c19574592a5880be84f023174b6043dc92..fe68a509310694ab1c674b20c2e3edc9a55bbd16 100644 (file)
@@ -2,7 +2,7 @@
 
 abstract class ArcanistExternalLinterTestCase extends ArcanistLinterTestCase {
 
-  public final function testVersion() {
+  final public function testVersion() {
     try {
       $version = $this->getLinter()->getVersion();
       $this->assertTrue(
index 564f57bcca10644db5daef0cea9c5735bd4411a8..c023efd11e0f0d777d6329b6507a9a61867a4755 100644 (file)
@@ -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
index 68f0cdb3d38f59ac9133d1fe2214043dbe7636d1..544384fc541784ad76c1de721118893a0587202a 100644 (file)
@@ -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;
index 8eaeb1ab142e6618a19bc36d993c0a1d8bdcbe04..10a09051b9b378afafae9f2517caf7e8aa463a32 100644 (file)
@@ -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';
           }
         }