chore: code cleanup

This commit is contained in:
Björn Fromme
2025-08-21 14:20:43 +02:00
parent c4e28818e0
commit e36009008c
273 changed files with 547 additions and 531 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ class ApiClient
private readonly ResponseParser $responseParser,
private readonly LoggerInterface $logger,
private readonly FilesystemOperator $xmlDump,
array $options
array $options,
) {
$this->config = $this->resolveOptions($options);
}
@@ -11,7 +11,8 @@ use Symfony\Contracts\Cache\ItemInterface;
class CountryDataProvider
{
public function __construct(private readonly ApiClient $apiClient, private readonly CacheInterface $cache)
{}
{
}
public function getAll(): array
{
@@ -12,7 +12,8 @@ use Symfony\Contracts\Cache\ItemInterface;
class HotelDataProvider
{
public function __construct(private readonly ApiClient $apiClient, private readonly CacheInterface $cache)
{}
{
}
public function getAll(): array
{
@@ -11,7 +11,8 @@ use Symfony\Contracts\Cache\ItemInterface;
class PickupDataProvider
{
public function __construct(private readonly ApiClient $apiClient, private readonly CacheInterface $cache)
{}
{
}
public function getAll(): array
{
+2 -1
View File
@@ -5,7 +5,8 @@ namespace App\BusProNet\Model;
class BaseDataResponse
{
public function __construct(private readonly array $items)
{}
{
}
public function getItems(): array
{
-2
View File
@@ -2,8 +2,6 @@
namespace App\BusProNet\Model;
use Symfony\Component\Serializer\Annotation\SerializedName;
class Communication
{
private ?string $phone = null;
@@ -16,7 +16,8 @@ class CrmAttributesResponse
return $this->attributeGroups;
}
public function setAttributeGroups(?array $attributeGroups): static{
public function setAttributeGroups(?array $attributeGroups): static
{
$this->attributeGroups = $attributeGroups;
return $this;
+2 -2
View File
@@ -7,7 +7,7 @@ class NotificationResponse
private ?int $code;
private ?string $message;
public function __construct(int $code = null, string $message = null)
public function __construct(?int $code = null, ?string $message = null)
{
$this->code = $code;
$this->message = $message;
@@ -33,7 +33,7 @@ class NotificationResponse
// These weird and contradictory looking assertions are required because
// of the stupid API implementation that doesn't distinguish between error
// and success responses.
$responseIsError = 100 <= $this->getCode() || $this->getMessage() === 'Daten konnten nicht gesendet werden.';
$responseIsError = 100 <= $this->getCode() || 'Daten konnten nicht gesendet werden.' === $this->getMessage();
$responseIsSuccess = 650 === $this->getCode() && false === stripos($this->getMessage(), 'fehler');
return false === $responseIsError && true === $responseIsSuccess;
+1 -1
View File
@@ -86,7 +86,7 @@ class ResponseParser
$title = (string) $addressXml->titel;
$gender = (string) $addressXml->geschlecht;
$gender = strtoupper($gender) === 'W' ? 'F' : strtoupper($gender);
$gender = 'W' === strtoupper($gender) ? 'F' : strtoupper($gender);
$dateString = (string) $addressXml->geburtsdatum;
$dateOfBirth = empty($dateString) ? null : \DateTimeImmutable::createFromFormat('d.m.Y', $dateString);
+3 -3
View File
@@ -15,7 +15,7 @@ class UserDataHandler
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -55,7 +55,7 @@ class UserDataHandler
array $roles,
bool $isTeamer = false,
array $crmSelections = [],
array $hotelCodes = []
array $hotelCodes = [],
): User {
$user = new User();
$user
@@ -95,7 +95,7 @@ class UserDataHandler
array $roles,
bool $isTeamer = false,
array $crmSelections = [],
array $hotelCodes = []
array $hotelCodes = [],
): void {
$user
->setEmail($profileResponse->getCommunication()->getEmail())
+2 -2
View File
@@ -117,7 +117,7 @@ class BpnImportCommand extends Command
'pickups' => json_encode($datePickups),
'cost_unit' => $hotel->getCostUnit(),
'country' => $hotel->getCountry(),
'updated_at' => (new \DateTimeImmutable())->format('Y-m-d H:i:s')
'updated_at' => (new \DateTimeImmutable())->format('Y-m-d H:i:s'),
], [
'id' => $id,
'hotel_bus_pro_id' => $hotelBusProId,
@@ -139,7 +139,7 @@ class BpnImportCommand extends Command
'pickups' => json_encode($datePickups),
'cost_unit' => $hotel->getCostUnit(),
'country' => $hotel->getCountry(),
'created_at' => (new \DateTimeImmutable())->format('Y-m-d H:i:s')
'created_at' => (new \DateTimeImmutable())->format('Y-m-d H:i:s'),
])
;
++$addedCount;
@@ -17,7 +17,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $eventDispatcher
private readonly EventDispatcherInterface $eventDispatcher,
) {
}
@@ -19,7 +19,7 @@ class DisposeController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $eventDispatcher
private readonly EventDispatcherInterface $eventDispatcher,
) {
}
@@ -29,7 +29,6 @@ class IndexController extends AbstractController
$query = $this
->applicationRepository
->getPendingQuery($filterDto);
;
$pagination = $this->paginator->paginate(
$query,
@@ -19,7 +19,7 @@ class StatusController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $eventDispatcher
private readonly EventDispatcherInterface $eventDispatcher,
) {
}
@@ -12,7 +12,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class DestinationController extends AbstractController
{
public function __construct(private readonly DestinationRepository $bpnDateRepository)
{}
{
}
#[Route('/admin/autocomplete/destination', name: 'app_admin_autocomplete_destination')]
#[IsGranted('ROLE_ADMINISTRATIVE')]
@@ -12,7 +12,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class DocumentController extends AbstractController
{
public function __construct(private readonly UploadRepository $uploadRepository)
{}
{
}
#[Route('/admin/autocomplete/document', name: 'app_admin_autocomplete_document')]
#[IsGranted('ROLE_ADMINISTRATIVE')]
@@ -13,7 +13,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class HotelController extends AbstractController
{
public function __construct(private readonly HotelDataProvider $hotelDataProvider)
{}
{
}
#[Route('/admin/autocomplete/hotel', name: 'app_admin_autocomplete_hotel')]
#[IsGranted('ROLE_ADMINISTRATIVE')]
@@ -12,7 +12,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class TeamerController extends AbstractController
{
public function __construct(private readonly TeamerRepository $teamerRepository)
{}
{
}
#[Route('/admin/autocomplete/teamer', name: 'app_admin_autocomplete_teamer')]
#[IsGranted('ROLE_ADMINISTRATIVE')]
@@ -12,7 +12,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class UserController extends AbstractController
{
public function __construct(private readonly UserRepository $userRepository)
{}
{
}
#[Route('/admin/autocomplete/user', name: 'app_admin_autocomplete_user')]
#[IsGranted('ROLE_ADMIN')]
@@ -18,7 +18,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $eventDispatcher
private readonly EventDispatcherInterface $eventDispatcher,
) {
}
@@ -17,7 +17,7 @@ class ApproveController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -19,7 +19,7 @@ class ProvideController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $eventDispatcher
private readonly EventDispatcherInterface $eventDispatcher,
) {
}
+1 -1
View File
@@ -15,7 +15,7 @@ class IndexController extends AbstractController
{
public function __construct(
private readonly LogRepository $logRepository,
private readonly PaginatorInterface $paginator
private readonly PaginatorInterface $paginator,
) {
}
@@ -17,7 +17,7 @@ class CreateController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -17,7 +17,7 @@ class DuplicateController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -17,7 +17,7 @@ class EditController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -14,7 +14,7 @@ class IndexController extends AbstractController
{
public function __construct(
private readonly AvailabilityRepository $availabilityRepository,
private readonly PaginatorInterface $paginator
private readonly PaginatorInterface $paginator,
) {
}
@@ -21,7 +21,7 @@ class CreateController extends AbstractController
public function __construct(
private readonly UploadHandler $uploadHandler,
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -21,7 +21,7 @@ class EditController extends AbstractController
public function __construct(
private readonly UploadHandler $uploadHandler,
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -11,7 +11,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class IndexController extends AbstractController
{
public function __construct(private readonly ContactRepository $contactRepository)
{}
{
}
#[Route('/admin/system/contact', name: 'app_admin_system_contact_index')]
#[IsGranted('ROLE_ADMINISTRATIVE')]
@@ -17,7 +17,7 @@ class CreateController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -17,7 +17,7 @@ class DuplicateController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -17,7 +17,7 @@ class EditController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -11,7 +11,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class IndexController extends AbstractController
{
public function __construct(private readonly FeeRepository $feeRepository)
{}
{
}
#[Route('/admin/system/fee', name: 'app_admin_system_fee_index')]
#[IsGranted('ROLE_ADMIN')]
@@ -16,7 +16,7 @@ class CreateController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -42,7 +42,7 @@ class CreateController extends AbstractController
}
return $this->render('admin/system/feedback_set/create.html.twig', [
'form' => $form
'form' => $form,
]);
}
}
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -16,7 +16,7 @@ class EditController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -40,7 +40,7 @@ class EditController extends AbstractController
}
return $this->render('admin/system/feedback_set/edit.html.twig', [
'form' => $form
'form' => $form,
]);
}
}
@@ -11,7 +11,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class IndexController extends AbstractController
{
public function __construct(private readonly FeedbackSetRepository $feedbackSetRepository)
{}
{
}
#[Route('/admin/system/feedback-set', name: 'app_admin_system_feedback_set_index')]
#[IsGranted('ROLE_ADMIN')]
@@ -16,7 +16,7 @@ class CreateController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -42,7 +42,7 @@ class CreateController extends AbstractController
}
return $this->render('admin/system/job_profile/create.html.twig', [
'form' => $form
'form' => $form,
]);
}
}
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -16,7 +16,7 @@ class EditController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -40,7 +40,7 @@ class EditController extends AbstractController
}
return $this->render('admin/system/job_profile/edit.html.twig', [
'form' => $form
'form' => $form,
]);
}
}
@@ -11,7 +11,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class IndexController extends AbstractController
{
public function __construct(private readonly JobProfileRepository $jobProfileRepository)
{}
{
}
#[Route('/admin/system/job-profile', name: 'app_admin_system_job_profile_index')]
#[IsGranted('ROLE_ADMIN')]
@@ -17,7 +17,7 @@ class CreateController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -17,7 +17,7 @@ class EditController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -11,7 +11,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class IndexController extends AbstractController
{
public function __construct(private readonly TrainingRepository $trainingRepository)
{}
{
}
#[Route('/admin/system/training', name: 'app_admin_system_training_index')]
#[IsGranted('ROLE_ADMIN')]
@@ -11,7 +11,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class IndexController extends AbstractController
{
public function __construct(private readonly UserRepository $userRepository)
{}
{
}
#[Route('/admin/system/user', name: 'app_admin_system_user_index')]
#[IsGranted('ROLE_ADMIN')]
@@ -21,7 +21,7 @@ class DeleteController extends AbstractController
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -32,7 +32,7 @@ class DeleteController extends AbstractController
Teamer $teamer,
#[MapEntity(mapping: ['availability_id' => 'id'])]
Availability $availability,
Request $request
Request $request,
): Response {
if (true === $request->isMethod('POST')) {
if (null === $availability->getOwner()) {
@@ -17,7 +17,8 @@ class RemarksController extends AbstractController
use ReturnUrlTrait;
public function __construct(private readonly EntityManagerInterface $entityManager)
{}
{
}
#[Route('/admin/teamer/remarks/{uuid}', name: 'app_admin_teamer_remarks_internal')]
#[IsGranted('ROLE_ADMIN')]
@@ -32,7 +33,7 @@ class RemarksController extends AbstractController
'action' => $this->generateUrl('app_admin_teamer_remarks_internal', [
'uuid' => $teamer->getUuid(),
'r' => $returnUrl,
])
]),
])
->add('remarks', TextareaType::class, [
'label' => 'Anmerkungen',
@@ -12,7 +12,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class SkillsController extends AbstractController
{
public function __construct(private readonly TrainingRepository $trainingRepository)
{}
{
}
#[Route('/admin/teamer/skills/{uuid}', name: 'app_admin_teamer_skills')]
#[IsGranted('ROLE_ADMIN')]
@@ -26,7 +26,7 @@ class CreateController extends AbstractController
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $eventDispatcher,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -40,7 +40,7 @@ class CreateController extends AbstractController
Training $training,
#[MapEntity(mapping: ['teamer_id' => 'id'])]
Teamer $teamer,
Request $request
Request $request,
): Response {
$attendance = new TrainingAttendance();
$attendance
@@ -61,7 +61,7 @@ class CreateController extends AbstractController
'training_id' => $training->getId(),
'teamer_id' => $teamer->getId(),
'r' => $returnUrl,
])
]),
])
->add('date', AbbreviatedDateType::class, [
'label' => 'Datum',
@@ -22,7 +22,7 @@ class DeleteController extends AbstractController
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $eventDispatcher,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -20,7 +20,7 @@ class CreateController extends AbstractController
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -18,7 +18,7 @@ class DetailController extends AbstractController
public function __construct(
private readonly ApplicationRepository $applicationRepository,
private readonly DispositionRepository $dispositionRepository
private readonly DispositionRepository $dispositionRepository,
) {
}
@@ -19,7 +19,7 @@ class DuplicateController extends AbstractController
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -19,7 +19,7 @@ class EditController extends AbstractController
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -16,7 +16,7 @@ class IndexController extends AbstractController
public function __construct(
private readonly AssignmentRepository $assignmentRepository,
private readonly PaginatorInterface $paginator,
private readonly AssignmentFilterHandler $filterHandler
private readonly AssignmentFilterHandler $filterHandler,
) {
}
@@ -15,7 +15,7 @@ class TimelineController extends AbstractController
public function __construct(
private readonly AssignmentRepository $assignmentRepository,
private readonly TimelineService $timelineService,
private readonly TimelineFilterHandler $filterHandler
private readonly TimelineFilterHandler $filterHandler,
) {
}
@@ -14,7 +14,7 @@ class IndexController extends AbstractController
{
public function __construct(
private readonly AvailabilityRepository $availabilityRepository,
private readonly PaginatorInterface $paginator
private readonly PaginatorInterface $paginator,
) {
}
@@ -17,7 +17,7 @@ class SpecialAgreementsController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -97,7 +97,7 @@ class CheckController extends AbstractController
]);
}
private function rejectDocument(Upload $document, string $comment = null): void
private function rejectDocument(Upload $document, ?string $comment = null): void
{
$document
->setStatus(Upload::STATUS_REJECTED)
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -17,7 +17,7 @@ class IndexController extends AbstractController
public function __construct(
private readonly UploadRepository $uploadRepository,
private readonly PaginatorInterface $paginator,
private readonly DocumentFilterHandler $filterHandler
private readonly DocumentFilterHandler $filterHandler,
) {
}
@@ -10,7 +10,6 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class DetailController extends AbstractController
{
#[Route('/administrative/feedback/detail/{uuid}', name: 'app_administrative_feedback_detail')]
#[IsGranted('ROLE_ADMINISTRATIVE')]
public function index(Feedback $feedback): Response
@@ -16,7 +16,7 @@ class IndexController extends AbstractController
public function __construct(
private readonly FeedbackFilterHandler $filterHandler,
private readonly FeedbackRepository $feedbackRepository,
private readonly PaginatorInterface $paginator
private readonly PaginatorInterface $paginator,
) {
}
@@ -22,7 +22,7 @@ class ProvideController extends AbstractController
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $eventDispatcher
private readonly EventDispatcherInterface $eventDispatcher,
) {
}
@@ -16,7 +16,7 @@ class ProfileController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -23,7 +23,7 @@ class CreateController extends AbstractController
private readonly EntityManagerInterface $entityManager,
private readonly HotelDataProvider $hotelDataProvider,
private readonly PickupDataProvider $pickupDataProvider,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -19,7 +19,7 @@ class DuplicateController extends AbstractController
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly HotelDataProvider $hotelDataProvider,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -22,7 +22,7 @@ class EditController extends AbstractController
private readonly EntityManagerInterface $entityManager,
private readonly HotelDataProvider $hotelDataProvider,
private readonly PickupDataProvider $pickupDataProvider,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -16,7 +16,7 @@ class IndexController extends AbstractController
public function __construct(
private readonly DestinationRepository $destinationRepository,
private readonly PaginatorInterface $paginator,
private readonly DestinationFilterHandler $filterHandler
private readonly DestinationFilterHandler $filterHandler,
) {
}
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -17,7 +17,7 @@ class EditController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -14,7 +14,7 @@ class IndexController extends AbstractController
{
public function __construct(
private readonly UploadRepository $uploadRepository,
private readonly PaginatorInterface $paginator
private readonly PaginatorInterface $paginator,
) {
}
@@ -19,7 +19,7 @@ class ReplaceController extends AbstractController
public function __construct(
private readonly UploadHandler $uploadHandler,
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -19,7 +19,7 @@ class UploadController extends AbstractController
public function __construct(
private readonly UploadHandler $uploadHandler,
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -51,7 +51,7 @@ class UploadController extends AbstractController
if ($form->isSubmitted() && $form->isValid()) {
$count = count($uploadedDocuments);
$this->addFlash('success', $count === 1 ? 'Das Dokument wurde hochgeladen' : 'Die Dokumente wurden hochgeladen');
$this->addFlash('success', 1 === $count ? 'Das Dokument wurde hochgeladen' : 'Die Dokumente wurden hochgeladen');
$loggerContext = [];
foreach ($uploadedDocuments as $document) {
$loggerContext[] = [
@@ -16,7 +16,7 @@ class CreateController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -16,7 +16,7 @@ class EditController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -16,7 +16,7 @@ class IndexController extends AbstractController
{
public function __construct(
private readonly FaqRepository $faqRepository,
private readonly EntityManagerInterface $entityManager
private readonly EntityManagerInterface $entityManager,
) {
}
@@ -17,7 +17,7 @@ class CreateController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -17,7 +17,7 @@ class EditController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -20,7 +20,7 @@ class IndexController extends AbstractController
protected readonly TeamerFilterHandler $filterHandler,
private readonly TeamerRepository $teamerRepository,
private readonly PaginatorInterface $paginator,
private readonly EntityManagerInterface $entityManager
private readonly EntityManagerInterface $entityManager,
) {
}
@@ -17,7 +17,8 @@ class InfoController extends AbstractController
use ReturnUrlTrait;
public function __construct(private readonly DispositionRepository $dispositionRepository)
{}
{
}
#[Route('/administrative/teamer/info/{uuid}', name: 'app_administrative_teamer_info')]
#[IsGranted(new Expression('is_granted("ROLE_ADMINISTRATIVE") or is_granted("ROLE_HOUSE_MANAGER")'))]
@@ -15,7 +15,7 @@ class RecentAssignmentsController extends AbstractController
{
public function __construct(
private readonly DispositionRepository $dispositionRepository,
private readonly PaginatorInterface $paginator
private readonly PaginatorInterface $paginator,
) {
}
@@ -38,7 +38,6 @@ class RecentAssignmentsController extends AbstractController
]
);
return $this->render('administrative/teamer/recent_assignments.html.twig', [
'teamer' => $teamer,
'pagination' => $pagination,
@@ -19,7 +19,7 @@ class AssignmentFilterController extends AbstractController
public function __construct(
private readonly AssignmentFilterHandler $filterHandler,
private readonly AssignmentRepository $assignmentRepository
private readonly AssignmentRepository $assignmentRepository,
) {
}
@@ -19,7 +19,7 @@ class DestinationFilterController extends AbstractController
use ReturnUrlTrait;
public function __construct(
private readonly DestinationFilterHandler $filterHandler
private readonly DestinationFilterHandler $filterHandler,
) {
}
+1 -1
View File
@@ -20,7 +20,7 @@ class DownloadController extends AbstractController
public function __construct(
private readonly UploadHandler $uploadHandler,
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -15,7 +15,7 @@ class IndexController extends AbstractController
{
public function __construct(
private readonly DispositionRepository $dispositionRepository,
private readonly PaginatorInterface $paginator
private readonly PaginatorInterface $paginator,
) {
}
+3 -2
View File
@@ -16,7 +16,7 @@ class LoginController extends AbstractController
{
// redirect to default route in case of active session
if (null !== $user = $this->getUser()) {
/** @var User $user */
/* @var User $user */
return $this->redirectToRoute($user->getDefaultRoute());
}
@@ -37,5 +37,6 @@ class LoginController extends AbstractController
#[Route('/logout', name: 'app_security_logout')]
public function logout(): void
{}
{
}
}
@@ -16,7 +16,8 @@ use Symfony\Component\Validator\Constraints\NotBlank;
class PasswordResetController extends AbstractController
{
public function __construct(private readonly ApiClient $apiClient, private readonly LoggerInterface $logger)
{}
{
}
#[Route('/password-reset', name: 'app_security_password_reset')]
public function index(Request $request): Response
@@ -19,7 +19,7 @@ class CreateController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $eventDispatcher
private readonly EventDispatcherInterface $eventDispatcher,
) {
}
@@ -15,7 +15,7 @@ class IndexController extends AbstractController
{
public function __construct(
private readonly ApplicationRepository $applicationRepository,
private readonly PaginatorInterface $paginator
private readonly PaginatorInterface $paginator,
) {
}

Some files were not shown because too many files have changed in this diff Show More