phpstan, rector, phpcs fixes

This commit is contained in:
2025-05-08 10:59:54 +02:00
parent c4b760c452
commit 6b1696b62e
17 changed files with 51 additions and 54 deletions

View File

@@ -108,7 +108,7 @@ class ListEvents implements ListInterface, GroupedExportInterface
return 'Exports of events';
}
public function getLabels($key, array $values, $data): \Closure
public function getLabels($key, array $values, $data)
{
return match ($key) {
'event_id' => fn ($value) => '_header' === $value ? 'export.event.list.'.$key : $value,
@@ -258,21 +258,21 @@ class ListEvents implements ListInterface, GroupedExportInterface
break;
case 'event_type':
if (!$qb->getDQLPart('join') || !$this->hasJoin($qb, 'event.type')) {
if (!$this->hasJoin($qb, 'event.type')) {
$qb->leftJoin('event.type', 'type');
}
$qb->addSelect('type.name AS event_type');
break;
case 'event_center':
if (!$qb->getDQLPart('join') || !$this->hasJoin($qb, 'event.center')) {
if (!$this->hasJoin($qb, 'event.center')) {
$qb->leftJoin('event.center', 'center');
}
$qb->addSelect('center.name AS event_center');
break;
case 'event_moderator':
if (!$qb->getDQLPart('join') || !$this->hasJoin($qb, 'event.moderator')) {
if (!$this->hasJoin($qb, 'event.moderator')) {
$qb->leftJoin('event.moderator', 'user');
}
$qb->addSelect('user.username AS event_moderator');
@@ -283,7 +283,7 @@ class ListEvents implements ListInterface, GroupedExportInterface
break;
case 'event_location':
if (!$qb->getDQLPart('join') || !$this->hasJoin($qb, 'event.location')) {
if (!$this->hasJoin($qb, 'event.location')) {
$qb->leftJoin('event.location', 'location');
}
$qb->addSelect('location.name AS event_location');