CS fixes, refs #2823
parent
a6531f6fd3
commit
fc9e1d0cff
|
@ -292,8 +292,9 @@ class ClassLoader
|
||||||
}
|
}
|
||||||
|
|
||||||
$file = $this->findFileWithExtension($class, '.php');
|
$file = $this->findFileWithExtension($class, '.php');
|
||||||
|
|
||||||
|
// Search for Hack files if we are running on HHVM
|
||||||
if ($file === null && defined('HHVM_VERSION')) {
|
if ($file === null && defined('HHVM_VERSION')) {
|
||||||
// Indicates a Hack file (hacklang.org)
|
|
||||||
$file = $this->findFileWithExtension($class, '.hh');
|
$file = $this->findFileWithExtension($class, '.hh');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -301,10 +302,12 @@ class ClassLoader
|
||||||
// Remember that this class does not exist.
|
// Remember that this class does not exist.
|
||||||
return $this->classMap[$class] = false;
|
return $this->classMap[$class] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function findFileWithExtension($class, $ext) {
|
private function findFileWithExtension($class, $ext)
|
||||||
|
{
|
||||||
// PSR-4 lookup
|
// PSR-4 lookup
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||||
|
|
||||||
|
@ -361,8 +364,6 @@ class ClassLoader
|
||||||
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue