Skip to content

Commit 6746472

Browse files
updated phpdocs
1 parent 3a4edc0 commit 6746472

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/Database/Validator/Spatial.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ public function __construct(string $spatialType)
1717

1818
/**
1919
* Validate POINT data
20+
*
21+
* @param array<int|float> $value
22+
* @return bool
2023
*/
2124
protected function validatePoint(array $value): bool
2225
{
@@ -25,16 +28,14 @@ protected function validatePoint(array $value): bool
2528
return false;
2629
}
2730

28-
if (!is_numeric($value[0]) || !is_numeric($value[1])) {
29-
$this->message = 'Point coordinates must be numeric values';
30-
return false;
31-
}
32-
3331
return true;
3432
}
3533

3634
/**
3735
* Validate LINESTRING data
36+
*
37+
* @param array<mixed> $value
38+
* @return bool
3839
*/
3940
protected function validateLineString(array $value): bool
4041
{
@@ -60,6 +61,9 @@ protected function validateLineString(array $value): bool
6061

6162
/**
6263
* Validate POLYGON data
64+
*
65+
* @param array<mixed> $value
66+
* @return bool
6367
*/
6468
protected function validatePolygon(array $value): bool
6569
{

0 commit comments

Comments
 (0)