Skip to content

Commit

Permalink
Use get_debug_type()
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Nov 22, 2022
1 parent a579e35 commit 5f0ed27
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Types/GeometryType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5f0ed27

Please sign in to comment.