@@ -27,15 +27,15 @@ discard block |
||
27 | 27 | 'tickets' => [ |
28 | 28 | 'required', |
29 | 29 | 'array', |
30 | - function ($attribute, $value, $fail) { |
|
30 | + function($attribute, $value, $fail) { |
|
31 | 31 | // First check if the selected categories are linked |
32 | 32 | // to the selected event. Else attackers could select |
33 | 33 | // cheaper categories for their tickets |
34 | 34 | $event = $this->route('event'); |
35 | 35 | $allowedPriceCategories = $event->priceList->categories->pluck('id')->toArray(); |
36 | - $selectedCategoryIds = array_keys( $value ); |
|
36 | + $selectedCategoryIds = array_keys($value); |
|
37 | 37 | $notAllowedCategories = array_diff($selectedCategoryIds, $allowedPriceCategories); |
38 | - if(!empty($notAllowedCategories)) { |
|
38 | + if (!empty($notAllowedCategories)) { |
|
39 | 39 | $fail('Please only select offered price categories!'); |
40 | 40 | } |
41 | 41 | // Check if the ticket sum is between 1 and 8 |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | 'sometimes', |
56 | 56 | 'required', |
57 | 57 | 'array', |
58 | - function ($attribute, $value, $fail) { |
|
58 | + function($attribute, $value, $fail) { |
|
59 | 59 | // We do not check if the amount of selected seats, because we already do this in the checks |
60 | 60 | // for the amount of tickets. Since the amount of tickets and seats |
61 | 61 | // has to be equal, the previous check implicits that the seats are |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | } |
71 | 71 | |
72 | 72 | // Check if the seatIds are in the range of 1 - event's seats amount |
73 | - $validSeats = array_filter($value, function ($arrItem) use ($event) { |
|
73 | + $validSeats = array_filter($value, function($arrItem) use ($event) { |
|
74 | 74 | return $arrItem > 0 && $arrItem <= $event->seatMap->seats; |
75 | 75 | }); |
76 | 76 | if (count($validSeats) != $seatsSum) { |