Browse Source

CS fixes, refs #2823

Jordi Boggiano 11 years ago
parent
commit
fc9e1d0cff
1 changed files with 6 additions and 5 deletions
  1. 6 5
      src/Composer/Autoload/ClassLoader.php

+ 6 - 5
src/Composer/Autoload/ClassLoader.php

@@ -292,19 +292,22 @@ class ClassLoader
         }
 
         $file = $this->findFileWithExtension($class, '.php');
+
+        // Search for Hack files if we are running on HHVM
         if ($file === null && defined('HHVM_VERSION')) {
-          // Indicates a Hack file (hacklang.org)
-          $file = $this->findFileWithExtension($class, '.hh');
+            $file = $this->findFileWithExtension($class, '.hh');
         }
 
         if ($file === null) {
             // Remember that this class does not exist.
             return $this->classMap[$class] = false;
         }
+
         return $file;
     }
 
-    private function findFileWithExtension($class, $ext) {
+    private function findFileWithExtension($class, $ext)
+    {
         // PSR-4 lookup
         $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
 
@@ -361,8 +364,6 @@ class ClassLoader
         if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
             return $file;
         }
-
-        return null;
     }
 }