Skip to content

Commit 447707c

Browse files
committed
Use static::class instead of get_called_class()
1 parent 8826d27 commit 447707c

File tree

3 files changed

+3
-21
lines changed

3 files changed

+3
-21
lines changed

.editorconfig

Lines changed: 0 additions & 12 deletions
This file was deleted.

.gitattributes

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
* text=auto
22

3-
/bin/ export-ignore
4-
/docs/ export-ignore
5-
/tests/ export-ignore
63
/.* export-ignore
7-
/*.yml export-ignore
8-
/*.xml export-ignore
9-
/README.md export-ignore

src/Module.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ public static function boot()
6868
$routeListClasses = static::getRoutesClasses();
6969
if (is_array($routeListClasses) && !empty($routeListClasses)) {
7070
/**
71-
* @var \Concrete\Core\Routing\Router
71+
* @var \Concrete\Core\Routing\Router $router
7272
*/
7373
$router = Route::getFacadeRoot();
7474
foreach ($routeListClasses as $routeListClass) {
7575
if (is_subclass_of($routeListClass, 'Concrete\Core\Routing\RouteListInterface')) {
7676
$router->loadRouteList($app->build($routeListClass));
7777
} else {
78-
throw new \Exception(t(get_called_class() . ':getRoutesClass: RoutesClass should be instanceof Concrete\Core\Routing\RouteListInterface'));
78+
throw new \Exception(t(static::class . ':getRoutesClass: RoutesClass should be instanceof Concrete\Core\Routing\RouteListInterface'));
7979
}
8080
}
8181
}
@@ -89,7 +89,7 @@ public static function boot()
8989
protected static function getClassAliases()
9090
{
9191
return [
92-
static::getPackageAlias() => get_called_class(),
92+
static::getPackageAlias() => static::class,
9393
];
9494
}
9595

0 commit comments

Comments
 (0)