From 5f0ed27f55e491b8974363d361f04a4233dc125c Mon Sep 17 00:00:00 2001 From: Benjamin Morel Date: Tue, 22 Nov 2022 01:06:45 +0100 Subject: [PATCH] Use get_debug_type() --- src/Types/GeometryType.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Types/GeometryType.php b/src/Types/GeometryType.php index 478a8a9..a12918d 100644 --- a/src/Types/GeometryType.php +++ b/src/Types/GeometryType.php @@ -99,9 +99,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform) : ?st return $value->asBinary(); } - $type = is_object($value) ? get_class($value) : gettype($value); - - throw new \UnexpectedValueException(sprintf('Expected %s, got %s.', Geometry::class, $type)); + throw new \UnexpectedValueException(sprintf('Expected %s, got %s.', Geometry::class, get_debug_type($value))); } public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform) : string