Skip to content

Commit 85d8361

Browse files
deguiffabpot
authored andcommitted
Replace get_class() calls by ::class
1 parent b1ba36e commit 85d8361

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

JsonResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public function setData(mixed $data = []): static
127127
try {
128128
$data = json_encode($data, $this->encodingOptions);
129129
} catch (\Exception $e) {
130-
if ('Exception' === \get_class($e) && str_starts_with($e->getMessage(), 'Failed calling ')) {
130+
if ('Exception' === $e::class && str_starts_with($e->getMessage(), 'Failed calling ')) {
131131
throw $e->getPrevious() ?: $e;
132132
}
133133
throw $e;

Session/Storage/NativeSessionStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ public function save()
240240
$previousHandler = set_error_handler(function ($type, $msg, $file, $line) use (&$previousHandler) {
241241
if (\E_WARNING === $type && str_starts_with($msg, 'session_write_close():')) {
242242
$handler = $this->saveHandler instanceof SessionHandlerProxy ? $this->saveHandler->getHandler() : $this->saveHandler;
243-
$msg = sprintf('session_write_close(): Failed to write session data with "%s" handler', \get_class($handler));
243+
$msg = sprintf('session_write_close(): Failed to write session data with "%s" handler', $handler::class);
244244
}
245245

246246
return $previousHandler ? $previousHandler($type, $msg, $file, $line) : false;

0 commit comments

Comments
 (0)