From 1f27c744d2c971e280c1a2df7a50da96f43ef409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Thu, 5 Feb 2026 17:45:54 +0100 Subject: [PATCH] chore: code cleanup --- src/BusProNet/Utility/DayTimeUtility.php | 4 ++-- src/Command/DraftBackfillBookingNumberCommand.php | 2 +- src/Command/DraftCleanupCommand.php | 2 +- .../Service/ParticipantFieldOptionsProvider.php | 15 +++++++-------- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/BusProNet/Utility/DayTimeUtility.php b/src/BusProNet/Utility/DayTimeUtility.php index bb16df1..3ea24f7 100644 --- a/src/BusProNet/Utility/DayTimeUtility.php +++ b/src/BusProNet/Utility/DayTimeUtility.php @@ -18,8 +18,8 @@ class DayTimeUtility return 'abends'; } elseif ($time >= '20:00' && $time <= '23:59') { return 'nachts'; - } else { - return null; } + + return null; } } diff --git a/src/Command/DraftBackfillBookingNumberCommand.php b/src/Command/DraftBackfillBookingNumberCommand.php index 69292f6..2f75bc0 100644 --- a/src/Command/DraftBackfillBookingNumberCommand.php +++ b/src/Command/DraftBackfillBookingNumberCommand.php @@ -36,7 +36,7 @@ class DraftBackfillBookingNumberCommand extends Command } /** - * @see \Symfony\Component\Console\Command\Command::execute() + * @see Command::execute() */ protected function execute(InputInterface $input, OutputInterface $output): int { diff --git a/src/Command/DraftCleanupCommand.php b/src/Command/DraftCleanupCommand.php index 71ab80a..981eafe 100644 --- a/src/Command/DraftCleanupCommand.php +++ b/src/Command/DraftCleanupCommand.php @@ -33,7 +33,7 @@ class DraftCleanupCommand extends Command } /** - * @see \Symfony\Component\Console\Command\Command::execute() + * @see Command::execute() */ protected function execute(InputInterface $input, OutputInterface $output): int { diff --git a/src/Form/Service/ParticipantFieldOptionsProvider.php b/src/Form/Service/ParticipantFieldOptionsProvider.php index 4831214..2f74651 100644 --- a/src/Form/Service/ParticipantFieldOptionsProvider.php +++ b/src/Form/Service/ParticipantFieldOptionsProvider.php @@ -1252,15 +1252,14 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider } return [...$otherServices, $regularPkw]; - } else { - // Discounted has availability, show only discounted (hide regular) - // But preserve regular if participant already has it selected - if ($preserveRegular) { - return [...$otherServices, $discountedPkw, $regularPkw]; - } - - return [...$otherServices, $discountedPkw]; } + // Discounted has availability, show only discounted (hide regular) + // But preserve regular if participant already has it selected + if ($preserveRegular) { + return [...$otherServices, $discountedPkw, $regularPkw]; + } + + return [...$otherServices, $discountedPkw]; } // Fallback: return all services if we don't have the expected discount/regular pair