apply rector rules: php up to php82

This commit is contained in:
2023-07-19 23:16:01 +02:00
parent 7b637d1287
commit 023a29cb78
744 changed files with 1369 additions and 1381 deletions

View File

@@ -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,