From aad79004eed47ad6fe29e8cc0179fa07e2d2a585 Mon Sep 17 00:00:00 2001 From: Matan Yadaev Date: Sun, 24 Nov 2024 00:01:06 +0200 Subject: [PATCH] fix phpstan error --- src/GeometryCast.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GeometryCast.php b/src/GeometryCast.php index 79a11e5..69d1faf 100644 --- a/src/GeometryCast.php +++ b/src/GeometryCast.php @@ -97,7 +97,7 @@ private function extractValuesFromExpression(ExpressionContract $expression, Con preg_match("/ST_GeomFromText\(\s*'([^']+)'\s*(?:,\s*(\d+))?\s*(?:,\s*'([^']+)')?\s*\)/", (string) $expressionValue, $matches); return [ - 'wkt' => $matches[1], + 'wkt' => $matches[1] ?? '', 'srid' => (int) ($matches[2] ?? 0), ]; }