mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 11:33:49 +00:00
DX: apply rector rules up to php8.0
This commit is contained in:
@@ -26,20 +26,8 @@ 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';
|
||||
|
||||
private PostalCodeBaseImporter $baseImporter;
|
||||
|
||||
private HttpClientInterface $client;
|
||||
|
||||
private LoggerInterface $logger;
|
||||
|
||||
public function __construct(
|
||||
PostalCodeBaseImporter $baseImporter,
|
||||
HttpClientInterface $client,
|
||||
LoggerInterface $logger
|
||||
) {
|
||||
$this->baseImporter = $baseImporter;
|
||||
$this->client = $client;
|
||||
$this->logger = $logger;
|
||||
public function __construct(private PostalCodeBaseImporter $baseImporter, private HttpClientInterface $client, private LoggerInterface $logger)
|
||||
{
|
||||
}
|
||||
|
||||
public function import(): void
|
||||
@@ -86,7 +74,7 @@ class PostalCodeFRFromOpenData
|
||||
|
||||
$ref = trim($record['Code_commune_INSEE']);
|
||||
|
||||
if ('987' === substr($ref, 0, 3)) {
|
||||
if (str_starts_with($ref, '987')) {
|
||||
// some differences in French Polynesia
|
||||
$ref .= '.' . trim($record['Libellé_d_acheminement']);
|
||||
}
|
||||
|
Reference in New Issue
Block a user