1
0
Fork 0

CS fixes, refs #2823

pull/2837/head
Jordi Boggiano 2014-03-24 00:31:08 +01:00
parent a6531f6fd3
commit fc9e1d0cff
1 changed files with 6 additions and 5 deletions

View File

@ -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;
}
}