apply rector rules: php up to php82

This commit is contained in:
2023-07-19 23:16:01 +02:00
parent 7b637d1287
commit 023a29cb78
744 changed files with 1369 additions and 1381 deletions

View File

@@ -38,7 +38,7 @@ class ParticipationController extends AbstractController
/**
* ParticipationController constructor.
*/
public function __construct(private LoggerInterface $logger)
public function __construct(private readonly LoggerInterface $logger)
{
}
@@ -584,7 +584,7 @@ class ParticipationController extends AbstractController
$persons_ids = $request->query->has('person_id') ?
[$request->query->getInt('person_id', 0)] // sf4 check:
// prevent error: `Argument 2 passed to ::getInt() must be of the type int, null given`
: explode(',', $request->query->get('persons_ids'));
: explode(',', (string) $request->query->get('persons_ids'));
$participations = [];
foreach ($persons_ids as $person_id) {
@@ -749,7 +749,7 @@ class ParticipationController extends AbstractController
if (true === $multiple) {
$persons_ids = $request->query->get('persons_ids');
if (!preg_match('/^([0-9]{1,},{0,1}){1,}[0-9]{0,}$/', $persons_ids)) {
if (!preg_match('/^([0-9]{1,},{0,1}){1,}[0-9]{0,}$/', (string) $persons_ids)) {
throw new RuntimeException('The persons_ids value should '
. "contains int separated by ','");
}