1 | <?php |
||
10 | class GetSeatsHandler |
||
11 | { |
||
12 | /** @var SeatRepository */ |
||
13 | private $seatRepository; |
||
14 | |||
15 | /** |
||
16 | * @param SeatRepository $seatRepository |
||
17 | */ |
||
18 | public function __construct( |
||
23 | |||
24 | /** |
||
25 | * @param PriceCategory $priceCategory |
||
26 | * |
||
27 | * @return Seat[] |
||
28 | */ |
||
29 | public function handle(PriceCategory $priceCategory): array |
||
33 | |||
34 | /** |
||
35 | * @param PriceCategory $priceCategory |
||
36 | * |
||
37 | * @return Seat[] |
||
38 | */ |
||
39 | protected function getSeatsForPriceCategory(PriceCategory $priceCategory): array |
||
59 | |||
60 | /** |
||
61 | * @param PriceCategory $priceCategory |
||
62 | * |
||
63 | * @return array |
||
64 | */ |
||
65 | protected function parsePriceCategoryPlaces(PriceCategory $priceCategory): array |
||
75 | |||
76 | /** |
||
77 | * @param string $incomingStrPlaces |
||
78 | * |
||
79 | * @return array |
||
80 | */ |
||
81 | protected function getPlacesFromString(string $incomingStrPlaces = null): array |
||
105 | |||
106 | /** |
||
107 | * @param array $array |
||
108 | * |
||
109 | * @return array |
||
110 | */ |
||
111 | protected function removeEmptyElements(array $array): array |
||
117 | |||
118 | /** |
||
119 | * @param array $places |
||
120 | * @throws \Exception |
||
121 | */ |
||
122 | protected function validatePlaces(array $places) |
||
128 | } |
||
129 |