From 1e0ca8d3eb4831e70425dd09b82e42e56f6c6c4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bar=C3=A1=C5=A1ek?= Date: Wed, 28 Sep 2022 23:18:05 +0200 Subject: [PATCH] Fix codestyle for PHP 8.1. --- src/Serializer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Serializer.php b/src/Serializer.php index b84055f..d8ff6da 100644 --- a/src/Serializer.php +++ b/src/Serializer.php @@ -126,7 +126,7 @@ private function process( private function processObject(object $haystack, int $level, array $trackedInstanceHashes = []): array { $values = []; - if (!$haystack instanceof \stdClass && class_exists(get_class($haystack))) { + if (!$haystack instanceof \stdClass && class_exists($haystack::class)) { $ref = new \ReflectionClass($haystack); foreach ($ref->getProperties() as $property) { $property->setAccessible(true);