mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-08 15:54:59 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -13,7 +13,6 @@ namespace Chill\MainBundle\Service\Import;
|
||||
|
||||
use League\Csv\Reader;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use RuntimeException;
|
||||
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||
|
||||
/**
|
||||
@@ -33,13 +32,13 @@ class PostalCodeFRFromOpenData
|
||||
$response = $this->client->request('GET', self::CSV);
|
||||
|
||||
if (200 !== $response->getStatusCode()) {
|
||||
throw new RuntimeException('could not download CSV');
|
||||
throw new \RuntimeException('could not download CSV');
|
||||
}
|
||||
|
||||
$tmpfile = tmpfile();
|
||||
|
||||
if (false === $tmpfile) {
|
||||
throw new RuntimeException('could not create temporary file');
|
||||
throw new \RuntimeException('could not create temporary file');
|
||||
}
|
||||
|
||||
foreach ($this->client->stream($response) as $chunk) {
|
||||
@@ -59,7 +58,7 @@ class PostalCodeFRFromOpenData
|
||||
$this->baseImporter->finalize();
|
||||
fclose($tmpfile);
|
||||
|
||||
$this->logger->info(self::class . ' postal code fetched', ['offset' => $offset ?? 0]);
|
||||
$this->logger->info(self::class.' postal code fetched', ['offset' => $offset ?? 0]);
|
||||
}
|
||||
|
||||
private function handleRecord(array $record): void
|
||||
@@ -74,7 +73,7 @@ class PostalCodeFRFromOpenData
|
||||
|
||||
if (str_starts_with($ref, '987')) {
|
||||
// some differences in French Polynesia
|
||||
$ref .= '.' . trim((string) $record['Libellé_d_acheminement']);
|
||||
$ref .= '.'.trim((string) $record['Libellé_d_acheminement']);
|
||||
}
|
||||
|
||||
$this->baseImporter->importCode(
|
||||
|
Reference in New Issue
Block a user