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 ResponseParser $responseParser,
private readonly LoggerInterface $logger, private readonly LoggerInterface $logger,
private readonly FilesystemOperator $xmlDump, private readonly FilesystemOperator $xmlDump,
array $options array $options,
) { ) {
$this->config = $this->resolveOptions($options); $this->config = $this->resolveOptions($options);
} }
+1 -1
View File
@@ -4,4 +4,4 @@ namespace App\BusProNet;
class ApiClientException extends \Exception class ApiClientException extends \Exception
{ {
} }
+2 -2
View File
@@ -54,7 +54,7 @@ trait ApiClientTrait
private function send($socket, string $data): void private function send($socket, string $data): void
{ {
// message length is prepended to actual message // message length is prepended to actual message
$send = sprintf('%010s', strlen($data)) . $data; $send = sprintf('%010s', strlen($data)).$data;
fwrite($socket, $send); fwrite($socket, $send);
} }
@@ -73,4 +73,4 @@ trait ApiClientTrait
{ {
@fclose($socket); @fclose($socket);
} }
} }
@@ -11,7 +11,8 @@ use Symfony\Contracts\Cache\ItemInterface;
class CountryDataProvider class CountryDataProvider
{ {
public function __construct(private readonly ApiClient $apiClient, private readonly CacheInterface $cache) public function __construct(private readonly ApiClient $apiClient, private readonly CacheInterface $cache)
{} {
}
public function getAll(): array public function getAll(): array
{ {
@@ -40,4 +41,4 @@ class CountryDataProvider
return $this->getAll()[$token] ?? null; return $this->getAll()[$token] ?? null;
} }
} }
@@ -12,7 +12,8 @@ use Symfony\Contracts\Cache\ItemInterface;
class HotelDataProvider class HotelDataProvider
{ {
public function __construct(private readonly ApiClient $apiClient, private readonly CacheInterface $cache) public function __construct(private readonly ApiClient $apiClient, private readonly CacheInterface $cache)
{} {
}
public function getAll(): array public function getAll(): array
{ {
@@ -50,4 +51,4 @@ class HotelDataProvider
return $hotels; return $hotels;
} }
} }
@@ -11,7 +11,8 @@ use Symfony\Contracts\Cache\ItemInterface;
class PickupDataProvider class PickupDataProvider
{ {
public function __construct(private readonly ApiClient $apiClient, private readonly CacheInterface $cache) public function __construct(private readonly ApiClient $apiClient, private readonly CacheInterface $cache)
{} {
}
public function getAll(): array public function getAll(): array
{ {
@@ -36,4 +37,4 @@ class PickupDataProvider
{ {
return $this->getAll()[$busProId] ?? null; return $this->getAll()[$busProId] ?? null;
} }
} }
+1 -1
View File
@@ -56,4 +56,4 @@ class Address
return $this; return $this;
} }
} }
+3 -2
View File
@@ -5,10 +5,11 @@ namespace App\BusProNet\Model;
class BaseDataResponse class BaseDataResponse
{ {
public function __construct(private readonly array $items) public function __construct(private readonly array $items)
{} {
}
public function getItems(): array public function getItems(): array
{ {
return $this->items; return $this->items;
} }
} }
+1 -3
View File
@@ -2,8 +2,6 @@
namespace App\BusProNet\Model; namespace App\BusProNet\Model;
use Symfony\Component\Serializer\Annotation\SerializedName;
class Communication class Communication
{ {
private ?string $phone = null; private ?string $phone = null;
@@ -45,4 +43,4 @@ class Communication
return $this; return $this;
} }
} }
+1 -1
View File
@@ -56,4 +56,4 @@ class Country
return $this; return $this;
} }
} }
+1 -1
View File
@@ -43,4 +43,4 @@ class CrmAttribute
return $this; return $this;
} }
} }
+1 -1
View File
@@ -30,4 +30,4 @@ class CrmAttributeGroup
return $this; return $this;
} }
} }
@@ -16,7 +16,8 @@ class CrmAttributesResponse
return $this->attributeGroups; return $this->attributeGroups;
} }
public function setAttributeGroups(?array $attributeGroups): static{ public function setAttributeGroups(?array $attributeGroups): static
{
$this->attributeGroups = $attributeGroups; $this->attributeGroups = $attributeGroups;
return $this; return $this;
@@ -102,4 +103,4 @@ class CrmAttributesResponse
return $crmSelections; return $crmSelections;
} }
} }
+3 -3
View File
@@ -7,7 +7,7 @@ class NotificationResponse
private ?int $code; private ?int $code;
private ?string $message; 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->code = $code;
$this->message = $message; $this->message = $message;
@@ -33,9 +33,9 @@ class NotificationResponse
// These weird and contradictory looking assertions are required because // These weird and contradictory looking assertions are required because
// of the stupid API implementation that doesn't distinguish between error // of the stupid API implementation that doesn't distinguish between error
// and success responses. // 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'); $responseIsSuccess = 650 === $this->getCode() && false === stripos($this->getMessage(), 'fehler');
return false === $responseIsError && true === $responseIsSuccess; return false === $responseIsError && true === $responseIsSuccess;
} }
} }
+1 -1
View File
@@ -96,4 +96,4 @@ class Pickup
return $this; return $this;
} }
} }
+1 -1
View File
@@ -134,4 +134,4 @@ class ProfileResponse
return $this; return $this;
} }
} }
+1 -1
View File
@@ -86,7 +86,7 @@ class ResponseParser
$title = (string) $addressXml->titel; $title = (string) $addressXml->titel;
$gender = (string) $addressXml->geschlecht; $gender = (string) $addressXml->geschlecht;
$gender = strtoupper($gender) === 'W' ? 'F' : strtoupper($gender); $gender = 'W' === strtoupper($gender) ? 'F' : strtoupper($gender);
$dateString = (string) $addressXml->geburtsdatum; $dateString = (string) $addressXml->geburtsdatum;
$dateOfBirth = empty($dateString) ? null : \DateTimeImmutable::createFromFormat('d.m.Y', $dateString); $dateOfBirth = empty($dateString) ? null : \DateTimeImmutable::createFromFormat('d.m.Y', $dateString);
+1 -1
View File
@@ -4,4 +4,4 @@ namespace App\BusProNet;
class ResponseParserException extends \Exception class ResponseParserException extends \Exception
{ {
} }
+4 -4
View File
@@ -15,7 +15,7 @@ class UserDataHandler
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -55,7 +55,7 @@ class UserDataHandler
array $roles, array $roles,
bool $isTeamer = false, bool $isTeamer = false,
array $crmSelections = [], array $crmSelections = [],
array $hotelCodes = [] array $hotelCodes = [],
): User { ): User {
$user = new User(); $user = new User();
$user $user
@@ -95,7 +95,7 @@ class UserDataHandler
array $roles, array $roles,
bool $isTeamer = false, bool $isTeamer = false,
array $crmSelections = [], array $crmSelections = [],
array $hotelCodes = [] array $hotelCodes = [],
): void { ): void {
$user $user
->setEmail($profileResponse->getCommunication()->getEmail()) ->setEmail($profileResponse->getCommunication()->getEmail())
@@ -126,4 +126,4 @@ class UserDataHandler
$this->entityManager->flush(); $this->entityManager->flush();
} }
} }
+3 -3
View File
@@ -40,7 +40,7 @@ class BpnImportCommand extends Command
$xmlFiles = $this $xmlFiles = $this
->xmlExport ->xmlExport
->listContents('.') ->listContents('.')
->filter(fn(StorageAttributes $attributes) => $attributes->isFile() && str_starts_with($attributes->path(), 'Ziel_')) ->filter(fn (StorageAttributes $attributes) => $attributes->isFile() && str_starts_with($attributes->path(), 'Ziel_'))
->toArray(); ->toArray();
} catch (FilesystemException $e) { } catch (FilesystemException $e) {
$io->error('Unable to list XML files'); $io->error('Unable to list XML files');
@@ -117,7 +117,7 @@ class BpnImportCommand extends Command
'pickups' => json_encode($datePickups), 'pickups' => json_encode($datePickups),
'cost_unit' => $hotel->getCostUnit(), 'cost_unit' => $hotel->getCostUnit(),
'country' => $hotel->getCountry(), '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, 'id' => $id,
'hotel_bus_pro_id' => $hotelBusProId, 'hotel_bus_pro_id' => $hotelBusProId,
@@ -139,7 +139,7 @@ class BpnImportCommand extends Command
'pickups' => json_encode($datePickups), 'pickups' => json_encode($datePickups),
'cost_unit' => $hotel->getCostUnit(), 'cost_unit' => $hotel->getCostUnit(),
'country' => $hotel->getCountry(), '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; ++$addedCount;
+1 -1
View File
@@ -63,4 +63,4 @@ class GenerateThumbnailsCommand extends Command
return Command::SUCCESS; return Command::SUCCESS;
} }
} }
@@ -17,7 +17,7 @@ class DeleteController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $eventDispatcher private readonly EventDispatcherInterface $eventDispatcher,
) { ) {
} }
@@ -19,7 +19,7 @@ class DisposeController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $eventDispatcher private readonly EventDispatcherInterface $eventDispatcher,
) { ) {
} }
@@ -56,4 +56,4 @@ class DisposeController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -29,7 +29,6 @@ class IndexController extends AbstractController
$query = $this $query = $this
->applicationRepository ->applicationRepository
->getPendingQuery($filterDto); ->getPendingQuery($filterDto);
;
$pagination = $this->paginator->paginate( $pagination = $this->paginator->paginate(
$query, $query,
@@ -46,4 +45,4 @@ class IndexController extends AbstractController
'filterDto' => $filterDto, 'filterDto' => $filterDto,
]); ]);
} }
} }
@@ -19,7 +19,7 @@ class StatusController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $eventDispatcher private readonly EventDispatcherInterface $eventDispatcher,
) { ) {
} }
@@ -64,4 +64,4 @@ class StatusController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -12,7 +12,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class DestinationController extends AbstractController class DestinationController extends AbstractController
{ {
public function __construct(private readonly DestinationRepository $bpnDateRepository) public function __construct(private readonly DestinationRepository $bpnDateRepository)
{} {
}
#[Route('/admin/autocomplete/destination', name: 'app_admin_autocomplete_destination')] #[Route('/admin/autocomplete/destination', name: 'app_admin_autocomplete_destination')]
#[IsGranted('ROLE_ADMINISTRATIVE')] #[IsGranted('ROLE_ADMINISTRATIVE')]
@@ -29,4 +30,4 @@ class DestinationController extends AbstractController
return $this->json($dates); return $this->json($dates);
} }
} }
@@ -12,7 +12,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class DocumentController extends AbstractController class DocumentController extends AbstractController
{ {
public function __construct(private readonly UploadRepository $uploadRepository) public function __construct(private readonly UploadRepository $uploadRepository)
{} {
}
#[Route('/admin/autocomplete/document', name: 'app_admin_autocomplete_document')] #[Route('/admin/autocomplete/document', name: 'app_admin_autocomplete_document')]
#[IsGranted('ROLE_ADMINISTRATIVE')] #[IsGranted('ROLE_ADMINISTRATIVE')]
@@ -29,4 +30,4 @@ class DocumentController extends AbstractController
return $this->json($dates); return $this->json($dates);
} }
} }
@@ -13,7 +13,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class HotelController extends AbstractController class HotelController extends AbstractController
{ {
public function __construct(private readonly HotelDataProvider $hotelDataProvider) public function __construct(private readonly HotelDataProvider $hotelDataProvider)
{} {
}
#[Route('/admin/autocomplete/hotel', name: 'app_admin_autocomplete_hotel')] #[Route('/admin/autocomplete/hotel', name: 'app_admin_autocomplete_hotel')]
#[IsGranted('ROLE_ADMINISTRATIVE')] #[IsGranted('ROLE_ADMINISTRATIVE')]
@@ -47,4 +48,4 @@ class HotelController extends AbstractController
return $this->json($data); return $this->json($data);
} }
} }
@@ -12,7 +12,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class TeamerController extends AbstractController class TeamerController extends AbstractController
{ {
public function __construct(private readonly TeamerRepository $teamerRepository) public function __construct(private readonly TeamerRepository $teamerRepository)
{} {
}
#[Route('/admin/autocomplete/teamer', name: 'app_admin_autocomplete_teamer')] #[Route('/admin/autocomplete/teamer', name: 'app_admin_autocomplete_teamer')]
#[IsGranted('ROLE_ADMINISTRATIVE')] #[IsGranted('ROLE_ADMINISTRATIVE')]
@@ -29,4 +30,4 @@ class TeamerController extends AbstractController
return $this->json($dates); return $this->json($dates);
} }
} }
@@ -12,7 +12,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class UserController extends AbstractController class UserController extends AbstractController
{ {
public function __construct(private readonly UserRepository $userRepository) public function __construct(private readonly UserRepository $userRepository)
{} {
}
#[Route('/admin/autocomplete/user', name: 'app_admin_autocomplete_user')] #[Route('/admin/autocomplete/user', name: 'app_admin_autocomplete_user')]
#[IsGranted('ROLE_ADMIN')] #[IsGranted('ROLE_ADMIN')]
@@ -31,4 +32,4 @@ class UserController extends AbstractController
return $this->json($users); return $this->json($users);
} }
} }
@@ -18,7 +18,7 @@ class DeleteController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $eventDispatcher private readonly EventDispatcherInterface $eventDispatcher,
) { ) {
} }
@@ -60,4 +60,4 @@ class DeleteController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -17,7 +17,7 @@ class ApproveController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -45,4 +45,4 @@ class ApproveController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -19,7 +19,7 @@ class ProvideController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $eventDispatcher private readonly EventDispatcherInterface $eventDispatcher,
) { ) {
} }
@@ -65,7 +65,7 @@ class ProvideController extends AbstractController
$form->handleRequest($request); $form->handleRequest($request);
return $this->renderBlock('admin/feedback/provide.html.twig', 'feedback_form', [ return $this->renderBlock('admin/feedback/provide.html.twig', 'feedback_form', [
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
@@ -77,4 +77,4 @@ class ProvideController extends AbstractController
return $this->createForm(AdminFeedbackType::class, $feedback); return $this->createForm(AdminFeedbackType::class, $feedback);
} }
} }
+1 -1
View File
@@ -69,4 +69,4 @@ class IndexController extends AbstractController
'overdueFeedbacks' => $overdueFeedbacks, 'overdueFeedbacks' => $overdueFeedbacks,
]); ]);
} }
} }
+2 -2
View File
@@ -15,7 +15,7 @@ class IndexController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly LogRepository $logRepository, private readonly LogRepository $logRepository,
private readonly PaginatorInterface $paginator private readonly PaginatorInterface $paginator,
) { ) {
} }
@@ -55,4 +55,4 @@ class IndexController extends AbstractController
'entries' => $entries, 'entries' => $entries,
]); ]);
} }
} }
@@ -17,7 +17,7 @@ class CreateController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -46,4 +46,4 @@ class CreateController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -41,4 +41,4 @@ class DeleteController extends AbstractController
'availability' => $availability, 'availability' => $availability,
]); ]);
} }
} }
@@ -17,7 +17,7 @@ class DuplicateController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -49,4 +49,4 @@ class DuplicateController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -17,7 +17,7 @@ class EditController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -44,4 +44,4 @@ class EditController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -14,7 +14,7 @@ class IndexController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly AvailabilityRepository $availabilityRepository, private readonly AvailabilityRepository $availabilityRepository,
private readonly PaginatorInterface $paginator private readonly PaginatorInterface $paginator,
) { ) {
} }
@@ -41,4 +41,4 @@ class IndexController extends AbstractController
'pagination' => $pagination, 'pagination' => $pagination,
]); ]);
} }
} }
@@ -21,7 +21,7 @@ class CreateController extends AbstractController
public function __construct( public function __construct(
private readonly UploadHandler $uploadHandler, private readonly UploadHandler $uploadHandler,
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -65,4 +65,4 @@ class CreateController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -41,4 +41,4 @@ class DeleteController extends AbstractController
'contact' => $contact, 'contact' => $contact,
]); ]);
} }
} }
@@ -21,7 +21,7 @@ class EditController extends AbstractController
public function __construct( public function __construct(
private readonly UploadHandler $uploadHandler, private readonly UploadHandler $uploadHandler,
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -62,4 +62,4 @@ class EditController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -11,7 +11,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class IndexController extends AbstractController class IndexController extends AbstractController
{ {
public function __construct(private readonly ContactRepository $contactRepository) public function __construct(private readonly ContactRepository $contactRepository)
{} {
}
#[Route('/admin/system/contact', name: 'app_admin_system_contact_index')] #[Route('/admin/system/contact', name: 'app_admin_system_contact_index')]
#[IsGranted('ROLE_ADMINISTRATIVE')] #[IsGranted('ROLE_ADMINISTRATIVE')]
@@ -26,4 +27,4 @@ class IndexController extends AbstractController
'contacts' => $contacts, 'contacts' => $contacts,
]); ]);
} }
} }
@@ -17,7 +17,7 @@ class CreateController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -46,4 +46,4 @@ class CreateController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -41,4 +41,4 @@ class DeleteController extends AbstractController
'fee' => $fee, 'fee' => $fee,
]); ]);
} }
} }
@@ -17,7 +17,7 @@ class DuplicateController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -48,4 +48,4 @@ class DuplicateController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -17,7 +17,7 @@ class EditController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -44,4 +44,4 @@ class EditController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -11,7 +11,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class IndexController extends AbstractController class IndexController extends AbstractController
{ {
public function __construct(private readonly FeeRepository $feeRepository) public function __construct(private readonly FeeRepository $feeRepository)
{} {
}
#[Route('/admin/system/fee', name: 'app_admin_system_fee_index')] #[Route('/admin/system/fee', name: 'app_admin_system_fee_index')]
#[IsGranted('ROLE_ADMIN')] #[IsGranted('ROLE_ADMIN')]
@@ -23,4 +24,4 @@ class IndexController extends AbstractController
'fees' => $fees, 'fees' => $fees,
]); ]);
} }
} }
@@ -16,7 +16,7 @@ class CreateController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, 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', [ 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( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -42,4 +42,4 @@ class DeleteController extends AbstractController
'feedbackSet' => $feedbackSet, 'feedbackSet' => $feedbackSet,
]); ]);
} }
} }
@@ -16,7 +16,7 @@ class EditController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, 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', [ 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 class IndexController extends AbstractController
{ {
public function __construct(private readonly FeedbackSetRepository $feedbackSetRepository) public function __construct(private readonly FeedbackSetRepository $feedbackSetRepository)
{} {
}
#[Route('/admin/system/feedback-set', name: 'app_admin_system_feedback_set_index')] #[Route('/admin/system/feedback-set', name: 'app_admin_system_feedback_set_index')]
#[IsGranted('ROLE_ADMIN')] #[IsGranted('ROLE_ADMIN')]
@@ -26,4 +27,4 @@ class IndexController extends AbstractController
'feedbackSets' => $feedbackSets, 'feedbackSets' => $feedbackSets,
]); ]);
} }
} }
@@ -16,7 +16,7 @@ class CreateController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, 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', [ 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( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -41,4 +41,4 @@ class DeleteController extends AbstractController
'jobProfile' => $jobProfile, 'jobProfile' => $jobProfile,
]); ]);
} }
} }
@@ -16,7 +16,7 @@ class EditController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, 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', [ 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 class IndexController extends AbstractController
{ {
public function __construct(private readonly JobProfileRepository $jobProfileRepository) public function __construct(private readonly JobProfileRepository $jobProfileRepository)
{} {
}
#[Route('/admin/system/job-profile', name: 'app_admin_system_job_profile_index')] #[Route('/admin/system/job-profile', name: 'app_admin_system_job_profile_index')]
#[IsGranted('ROLE_ADMIN')] #[IsGranted('ROLE_ADMIN')]
@@ -26,4 +27,4 @@ class IndexController extends AbstractController
'jobProfiles' => $jobProfiles, 'jobProfiles' => $jobProfiles,
]); ]);
} }
} }
@@ -17,7 +17,7 @@ class CreateController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -46,4 +46,4 @@ class CreateController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -41,4 +41,4 @@ class DeleteController extends AbstractController
'training' => $training, 'training' => $training,
]); ]);
} }
} }
@@ -17,7 +17,7 @@ class EditController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -44,4 +44,4 @@ class EditController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -11,7 +11,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class IndexController extends AbstractController class IndexController extends AbstractController
{ {
public function __construct(private readonly TrainingRepository $trainingRepository) public function __construct(private readonly TrainingRepository $trainingRepository)
{} {
}
#[Route('/admin/system/training', name: 'app_admin_system_training_index')] #[Route('/admin/system/training', name: 'app_admin_system_training_index')]
#[IsGranted('ROLE_ADMIN')] #[IsGranted('ROLE_ADMIN')]
@@ -26,4 +27,4 @@ class IndexController extends AbstractController
'trainings' => $trainings, 'trainings' => $trainings,
]); ]);
} }
} }
@@ -11,7 +11,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class IndexController extends AbstractController class IndexController extends AbstractController
{ {
public function __construct(private readonly UserRepository $userRepository) public function __construct(private readonly UserRepository $userRepository)
{} {
}
#[Route('/admin/system/user', name: 'app_admin_system_user_index')] #[Route('/admin/system/user', name: 'app_admin_system_user_index')]
#[IsGranted('ROLE_ADMIN')] #[IsGranted('ROLE_ADMIN')]
@@ -21,7 +21,7 @@ class DeleteController extends AbstractController
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -32,7 +32,7 @@ class DeleteController extends AbstractController
Teamer $teamer, Teamer $teamer,
#[MapEntity(mapping: ['availability_id' => 'id'])] #[MapEntity(mapping: ['availability_id' => 'id'])]
Availability $availability, Availability $availability,
Request $request Request $request,
): Response { ): Response {
if (true === $request->isMethod('POST')) { if (true === $request->isMethod('POST')) {
if (null === $availability->getOwner()) { if (null === $availability->getOwner()) {
@@ -62,4 +62,4 @@ class DeleteController extends AbstractController
'availability' => $availability, 'availability' => $availability,
]); ]);
} }
} }
@@ -24,4 +24,4 @@ class IndexController extends AbstractController
'groupedAvailabilities' => $groupedAvailabilities, 'groupedAvailabilities' => $groupedAvailabilities,
]); ]);
} }
} }
@@ -18,4 +18,4 @@ class CrmSelectionsController extends AbstractController
'teamer' => $teamer, 'teamer' => $teamer,
]); ]);
} }
} }
@@ -17,7 +17,8 @@ class RemarksController extends AbstractController
use ReturnUrlTrait; use ReturnUrlTrait;
public function __construct(private readonly EntityManagerInterface $entityManager) public function __construct(private readonly EntityManagerInterface $entityManager)
{} {
}
#[Route('/admin/teamer/remarks/{uuid}', name: 'app_admin_teamer_remarks_internal')] #[Route('/admin/teamer/remarks/{uuid}', name: 'app_admin_teamer_remarks_internal')]
#[IsGranted('ROLE_ADMIN')] #[IsGranted('ROLE_ADMIN')]
@@ -32,7 +33,7 @@ class RemarksController extends AbstractController
'action' => $this->generateUrl('app_admin_teamer_remarks_internal', [ 'action' => $this->generateUrl('app_admin_teamer_remarks_internal', [
'uuid' => $teamer->getUuid(), 'uuid' => $teamer->getUuid(),
'r' => $returnUrl, 'r' => $returnUrl,
]) ]),
]) ])
->add('remarks', TextareaType::class, [ ->add('remarks', TextareaType::class, [
'label' => 'Anmerkungen', 'label' => 'Anmerkungen',
@@ -64,4 +65,4 @@ class RemarksController extends AbstractController
'returnUrl' => $returnUrl, 'returnUrl' => $returnUrl,
]); ]);
} }
} }
@@ -12,7 +12,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
class SkillsController extends AbstractController class SkillsController extends AbstractController
{ {
public function __construct(private readonly TrainingRepository $trainingRepository) public function __construct(private readonly TrainingRepository $trainingRepository)
{} {
}
#[Route('/admin/teamer/skills/{uuid}', name: 'app_admin_teamer_skills')] #[Route('/admin/teamer/skills/{uuid}', name: 'app_admin_teamer_skills')]
#[IsGranted('ROLE_ADMIN')] #[IsGranted('ROLE_ADMIN')]
@@ -25,4 +26,4 @@ class SkillsController extends AbstractController
'trainings' => $trainings, 'trainings' => $trainings,
]); ]);
} }
} }
@@ -26,7 +26,7 @@ class CreateController extends AbstractController
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $eventDispatcher, private readonly EventDispatcherInterface $eventDispatcher,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -40,7 +40,7 @@ class CreateController extends AbstractController
Training $training, Training $training,
#[MapEntity(mapping: ['teamer_id' => 'id'])] #[MapEntity(mapping: ['teamer_id' => 'id'])]
Teamer $teamer, Teamer $teamer,
Request $request Request $request,
): Response { ): Response {
$attendance = new TrainingAttendance(); $attendance = new TrainingAttendance();
$attendance $attendance
@@ -61,7 +61,7 @@ class CreateController extends AbstractController
'training_id' => $training->getId(), 'training_id' => $training->getId(),
'teamer_id' => $teamer->getId(), 'teamer_id' => $teamer->getId(),
'r' => $returnUrl, 'r' => $returnUrl,
]) ]),
]) ])
->add('date', AbbreviatedDateType::class, [ ->add('date', AbbreviatedDateType::class, [
'label' => 'Datum', 'label' => 'Datum',
@@ -96,4 +96,4 @@ class CreateController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -22,7 +22,7 @@ class DeleteController extends AbstractController
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $eventDispatcher, private readonly EventDispatcherInterface $eventDispatcher,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -64,4 +64,4 @@ class DeleteController extends AbstractController
'attendance' => $attendance, 'attendance' => $attendance,
]); ]);
} }
} }
@@ -20,7 +20,7 @@ class CreateController extends AbstractController
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -63,4 +63,4 @@ class CreateController extends AbstractController
'returnUrl' => $returnUrl, 'returnUrl' => $returnUrl,
]); ]);
} }
} }
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -45,4 +45,4 @@ class DeleteController extends AbstractController
'assignment' => $assignment, 'assignment' => $assignment,
]); ]);
} }
} }
@@ -18,7 +18,7 @@ class DetailController extends AbstractController
public function __construct( public function __construct(
private readonly ApplicationRepository $applicationRepository, private readonly ApplicationRepository $applicationRepository,
private readonly DispositionRepository $dispositionRepository private readonly DispositionRepository $dispositionRepository,
) { ) {
} }
@@ -43,4 +43,4 @@ class DetailController extends AbstractController
'returnUrl' => $this->getReturnUrl($request, 'app_administrative_assignment_index'), 'returnUrl' => $this->getReturnUrl($request, 'app_administrative_assignment_index'),
]); ]);
} }
} }
@@ -19,7 +19,7 @@ class DuplicateController extends AbstractController
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -64,4 +64,4 @@ class DuplicateController extends AbstractController
'returnUrl' => $returnUrl, 'returnUrl' => $returnUrl,
]); ]);
} }
} }
@@ -19,7 +19,7 @@ class EditController extends AbstractController
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -58,4 +58,4 @@ class EditController extends AbstractController
'returnUrl' => $returnUrl, 'returnUrl' => $returnUrl,
]); ]);
} }
} }
@@ -16,7 +16,7 @@ class IndexController extends AbstractController
public function __construct( public function __construct(
private readonly AssignmentRepository $assignmentRepository, private readonly AssignmentRepository $assignmentRepository,
private readonly PaginatorInterface $paginator, private readonly PaginatorInterface $paginator,
private readonly AssignmentFilterHandler $filterHandler private readonly AssignmentFilterHandler $filterHandler,
) { ) {
} }
@@ -46,4 +46,4 @@ class IndexController extends AbstractController
'filterDto' => $filterDto, 'filterDto' => $filterDto,
]); ]);
} }
} }
@@ -28,4 +28,4 @@ class PickupFormController extends AbstractController
] ]
); );
} }
} }
@@ -15,7 +15,7 @@ class TimelineController extends AbstractController
public function __construct( public function __construct(
private readonly AssignmentRepository $assignmentRepository, private readonly AssignmentRepository $assignmentRepository,
private readonly TimelineService $timelineService, private readonly TimelineService $timelineService,
private readonly TimelineFilterHandler $filterHandler private readonly TimelineFilterHandler $filterHandler,
) { ) {
} }
@@ -14,7 +14,7 @@ class IndexController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly AvailabilityRepository $availabilityRepository, private readonly AvailabilityRepository $availabilityRepository,
private readonly PaginatorInterface $paginator private readonly PaginatorInterface $paginator,
) { ) {
} }
@@ -41,4 +41,4 @@ class IndexController extends AbstractController
'pagination' => $pagination, 'pagination' => $pagination,
]); ]);
} }
} }
@@ -85,7 +85,7 @@ class DocumentUploadController extends AbstractController
->setApprovedBy($user->getInitials()) ->setApprovedBy($user->getInitials())
; ;
$disposition $disposition
->addDocument($upload) ->addDocument($upload)
->setStatus(Disposition::STATUS_CONFIRMED) ->setStatus(Disposition::STATUS_CONFIRMED)
; ;
@@ -17,7 +17,7 @@ class SpecialAgreementsController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, 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 $document
->setStatus(Upload::STATUS_REJECTED) ->setStatus(Upload::STATUS_REJECTED)
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -42,4 +42,4 @@ class DeleteController extends AbstractController
'document' => $document, 'document' => $document,
]); ]);
} }
} }
@@ -17,7 +17,7 @@ class IndexController extends AbstractController
public function __construct( public function __construct(
private readonly UploadRepository $uploadRepository, private readonly UploadRepository $uploadRepository,
private readonly PaginatorInterface $paginator, 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 class DetailController extends AbstractController
{ {
#[Route('/administrative/feedback/detail/{uuid}', name: 'app_administrative_feedback_detail')] #[Route('/administrative/feedback/detail/{uuid}', name: 'app_administrative_feedback_detail')]
#[IsGranted('ROLE_ADMINISTRATIVE')] #[IsGranted('ROLE_ADMINISTRATIVE')]
public function index(Feedback $feedback): Response public function index(Feedback $feedback): Response
@@ -19,4 +18,4 @@ class DetailController extends AbstractController
'feedback' => $feedback, 'feedback' => $feedback,
]); ]);
} }
} }
@@ -16,7 +16,7 @@ class IndexController extends AbstractController
public function __construct( public function __construct(
private readonly FeedbackFilterHandler $filterHandler, private readonly FeedbackFilterHandler $filterHandler,
private readonly FeedbackRepository $feedbackRepository, private readonly FeedbackRepository $feedbackRepository,
private readonly PaginatorInterface $paginator private readonly PaginatorInterface $paginator,
) { ) {
} }
@@ -46,4 +46,4 @@ class IndexController extends AbstractController
'filterDto' => $filterDto, 'filterDto' => $filterDto,
]); ]);
} }
} }
@@ -22,7 +22,7 @@ class ProvideController extends AbstractController
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $eventDispatcher private readonly EventDispatcherInterface $eventDispatcher,
) { ) {
} }
@@ -83,4 +83,4 @@ class ProvideController extends AbstractController
'disposition' => $disposition, 'disposition' => $disposition,
]); ]);
} }
} }
@@ -16,7 +16,7 @@ class ProfileController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -44,4 +44,4 @@ class ProfileController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -23,7 +23,7 @@ class CreateController extends AbstractController
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly HotelDataProvider $hotelDataProvider, private readonly HotelDataProvider $hotelDataProvider,
private readonly PickupDataProvider $pickupDataProvider, private readonly PickupDataProvider $pickupDataProvider,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -57,4 +57,4 @@ class CreateController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -42,4 +42,4 @@ class DeleteController extends AbstractController
'destination' => $destination, 'destination' => $destination,
]); ]);
} }
} }
@@ -19,7 +19,7 @@ class DuplicateController extends AbstractController
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly HotelDataProvider $hotelDataProvider, private readonly HotelDataProvider $hotelDataProvider,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -65,4 +65,4 @@ class DuplicateController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -22,7 +22,7 @@ class EditController extends AbstractController
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly HotelDataProvider $hotelDataProvider, private readonly HotelDataProvider $hotelDataProvider,
private readonly PickupDataProvider $pickupDataProvider, private readonly PickupDataProvider $pickupDataProvider,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -52,4 +52,4 @@ class EditController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -16,7 +16,7 @@ class IndexController extends AbstractController
public function __construct( public function __construct(
private readonly DestinationRepository $destinationRepository, private readonly DestinationRepository $destinationRepository,
private readonly PaginatorInterface $paginator, private readonly PaginatorInterface $paginator,
private readonly DestinationFilterHandler $filterHandler private readonly DestinationFilterHandler $filterHandler,
) { ) {
} }
@@ -46,4 +46,4 @@ class IndexController extends AbstractController
'filterDto' => $filterDto, 'filterDto' => $filterDto,
]); ]);
} }
} }
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -42,4 +42,4 @@ class DeleteController extends AbstractController
'document' => $document, 'document' => $document,
]); ]);
} }
} }
@@ -17,7 +17,7 @@ class EditController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -57,4 +57,4 @@ class EditController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -14,7 +14,7 @@ class IndexController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly UploadRepository $uploadRepository, private readonly UploadRepository $uploadRepository,
private readonly PaginatorInterface $paginator private readonly PaginatorInterface $paginator,
) { ) {
} }
@@ -38,4 +38,4 @@ class IndexController extends AbstractController
'pagination' => $pagination, 'pagination' => $pagination,
]); ]);
} }
} }
@@ -19,7 +19,7 @@ class ReplaceController extends AbstractController
public function __construct( public function __construct(
private readonly UploadHandler $uploadHandler, private readonly UploadHandler $uploadHandler,
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -61,4 +61,4 @@ class ReplaceController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -19,7 +19,7 @@ class UploadController extends AbstractController
public function __construct( public function __construct(
private readonly UploadHandler $uploadHandler, private readonly UploadHandler $uploadHandler,
private readonly EntityManagerInterface $entityManager, 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()) { if ($form->isSubmitted() && $form->isValid()) {
$count = count($uploadedDocuments); $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 = []; $loggerContext = [];
foreach ($uploadedDocuments as $document) { foreach ($uploadedDocuments as $document) {
$loggerContext[] = [ $loggerContext[] = [
@@ -68,4 +68,4 @@ class UploadController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -16,7 +16,7 @@ class CreateController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -45,4 +45,4 @@ class CreateController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -41,4 +41,4 @@ class DeleteController extends AbstractController
'faq' => $faq, 'faq' => $faq,
]); ]);
} }
} }
@@ -16,7 +16,7 @@ class EditController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger private readonly LoggerInterface $logger,
) { ) {
} }
@@ -43,4 +43,4 @@ class EditController extends AbstractController
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
} }

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