apply rules rector up to php82

This commit is contained in:
2023-05-01 21:39:45 +02:00
parent 81e8928344
commit 6d63177ff4
733 changed files with 1257 additions and 1322 deletions

View File

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