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);
}
+1 -1
View File
@@ -4,4 +4,4 @@ namespace App\BusProNet;
class ApiClientException extends \Exception
{
}
}
+2 -2
View File
@@ -54,7 +54,7 @@ trait ApiClientTrait
private function send($socket, string $data): void
{
// message length is prepended to actual message
$send = sprintf('%010s', strlen($data)) . $data;
$send = sprintf('%010s', strlen($data)).$data;
fwrite($socket, $send);
}
@@ -73,4 +73,4 @@ trait ApiClientTrait
{
@fclose($socket);
}
}
}
@@ -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
{
@@ -40,4 +41,4 @@ class CountryDataProvider
return $this->getAll()[$token] ?? null;
}
}
}
@@ -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
{
@@ -50,4 +51,4 @@ class HotelDataProvider
return $hotels;
}
}
}
@@ -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
{
@@ -36,4 +37,4 @@ class PickupDataProvider
{
return $this->getAll()[$busProId] ?? null;
}
}
}
+1 -1
View File
@@ -56,4 +56,4 @@ class Address
return $this;
}
}
}
+3 -2
View File
@@ -5,10 +5,11 @@ namespace App\BusProNet\Model;
class BaseDataResponse
{
public function __construct(private readonly array $items)
{}
{
}
public function getItems(): array
{
return $this->items;
}
}
}
+1 -3
View File
@@ -2,8 +2,6 @@
namespace App\BusProNet\Model;
use Symfony\Component\Serializer\Annotation\SerializedName;
class Communication
{
private ?string $phone = null;
@@ -45,4 +43,4 @@ class Communication
return $this;
}
}
}
+1 -1
View File
@@ -56,4 +56,4 @@ class Country
return $this;
}
}
}
+1 -1
View File
@@ -43,4 +43,4 @@ class CrmAttribute
return $this;
}
}
}
+1 -1
View File
@@ -30,4 +30,4 @@ class CrmAttributeGroup
return $this;
}
}
}
@@ -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;
@@ -102,4 +103,4 @@ class CrmAttributesResponse
return $crmSelections;
}
}
}
+3 -3
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,9 +33,9 @@ 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
@@ -96,4 +96,4 @@ class Pickup
return $this;
}
}
}
+1 -1
View File
@@ -134,4 +134,4 @@ class ProfileResponse
return $this;
}
}
}
+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);
+1 -1
View File
@@ -4,4 +4,4 @@ namespace App\BusProNet;
class ResponseParserException extends \Exception
{
}
}
+4 -4
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())
@@ -126,4 +126,4 @@ class UserDataHandler
$this->entityManager->flush();
}
}
}
+3 -3
View File
@@ -40,7 +40,7 @@ class BpnImportCommand extends Command
$xmlFiles = $this
->xmlExport
->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();
} catch (FilesystemException $e) {
$io->error('Unable to list XML files');
@@ -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;
+1 -1
View File
@@ -63,4 +63,4 @@ class GenerateThumbnailsCommand extends Command
return Command::SUCCESS;
}
}
}
@@ -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,
) {
}
@@ -56,4 +56,4 @@ class DisposeController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -29,7 +29,6 @@ class IndexController extends AbstractController
$query = $this
->applicationRepository
->getPendingQuery($filterDto);
;
$pagination = $this->paginator->paginate(
$query,
@@ -46,4 +45,4 @@ class IndexController extends AbstractController
'filterDto' => $filterDto,
]);
}
}
}
@@ -19,7 +19,7 @@ class StatusController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $eventDispatcher
private readonly EventDispatcherInterface $eventDispatcher,
) {
}
@@ -64,4 +64,4 @@ class StatusController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -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')]
@@ -29,4 +30,4 @@ class DestinationController extends AbstractController
return $this->json($dates);
}
}
}
@@ -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')]
@@ -29,4 +30,4 @@ class DocumentController extends AbstractController
return $this->json($dates);
}
}
}
@@ -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')]
@@ -47,4 +48,4 @@ class HotelController extends AbstractController
return $this->json($data);
}
}
}
@@ -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')]
@@ -29,4 +30,4 @@ class TeamerController extends AbstractController
return $this->json($dates);
}
}
}
@@ -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')]
@@ -31,4 +32,4 @@ class UserController extends AbstractController
return $this->json($users);
}
}
}
@@ -18,7 +18,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $eventDispatcher
private readonly EventDispatcherInterface $eventDispatcher,
) {
}
@@ -60,4 +60,4 @@ class DeleteController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -17,7 +17,7 @@ class ApproveController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -45,4 +45,4 @@ class ApproveController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -19,7 +19,7 @@ class ProvideController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $eventDispatcher
private readonly EventDispatcherInterface $eventDispatcher,
) {
}
@@ -65,7 +65,7 @@ class ProvideController extends AbstractController
$form->handleRequest($request);
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);
}
}
}
+1 -1
View File
@@ -69,4 +69,4 @@ class IndexController extends AbstractController
'overdueFeedbacks' => $overdueFeedbacks,
]);
}
}
}
+2 -2
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,
) {
}
@@ -55,4 +55,4 @@ class IndexController extends AbstractController
'entries' => $entries,
]);
}
}
}
@@ -17,7 +17,7 @@ class CreateController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -46,4 +46,4 @@ class CreateController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -41,4 +41,4 @@ class DeleteController extends AbstractController
'availability' => $availability,
]);
}
}
}
@@ -17,7 +17,7 @@ class DuplicateController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -49,4 +49,4 @@ class DuplicateController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -17,7 +17,7 @@ class EditController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -44,4 +44,4 @@ class EditController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -14,7 +14,7 @@ class IndexController extends AbstractController
{
public function __construct(
private readonly AvailabilityRepository $availabilityRepository,
private readonly PaginatorInterface $paginator
private readonly PaginatorInterface $paginator,
) {
}
@@ -41,4 +41,4 @@ class IndexController extends AbstractController
'pagination' => $pagination,
]);
}
}
}
@@ -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,
) {
}
@@ -65,4 +65,4 @@ class CreateController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -41,4 +41,4 @@ class DeleteController extends AbstractController
'contact' => $contact,
]);
}
}
}
@@ -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,
) {
}
@@ -62,4 +62,4 @@ class EditController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -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')]
@@ -26,4 +27,4 @@ class IndexController extends AbstractController
'contacts' => $contacts,
]);
}
}
}
@@ -17,7 +17,7 @@ class CreateController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -46,4 +46,4 @@ class CreateController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -41,4 +41,4 @@ class DeleteController extends AbstractController
'fee' => $fee,
]);
}
}
}
@@ -17,7 +17,7 @@ class DuplicateController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -48,4 +48,4 @@ class DuplicateController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -17,7 +17,7 @@ class EditController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -44,4 +44,4 @@ class EditController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -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')]
@@ -23,4 +24,4 @@ class IndexController extends AbstractController
'fees' => $fees,
]);
}
}
}
@@ -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,
) {
}
@@ -42,4 +42,4 @@ class DeleteController extends AbstractController
'feedbackSet' => $feedbackSet,
]);
}
}
}
@@ -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')]
@@ -26,4 +27,4 @@ class IndexController extends AbstractController
'feedbackSets' => $feedbackSets,
]);
}
}
}
@@ -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,
) {
}
@@ -41,4 +41,4 @@ class DeleteController extends AbstractController
'jobProfile' => $jobProfile,
]);
}
}
}
@@ -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')]
@@ -26,4 +27,4 @@ class IndexController extends AbstractController
'jobProfiles' => $jobProfiles,
]);
}
}
}
@@ -17,7 +17,7 @@ class CreateController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -46,4 +46,4 @@ class CreateController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -41,4 +41,4 @@ class DeleteController extends AbstractController
'training' => $training,
]);
}
}
}
@@ -17,7 +17,7 @@ class EditController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -44,4 +44,4 @@ class EditController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -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')]
@@ -26,4 +27,4 @@ class IndexController extends AbstractController
'trainings' => $trainings,
]);
}
}
}
@@ -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()) {
@@ -62,4 +62,4 @@ class DeleteController extends AbstractController
'availability' => $availability,
]);
}
}
}
@@ -24,4 +24,4 @@ class IndexController extends AbstractController
'groupedAvailabilities' => $groupedAvailabilities,
]);
}
}
}
@@ -18,4 +18,4 @@ class CrmSelectionsController extends AbstractController
'teamer' => $teamer,
]);
}
}
}
@@ -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',
@@ -64,4 +65,4 @@ class RemarksController extends AbstractController
'returnUrl' => $returnUrl,
]);
}
}
}
@@ -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')]
@@ -25,4 +26,4 @@ class SkillsController extends AbstractController
'trainings' => $trainings,
]);
}
}
}
@@ -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',
@@ -96,4 +96,4 @@ class CreateController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -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,
) {
}
@@ -64,4 +64,4 @@ class DeleteController extends AbstractController
'attendance' => $attendance,
]);
}
}
}
@@ -20,7 +20,7 @@ class CreateController extends AbstractController
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -63,4 +63,4 @@ class CreateController extends AbstractController
'returnUrl' => $returnUrl,
]);
}
}
}
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -45,4 +45,4 @@ class DeleteController extends AbstractController
'assignment' => $assignment,
]);
}
}
}
@@ -18,7 +18,7 @@ class DetailController extends AbstractController
public function __construct(
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'),
]);
}
}
}
@@ -19,7 +19,7 @@ class DuplicateController extends AbstractController
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -64,4 +64,4 @@ class DuplicateController extends AbstractController
'returnUrl' => $returnUrl,
]);
}
}
}
@@ -19,7 +19,7 @@ class EditController extends AbstractController
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -58,4 +58,4 @@ class EditController extends AbstractController
'returnUrl' => $returnUrl,
]);
}
}
}
@@ -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,
) {
}
@@ -46,4 +46,4 @@ class IndexController extends AbstractController
'filterDto' => $filterDto,
]);
}
}
}
@@ -28,4 +28,4 @@ class PickupFormController extends AbstractController
]
);
}
}
}
@@ -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,
) {
}
@@ -41,4 +41,4 @@ class IndexController extends AbstractController
'pagination' => $pagination,
]);
}
}
}
@@ -85,7 +85,7 @@ class DocumentUploadController extends AbstractController
->setApprovedBy($user->getInitials())
;
$disposition
$disposition
->addDocument($upload)
->setStatus(Disposition::STATUS_CONFIRMED)
;
@@ -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,
) {
}
@@ -42,4 +42,4 @@ class DeleteController extends AbstractController
'document' => $document,
]);
}
}
}
@@ -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
@@ -19,4 +18,4 @@ class DetailController extends AbstractController
'feedback' => $feedback,
]);
}
}
}
@@ -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,
) {
}
@@ -46,4 +46,4 @@ class IndexController extends AbstractController
'filterDto' => $filterDto,
]);
}
}
}
@@ -22,7 +22,7 @@ class ProvideController extends AbstractController
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly EventDispatcherInterface $eventDispatcher
private readonly EventDispatcherInterface $eventDispatcher,
) {
}
@@ -83,4 +83,4 @@ class ProvideController extends AbstractController
'disposition' => $disposition,
]);
}
}
}
@@ -16,7 +16,7 @@ class ProfileController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -44,4 +44,4 @@ class ProfileController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -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,
) {
}
@@ -57,4 +57,4 @@ class CreateController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -42,4 +42,4 @@ class DeleteController extends AbstractController
'destination' => $destination,
]);
}
}
}
@@ -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,
) {
}
@@ -65,4 +65,4 @@ class DuplicateController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -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,
) {
}
@@ -52,4 +52,4 @@ class EditController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -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,
) {
}
@@ -46,4 +46,4 @@ class IndexController extends AbstractController
'filterDto' => $filterDto,
]);
}
}
}
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -42,4 +42,4 @@ class DeleteController extends AbstractController
'document' => $document,
]);
}
}
}
@@ -17,7 +17,7 @@ class EditController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -57,4 +57,4 @@ class EditController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -14,7 +14,7 @@ class IndexController extends AbstractController
{
public function __construct(
private readonly UploadRepository $uploadRepository,
private readonly PaginatorInterface $paginator
private readonly PaginatorInterface $paginator,
) {
}
@@ -38,4 +38,4 @@ class IndexController extends AbstractController
'pagination' => $pagination,
]);
}
}
}
@@ -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,
) {
}
@@ -61,4 +61,4 @@ class ReplaceController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -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[] = [
@@ -68,4 +68,4 @@ class UploadController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -16,7 +16,7 @@ class CreateController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -45,4 +45,4 @@ class CreateController extends AbstractController
'form' => $form->createView(),
]);
}
}
}
@@ -16,7 +16,7 @@ class DeleteController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -41,4 +41,4 @@ class DeleteController extends AbstractController
'faq' => $faq,
]);
}
}
}
@@ -16,7 +16,7 @@ class EditController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger
private readonly LoggerInterface $logger,
) {
}
@@ -43,4 +43,4 @@ class EditController extends AbstractController
'form' => $form->createView(),
]);
}
}
}

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