mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 11:33:49 +00:00
apply rector rules: php up to php82
This commit is contained in:
@@ -26,7 +26,7 @@ class PostalCodeFRFromOpenData
|
||||
{
|
||||
private const CSV = 'https://datanova.legroupe.laposte.fr/explore/dataset/laposte_hexasmal/download/?format=csv&timezone=Europe/Berlin&lang=fr&use_labels_for_header=true&csv_separator=%3B';
|
||||
|
||||
public function __construct(private PostalCodeBaseImporter $baseImporter, private HttpClientInterface $client, private LoggerInterface $logger)
|
||||
public function __construct(private readonly PostalCodeBaseImporter $baseImporter, private readonly HttpClientInterface $client, private readonly LoggerInterface $logger)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -72,17 +72,17 @@ class PostalCodeFRFromOpenData
|
||||
$lat = $lon = 0.0;
|
||||
}
|
||||
|
||||
$ref = trim($record['Code_commune_INSEE']);
|
||||
$ref = trim((string) $record['Code_commune_INSEE']);
|
||||
|
||||
if (str_starts_with($ref, '987')) {
|
||||
// some differences in French Polynesia
|
||||
$ref .= '.' . trim($record['Libellé_d_acheminement']);
|
||||
$ref .= '.' . trim((string) $record['Libellé_d_acheminement']);
|
||||
}
|
||||
|
||||
$this->baseImporter->importCode(
|
||||
'FR',
|
||||
trim($record['Libellé_d_acheminement']),
|
||||
trim($record['Code_postal']),
|
||||
trim((string) $record['Libellé_d_acheminement']),
|
||||
trim((string) $record['Code_postal']),
|
||||
$ref,
|
||||
'INSEE',
|
||||
$lat,
|
||||
|
Reference in New Issue
Block a user