Remove remaining usages of get_class()

This commit is contained in:
Fabien Potencier
2024-10-05 09:33:37 +02:00
parent e98b10a802
commit cf603b19c1
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -233,7 +233,7 @@ class Environment
if ($this->cache instanceof RemovableCacheInterface) {
$this->cache->remove($name, $cls);
} else {
throw new \LogicException(\sprintf('The "%s" cache class does not support removing template cache as it does not implement the "RemovableCacheInterface" interface.', \get_class($this->cache)));
throw new \LogicException(\sprintf('The "%s" cache class does not support removing template cache as it does not implement the "RemovableCacheInterface" interface.', $this->cache::class));
}
}
+1 -2
View File
@@ -35,9 +35,8 @@ class ConstantTest extends TestExpression
if ($this->getNode('arguments')->hasNode('1')) {
$compiler
->raw('get_class(')
->subcompile($this->getNode('arguments')->getNode(1))
->raw(')."::".')
->raw('::class."::".')
;
}