Skip to content

Commit d102709

Browse files
deguiffabpot
authored andcommitted
Replace get_class() calls by ::class
1 parent 6fbb07a commit d102709

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

LazyString.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function __toString(): string
8686
try {
8787
return $this->value = ($this->value)();
8888
} catch (\Throwable $e) {
89-
if (\TypeError::class === \get_class($e) && __FILE__ === $e->getFile()) {
89+
if (\TypeError::class === $e::class && __FILE__ === $e->getFile()) {
9090
$type = explode(', ', $e->getMessage());
9191
$type = substr(array_pop($type), 0, -\strlen(' returned'));
9292
$r = new \ReflectionFunction($this->value);

Resources/bin/update-data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
echo "Caused by\n";
2929
}
3030

31-
echo get_class($cause).': '.$cause->getMessage()."\n";
31+
echo $cause::class.': '.$cause->getMessage()."\n";
3232
echo "\n";
3333
echo $cause->getFile().':'.$cause->getLine()."\n";
3434
echo $cause->getTraceAsString()."\n";

0 commit comments

Comments
 (0)