apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -13,9 +13,6 @@ namespace Chill\MainBundle\Service\Import;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Statement;
use Exception;
use function array_key_exists;
use function count;
/**
* Optimized way to load postal code into database.
@@ -85,14 +82,14 @@ class PostalCodeBaseImporter
$centerSRID,
];
if (100 <= count($this->waitingForInsert)) {
if (100 <= \count($this->waitingForInsert)) {
$this->doInsertPending();
}
}
private function doInsertPending(): void
{
if (!array_key_exists($forNumber = count($this->waitingForInsert), $this->cachingStatements)) {
if (!\array_key_exists($forNumber = \count($this->waitingForInsert), $this->cachingStatements)) {
$sql = strtr(self::QUERY, [
'{{ values }}' => implode(
', ',
@@ -107,9 +104,9 @@ class PostalCodeBaseImporter
try {
$statement->executeStatement(array_merge(...$this->waitingForInsert));
} catch (Exception $e) {
} catch (\Exception $e) {
// in some case, we can add debug code here
//dump($this->waitingForInsert);
// dump($this->waitingForInsert);
throw $e;
} finally {
$this->waitingForInsert = [];