mirror of
https://github.com/flarum/core.git
synced 2025-08-06 16:36:47 +02:00
Use ::class
syntax to fetch class name instead of get_class()
function (#3910)
This commit is contained in:
@@ -38,7 +38,7 @@ class Extender
|
||||
foreach ($this->constructorArguments as $index => $constructorArgument) {
|
||||
$string = null;
|
||||
|
||||
switch (get_class($constructorArgument)) {
|
||||
switch ($constructorArgument::class) {
|
||||
case Expr\ClassConstFetch::class:
|
||||
$string = $constructorArgument->class->toString();
|
||||
break;
|
||||
|
@@ -147,7 +147,7 @@ class Resolver
|
||||
$methodStack = array_reverse($methodStack);
|
||||
|
||||
if (! $value->var instanceof New_) {
|
||||
throw new \Exception('Unable to resolve extender for '.get_class($value->var));
|
||||
throw new \Exception('Unable to resolve extender for '.$value->var::class);
|
||||
}
|
||||
|
||||
return $this->resolveExtenderNew($value->var, $methodStack);
|
||||
|
Reference in New Issue
Block a user