mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 02:23:51 +00:00
apply rector rules: php up to php82
This commit is contained in:
@@ -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 ','");
|
||||
}
|
||||
|
Reference in New Issue
Block a user