From fc9e1d0cff60d4f401425c02fd9fdff7ecce99eb Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 24 Mar 2014 00:31:08 +0100 Subject: [PATCH] CS fixes, refs #2823 --- src/Composer/Autoload/ClassLoader.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Composer/Autoload/ClassLoader.php b/src/Composer/Autoload/ClassLoader.php index e27edeb1d..a71055531 100644 --- a/src/Composer/Autoload/ClassLoader.php +++ b/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; } }