Skip to content

Commit 90ca075

Browse files
committed
formatting
1 parent 608b9a2 commit 90ca075

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/ClassAliasAutoloader.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,9 @@ class ClassAliasAutoloader
3030
*/
3131
public static function register(Shell $shell, $classMapPath)
3232
{
33-
$loader = new static($shell, $classMapPath);
34-
35-
spl_autoload_register([$loader, 'aliasClass']);
36-
37-
return $loader;
33+
return tap(new static($shell, $classMapPath), function ($loader) {
34+
spl_autoload_register([$loader, 'aliasClass']);
35+
});
3836
}
3937

4038
/**
@@ -95,7 +93,6 @@ class_alias($fullName, $class);
9593
*/
9694
public function unregister()
9795
{
98-
// this is safe, even if not registred
9996
spl_autoload_unregister([$this, 'aliasClass']);
10097
}
10198

0 commit comments

Comments
 (0)