mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-07 15:25:00 +00:00
apply rules rector up to php82
This commit is contained in:
@@ -30,7 +30,7 @@ use function strlen;
|
||||
|
||||
class LoadPostalCodesCommand extends Command
|
||||
{
|
||||
public function __construct(private EntityManagerInterface $entityManager, private ValidatorInterface $validator)
|
||||
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly ValidatorInterface $validator)
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
@@ -90,7 +90,7 @@ class LoadPostalCodesCommand extends Command
|
||||
0,
|
||||
$input->getOption('delimiter'),
|
||||
$input->getOption('enclosure'),
|
||||
$input->getOption('escape')
|
||||
(string) $input->getOption('escape')
|
||||
))
|
||||
) {
|
||||
try {
|
||||
@@ -109,7 +109,7 @@ class LoadPostalCodesCommand extends Command
|
||||
|
||||
private function addPostalCode($row, OutputInterface $output)
|
||||
{
|
||||
if ('FR' === $row[2] && strlen($row[0]) === 4) {
|
||||
if ('FR' === $row[2] && strlen((string) $row[0]) === 4) {
|
||||
// CP in FRANCE are on 5 digit
|
||||
// For CP starting with a zero, the starting zero can be remove if stored as number in a csv
|
||||
// add a zero if CP from FR and on 4 digit
|
||||
|
Reference in New Issue
Block a user