chore: cleanup

This commit is contained in:
Björn Fromme
2026-03-16 11:59:12 +01:00
parent 61447ced4f
commit 502b121e43
10 changed files with 5 additions and 333 deletions
-9
View File
@@ -33,8 +33,6 @@ class AcceptedVouchersDto
/**
* @return array<AcceptedVoucherDto>
*
* @deprecated No known usages outside tests
*/
public function getPromotionalVouchers(): array
{
@@ -43,8 +41,6 @@ class AcceptedVouchersDto
/**
* @return array<AcceptedVoucherDto>
*
* @deprecated No known usages outside tests
*/
public function getPurchaseVouchers(): array
{
@@ -53,8 +49,6 @@ class AcceptedVouchersDto
/**
* @return array<AcceptedVoucherDto>
*
* @deprecated No known usages outside tests
*/
public function getGoodwillVouchers(): array
{
@@ -71,9 +65,6 @@ class AcceptedVouchersDto
return count($this->vouchers) > 0;
}
/**
* @deprecated No known usages
*/
public function count(): int
{
return count($this->vouchers);
-30
View File
@@ -44,34 +44,4 @@ class BankAccountDto
return $instance;
}
/**
* Returns IBAN formatted with spaces for display (e.g., DE12 3456 7890 1234 5678 90).
*
* @deprecated No known usages
*/
public function getFormattedIban(): ?string
{
if (null === $this->iban) {
return null;
}
$cleanIban = $this->getIbanWithoutSpaces();
return chunk_split($cleanIban, 4, ' ');
}
/**
* Returns IBAN without spaces for storage and API submission.
*
* @deprecated Only used by getFormattedIban() which is also deprecated
*/
public function getIbanWithoutSpaces(): ?string
{
if (null === $this->iban) {
return null;
}
return (string) preg_replace('/\s+/', '', $this->iban);
}
}
-71
View File
@@ -155,14 +155,6 @@ class BookingDto
return $this->participants;
}
/**
* @deprecated Use getParticipant() and check for null instead
*/
public function hasParticipant(int $index): bool
{
return isset($this->participants[$index]);
}
public function getParticipant(int $index): ?ParticipantDto
{
return $this->participants[$index] ?? null;
@@ -199,48 +191,6 @@ class BookingDto
return ($adults >= 1 && $adults <= 2) && ($children >= 1);
}
/**
* @deprecated Use ParticipantDto::isCanceled() instead
*/
public function isCanceled(): bool
{
return null !== $this->booking && 'S' === $this->booking->status;
}
/**
* @deprecated Use ParticipantDto::isOption() instead
*/
public function isOption(): bool
{
return null !== $this->booking && 'O' === $this->booking->status;
}
/**
* Gets the label of the single selected room type.
*
* Returns the room label when exactly one room type is selected (auto-assignment scenario).
* Used by templates to display the room assignment when the dropdown is hidden.
*
* @return string|null The room label or null if not a single room type scenario
*
* @deprecated No known usages
*/
public function getSingleRoomLabel(): ?string
{
$selectedRooms = $this->getSelectedRooms();
// Only return label when exactly one room type selected
if (1 !== count($selectedRooms)) {
return null;
}
$roomSelection = reset($selectedRooms);
$availableRooms = $this->travel->getAvailableRooms();
$room = $availableRooms[$roomSelection->roomId] ?? null;
return $room?->label;
}
#[Assert\Callback]
public function validateBankAccount(ExecutionContextInterface $context): void
{
@@ -285,27 +235,6 @@ class BookingDto
return 'A' === $this->bookingStatus;
}
/**
* Checks if any participants have entered voucher codes.
*
* @return bool True if any promotional, purchase, or goodwill vouchers are present
*
* @deprecated Use AcceptedVouchersDto::hasVouchers() instead
*/
public function hasVouchers(): bool
{
foreach ($this->participants as $participant) {
if (null !== $participant->promoVoucherCode && '' !== trim($participant->promoVoucherCode)) {
return true;
}
if (null !== $participant->purchaseVoucherCode && '' !== trim($participant->purchaseVoucherCode)) {
return true;
}
}
return false;
}
/**
* Checks if any participants have entered goodwill vouchers.
*
+1 -13
View File
@@ -208,7 +208,7 @@ class ParticipantDto
}
/**
* @deprecated No known usages
* Checks if participant status is 'Option' (O).
*/
public function isOption(): bool
{
@@ -238,10 +238,6 @@ class ParticipantDto
/**
* Checks if the participant has selected an insurance.
*
* @return bool True if an insurance is selected
*
* @deprecated No known usages outside tests
*/
public function hasInsuranceSelected(): bool
{
@@ -250,10 +246,6 @@ class ParticipantDto
/**
* Gets the insurance label for display purposes.
*
* @return string|null The insurance label or null if no insurance selected
*
* @deprecated No known usages outside tests
*/
public function getInsuranceLabel(): ?string
{
@@ -262,10 +254,6 @@ class ParticipantDto
/**
* Gets the insurance price for pricing calculations.
*
* @return float The insurance price (0.0 if no insurance selected)
*
* @deprecated No known usages outside tests
*/
public function getInsurancePrice(): float
{