chore: simplify parameter handling
This commit is contained in:
@@ -18,7 +18,6 @@ use App\Service\ParticipantPrepopulationService;
|
||||
use App\Service\RoomAssignmentService;
|
||||
use App\Service\TravelDataService;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\DependencyInjection\Attribute\Autowire;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
@@ -36,10 +35,6 @@ class Step2Controller extends AbstractController
|
||||
use HxTrait;
|
||||
use ParticipantCardFlowTrait;
|
||||
|
||||
/**
|
||||
* @param array<string, string> $heightChoices
|
||||
* @param array<string, string> $weightChoices
|
||||
*/
|
||||
public function __construct(
|
||||
private readonly BookingService $bookingService,
|
||||
private readonly BookingSummaryDataService $summaryDataService,
|
||||
@@ -48,43 +43,9 @@ class Step2Controller extends AbstractController
|
||||
private readonly ParticipantCardDataService $participantCardService,
|
||||
private readonly ParticipantFieldOptionsProvider $fieldOptionsProvider,
|
||||
private readonly ParticipantPrepopulationService $prepopulationService,
|
||||
#[Autowire(param: 'body_dimensions.height_choices')]
|
||||
private readonly array $heightChoices,
|
||||
#[Autowire(param: 'body_dimensions.weight_choices')]
|
||||
private readonly array $weightChoices,
|
||||
#[Autowire(param: 'body_dimensions.shoe_size_min')]
|
||||
private readonly int $shoeSizeMin,
|
||||
#[Autowire(param: 'body_dimensions.shoe_size_max')]
|
||||
private readonly int $shoeSizeMax,
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
private function getHeightChoices(): array
|
||||
{
|
||||
return $this->heightChoices;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
private function getWeightChoices(): array
|
||||
{
|
||||
return $this->weightChoices;
|
||||
}
|
||||
|
||||
private function getShoeSizeMin(): int
|
||||
{
|
||||
return $this->shoeSizeMin;
|
||||
}
|
||||
|
||||
private function getShoeSizeMax(): int
|
||||
{
|
||||
return $this->shoeSizeMax;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display card grid for all participants.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user