1
0
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:
Ngô Quốc Đạt
2023-10-29 20:43:58 +07:00
committed by GitHub
parent 2950290ad1
commit 015529ff1e
25 changed files with 37 additions and 37 deletions

View File

@@ -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;

View File

@@ -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);