diff --git a/src/Types/GeometryCollectionType.php b/src/Types/GeometryCollectionType.php index a2cde58..8aedd4f 100644 --- a/src/Types/GeometryCollectionType.php +++ b/src/Types/GeometryCollectionType.php @@ -11,7 +11,7 @@ */ class GeometryCollectionType extends GeometryType { - public function getName() + public function getName() : string { return 'GeometryCollection'; } diff --git a/src/Types/GeometryType.php b/src/Types/GeometryType.php index 31e82bf..56e70e9 100644 --- a/src/Types/GeometryType.php +++ b/src/Types/GeometryType.php @@ -50,12 +50,12 @@ protected function hasKnownSubclasses() : bool return true; } - public function getName() + public function getName() : string { return 'Geometry'; } - public function getSQLDeclaration(array $column, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) : string { if ($platform->getName() === 'postgresql') { return 'GEOMETRY'; @@ -64,7 +64,7 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform) return strtoupper($this->getName()); } - public function convertToPHPValue($value, AbstractPlatform $platform) + public function convertToPHPValue($value, AbstractPlatform $platform) : ?Geometry { /** @var string|resource|null $value */ if ($value === null) { @@ -89,7 +89,7 @@ public function convertToPHPValue($value, AbstractPlatform $platform) return new $proxyClassName($value, true, self::$srid); } - public function convertToDatabaseValue($value, AbstractPlatform $platform) + public function convertToDatabaseValue($value, AbstractPlatform $platform) : ?string { if ($value === null) { return null; @@ -104,7 +104,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform) throw new \UnexpectedValueException(sprintf('Expected %s, got %s.', Geometry::class, $type)); } - public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform) + public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform) : string { if ($platform->getName() === 'mysql') { $sqlExpr = sprintf('BINARY %s', $sqlExpr); @@ -113,22 +113,22 @@ public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform) return sprintf('ST_GeomFromWKB(%s, %d)', $sqlExpr, self::$srid); } - public function convertToPHPValueSQL($sqlExpr, $platform) + public function convertToPHPValueSQL($sqlExpr, $platform) : string { return sprintf('ST_AsBinary(%s)', $sqlExpr); } - public function canRequireSQLConversion() + public function canRequireSQLConversion() : bool { return true; } - public function requiresSQLCommentHint(AbstractPlatform $platform) + public function requiresSQLCommentHint(AbstractPlatform $platform) : bool { return true; } - public function getBindingType() + public function getBindingType() : int { return \PDO::PARAM_LOB; } diff --git a/src/Types/LineStringType.php b/src/Types/LineStringType.php index 483769e..0b2fe6b 100644 --- a/src/Types/LineStringType.php +++ b/src/Types/LineStringType.php @@ -11,7 +11,7 @@ */ class LineStringType extends GeometryType { - public function getName() + public function getName() : string { return 'LineString'; } diff --git a/src/Types/MultiLineStringType.php b/src/Types/MultiLineStringType.php index 832057c..657568c 100644 --- a/src/Types/MultiLineStringType.php +++ b/src/Types/MultiLineStringType.php @@ -11,7 +11,7 @@ */ class MultiLineStringType extends GeometryType { - public function getName() + public function getName() : string { return 'MultiLineString'; } diff --git a/src/Types/MultiPointType.php b/src/Types/MultiPointType.php index 2ec14f4..618147e 100644 --- a/src/Types/MultiPointType.php +++ b/src/Types/MultiPointType.php @@ -11,7 +11,7 @@ */ class MultiPointType extends GeometryType { - public function getName() + public function getName() : string { return 'MultiPoint'; } diff --git a/src/Types/MultiPolygonType.php b/src/Types/MultiPolygonType.php index 1bacc01..005df00 100644 --- a/src/Types/MultiPolygonType.php +++ b/src/Types/MultiPolygonType.php @@ -11,7 +11,7 @@ */ class MultiPolygonType extends GeometryType { - public function getName() + public function getName() : string { return 'MultiPolygon'; } diff --git a/src/Types/PointType.php b/src/Types/PointType.php index eeec1a1..5f371d5 100644 --- a/src/Types/PointType.php +++ b/src/Types/PointType.php @@ -11,7 +11,7 @@ */ class PointType extends GeometryType { - public function getName() + public function getName() : string { return 'Point'; } diff --git a/src/Types/PolygonType.php b/src/Types/PolygonType.php index 6b8c306..eab6a35 100644 --- a/src/Types/PolygonType.php +++ b/src/Types/PolygonType.php @@ -11,7 +11,7 @@ */ class PolygonType extends GeometryType { - public function getName() + public function getName() : string { return 'Polygon'; }