rector correction: cast value to string

This commit is contained in:
Julie Lenaerts 2024-04-12 12:35:52 +02:00
parent e8b95f8491
commit dbb9feb129

View File

@ -65,8 +65,8 @@ class PostalCodeFRFromOpenData
private function handleRecord(array $record): void
{
if ('' !== trim($record['_geopoint'])) {
[$lat, $lon] = array_map(static fn ($el) => (float) trim($el), explode(',', $record['_geopoint']));
if ('' !== trim((string) $record['_geopoint'])) {
[$lat, $lon] = array_map(static fn ($el) => (float) trim($el), explode(',', (string) $record['_geopoint']));
} else {
$lat = $lon = 0.0;
}