Skip to content

Commit 22fff80

Browse files
committed
fix mixing declarations and side effects
1 parent ad62981 commit 22fff80

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

histou/bootstrap.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,9 @@
88
@link https://github.com/ConSol/histou
99
**/
1010

11-
function getPath()
12-
{
13-
return substr(realpath(dirname(__FILE__)), 0, -6);
14-
}
15-
16-
spl_autoload_register('histou_autoload');
17-
18-
function histou_autoload($className)
19-
{
11+
spl_autoload_register(function ($className) {
2012
$file = strtolower(str_replace('\\', DIRECTORY_SEPARATOR, $className)).'.php';
2113
if (file_exists($file)) {
2214
require_once $file;
2315
}
24-
}
16+
});

0 commit comments

Comments
 (0)