chore: code cleanup

This commit is contained in:
Björn Fromme committed 2025-08-21 14:20:43 +02:00
1 parent c4e28818e0
commit e36009008c
273 files changed
+547 -531

No files matched your search

-1
View File
@@ -6,7 +6,6 @@ use App\Entity\Application;
use App\Entity\Assignment;
use App\Entity\Teamer;
use App\Model\AssignmentFilterDto;
use App\Model\TimelineFilterDto;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\ORM\Query;
use Doctrine\ORM\Query\Expr\Join;
+2 -2
View File
@@ -60,7 +60,7 @@ class DestinationRepository extends ServiceEntityRepository
$qb->expr()->andX(
$qb->expr()->isNull('destination.deletedAt'),
$qb->expr()->isNull('destination.busProId'))
)
)
->getQuery()
;
}
@@ -77,7 +77,7 @@ class DestinationRepository extends ServiceEntityRepository
$qb->expr()->like('destination.hotel', ':search'),
$qb->expr()->like('DATE_FORMAT(destination.dateFrom, \'%d.%m.%y\')', ':search')
))
)
)
->setParameter('search', '%'.$this->escapeLikeWildcards($search).'%')
;
+1 -1
View File
@@ -104,7 +104,7 @@ class TeamerRepository extends ServiceEntityRepository
{
$qb = $this->createQueryBuilder('teamer');
$teamers = $qb
$teamers = $qb
->where($qb->expr()->orX(
$qb->expr()->like('teamer.lastName', ':search'),
$qb->expr()->like('teamer.firstName', ':search'),
+3 -5
View File
@@ -8,7 +8,6 @@ use App\Repository\Traits\QueryHelperTrait;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\ORM\Query;
use Doctrine\Persistence\ManagerRegistry;
use setasign\Fpdi\PdfParser\CrossReference\AbstractReader;
/**
* @extends ServiceEntityRepository<Upload>
@@ -38,7 +37,6 @@ class UploadRepository extends ServiceEntityRepository
;
}
public function getGlobal(): array
{
return $this
@@ -70,7 +68,7 @@ class UploadRepository extends ServiceEntityRepository
];
foreach ($documents as $document) {
/** @var Upload $document */
/* @var Upload $document */
$data[] = [
'value' => $document->getId(),
'text' => $document->getDisplayName() ?? $document->getOriginalFilename(),
@@ -82,7 +80,7 @@ class UploadRepository extends ServiceEntityRepository
public function getBatchDownloadListQuery(
string $type = Upload::TYPE_INVOICE,
string $status = Upload::STATUS_PAID
string $status = Upload::STATUS_PAID,
): Query {
$qb = $this->createQueryBuilder('upload');
@@ -108,7 +106,7 @@ class UploadRepository extends ServiceEntityRepository
public function getBatchDownloadList(
string $type = Upload::TYPE_INVOICE,
string $status = Upload::STATUS_PAID
string $status = Upload::STATUS_PAID,
): array {
return $this
->getBatchDownloadListQuery($type, $status)
+5 -5
View File
@@ -32,9 +32,9 @@ class UserRepository extends ServiceEntityRepository
$qb = $this->createQueryBuilder('u');
return $qb
->where("JSON_CONTAINS(u.roles, :role_admin) = 1")
->orWhere("JSON_CONTAINS(u.roles, :role_manager) = 1")
->orWhere("JSON_CONTAINS(u.roles, :role_house_manager) = 1")
->where('JSON_CONTAINS(u.roles, :role_admin) = 1')
->orWhere('JSON_CONTAINS(u.roles, :role_manager) = 1')
->orWhere('JSON_CONTAINS(u.roles, :role_house_manager) = 1')
->orderBy('u.lastName', 'ASC')
->setParameters([
'role_admin' => json_encode('ROLE_ADMIN'),
@@ -47,8 +47,8 @@ class UserRepository extends ServiceEntityRepository
}
/**
* @param string $role
* @param string[]|string $hotelCode
*
* @return User[]
*/
public function getUsersByRoleAndHotelCode(string $role, mixed $hotelCode): array
@@ -80,7 +80,7 @@ class UserRepository extends ServiceEntityRepository
{
$qb = $this->createQueryBuilder('user');
$users = $qb
$users = $qb
->where($qb->expr()->orX(
$qb->expr()->like('user.lastName', ':search'),
$qb->expr()->like('user.firstName', ':search'),