@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | public function total() |
48 | 48 | { |
49 | 49 | $tickets = $this->tickets; |
50 | - return $tickets->sum(function ($ticket) { |
|
50 | + return $tickets->sum(function($ticket) { |
|
51 | 51 | return $ticket->price(); |
52 | 52 | }); |
53 | 53 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | public function events() |
56 | 56 | { |
57 | 57 | $events = []; |
58 | - $this->tickets->each(function ($ticket) use (&$events) { |
|
58 | + $this->tickets->each(function($ticket) use (&$events) { |
|
59 | 59 | $events[$ticket->event->id] = $ticket->event; |
60 | 60 | }); |
61 | 61 | return collect($events); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | public function ticketList() |
69 | 69 | { |
70 | 70 | $list = []; |
71 | - $this->tickets->each(function ($ticket) use (&$list) { |
|
71 | + $this->tickets->each(function($ticket) use (&$list) { |
|
72 | 72 | if (array_key_exists($ticket->priceCategory->name, $list)) { |
73 | 73 | $list[$ticket->priceCategory->name]['count']++; |
74 | 74 | } else { |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | public function deleteWithAllData() |
88 | 88 | { |
89 | - $this->tickets->each(function ($ticket) { |
|
89 | + $this->tickets->each(function($ticket) { |
|
90 | 90 | $ticket->delete(); |
91 | 91 | }); |
92 | 92 |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | 'tickets' => [ |
29 | 29 | 'required', |
30 | 30 | 'array', |
31 | - function ($attribute, $value, $fail) { |
|
31 | + function($attribute, $value, $fail) { |
|
32 | 32 | $ticketSum = array_sum($value); |
33 | 33 | if ($ticketSum === 0) { |
34 | 34 | $fail('Please select at least one or up to 8 tickets!'); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | 'sometimes', |
46 | 46 | 'required', |
47 | 47 | 'array', |
48 | - function ($attribute, $value, $fail) { |
|
48 | + function($attribute, $value, $fail) { |
|
49 | 49 | // We do not check if the amount of selected seats, because we already do this in the checks |
50 | 50 | // for the amount of tickets. Since the amount of tickets and seats |
51 | 51 | // has to be equal, the previous check implicits that the seats are |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | } |
61 | 61 | |
62 | 62 | // Check if the seatIds are in the range of 1 - event's seats amount |
63 | - $validSeats = array_filter($value, function ($arrItem) use ($event) { |
|
63 | + $validSeats = array_filter($value, function($arrItem) use ($event) { |
|
64 | 64 | return $arrItem > 0 && $arrItem <= $event->seatMap->seats; |
65 | 65 | }); |
66 | 66 | if (count($validSeats) != $seatsSum) { |