| @@ -52,8 +52,8 @@ discard block | ||
| 52 | 52 | protected function mapWebRoutes() | 
| 53 | 53 |      { | 
| 54 | 54 |          Route::middleware('web') | 
| 55 | - ->namespace($this->namespace) | |
| 56 | -             ->group(base_path('routes/web.php')); | |
| 55 | + ->namespace($this->namespace) | |
| 56 | +                ->group(base_path('routes/web.php')); | |
| 57 | 57 | } | 
| 58 | 58 | |
| 59 | 59 | /** | 
| @@ -66,8 +66,8 @@ discard block | ||
| 66 | 66 | protected function mapApiRoutes() | 
| 67 | 67 |      { | 
| 68 | 68 |          Route::prefix('api') | 
| 69 | -             ->middleware('api') | |
| 70 | - ->namespace($this->namespace) | |
| 71 | -             ->group(base_path('routes/api.php')); | |
| 69 | +                ->middleware('api') | |
| 70 | + ->namespace($this->namespace) | |
| 71 | +                ->group(base_path('routes/api.php')); | |
| 72 | 72 | } | 
| 73 | 73 | } | 
| @@ -52,7 +52,7 @@ | ||
| 52 | 52 |              return $this->markdown('mails.tickets.paid') | 
| 53 | 53 | ->attachData($pdfContent, 'tickets-' . $this->purchase->id . '.pdf', [ | 
| 54 | 54 | 'mime' => 'application/pdf', | 
| 55 | - ]);; | |
| 55 | + ]); ; | |
| 56 | 56 |          } catch (Html2PdfException $e) { | 
| 57 | 57 | $html2pdf->clean(); | 
| 58 | 58 | $formatter = new ExceptionFormatter($e); | 
| @@ -32,8 +32,8 @@ | ||
| 32 | 32 | public function permissions() | 
| 33 | 33 |      { | 
| 34 | 34 | $permissions = collect([]); | 
| 35 | -        $this->roles->each(function ($role) use (&$permissions) { | |
| 36 | -            $role->permissions->each(function ($permission) use (&$permissions) { | |
| 35 | +        $this->roles->each(function($role) use (&$permissions) { | |
| 36 | +            $role->permissions->each(function($permission) use (&$permissions) { | |
| 37 | 37 | $permissions->push($permission); | 
| 38 | 38 | }); | 
| 39 | 39 | }); | 
| @@ -29,11 +29,11 @@ | ||
| 29 | 29 | $deadline = new \DateTime(); | 
| 30 | 30 |          $deadline->add(new \DateInterval('PT2H')); | 
| 31 | 31 | |
| 32 | -        $projects = Project::with(['events' => function ($query) use ($deadline) { | |
| 32 | +        $projects = Project::with(['events' => function($query) use ($deadline) { | |
| 33 | 33 |              $query->where('start_date', '>=', $deadline)->orderBy('start_date', 'ASC'); | 
| 34 | 34 | }, 'events.location'])->get(); | 
| 35 | 35 | |
| 36 | -        $currentProjects = $projects->filter(function ($project) { | |
| 36 | +        $currentProjects = $projects->filter(function($project) { | |
| 37 | 37 | return $project->events->count() > 0; | 
| 38 | 38 | })->all(); | 
| 39 | 39 | |
| @@ -23,11 +23,11 @@ | ||
| 23 | 23 | */ | 
| 24 | 24 | public function events() | 
| 25 | 25 |      { | 
| 26 | -        $projects = Project::with(['events' => function ($query) { | |
| 26 | +        $projects = Project::with(['events' => function($query) { | |
| 27 | 27 |              $query->where('end_date', '>=', new \DateTime())->orderBy('start_date', 'ASC'); | 
| 28 | 28 | }, 'events.location'])->get(); | 
| 29 | 29 | |
| 30 | -        $currentProjects = $projects->filter(function ($project) { | |
| 30 | +        $currentProjects = $projects->filter(function($project) { | |
| 31 | 31 | return $project->events->count() > 0; | 
| 32 | 32 | })->all(); | 
| 33 | 33 | |
| @@ -45,7 +45,7 @@ | ||
| 45 | 45 | |
| 46 | 46 | public function downloadCSV(Project $project) | 
| 47 | 47 |      { | 
| 48 | -        return response()->streamDownload(function () use ($project) { | |
| 48 | +        return response()->streamDownload(function() use ($project) { | |
| 49 | 49 |              echo view('csvs.tickets', ['events' => $project->events])->render(); | 
| 50 | 50 | }, 'export.csv'); | 
| 51 | 51 | } | 
| @@ -35,7 +35,7 @@ | ||
| 35 | 35 | */ | 
| 36 | 36 | protected function commands() | 
| 37 | 37 |      { | 
| 38 | - $this->load(__DIR__.'/Commands'); | |
| 38 | + $this->load(__DIR__ . '/Commands'); | |
| 39 | 39 | |
| 40 | 40 |          require base_path('routes/console.php'); | 
| 41 | 41 | } | 
| @@ -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 | |
| @@ -29,7 +29,7 @@ discard block | ||
| 29 | 29 | 'tickets' => [ | 
| 30 | 30 | 'required', | 
| 31 | 31 | 'array', | 
| 32 | -                function ($attribute, $value, $fail) { | |
| 32 | +                function($attribute, $value, $fail) { | |
| 33 | 33 |                      foreach ($value as $category => $count) { | 
| 34 | 34 |                          if (!PriceCategory::find($category)) { | 
| 35 | 35 |                              $fail('Please select only offered price categories!'); | 
| @@ -51,7 +51,7 @@ discard block | ||
| 51 | 51 | 'sometimes', | 
| 52 | 52 | 'required', | 
| 53 | 53 | 'array', | 
| 54 | -                function ($attribute, $value, $fail) { | |
| 54 | +                function($attribute, $value, $fail) { | |
| 55 | 55 | // We do not check if the amount of selected seats, because we already do this in the checks | 
| 56 | 56 | // for the amount of tickets. Since the amount of tickets and seats | 
| 57 | 57 | // has to be equal, the previous check implicits that the seats are | 
| @@ -66,7 +66,7 @@ discard block | ||
| 66 | 66 | } | 
| 67 | 67 | |
| 68 | 68 | // Check if the seatIds are in the range of 1 - event's seats amount | 
| 69 | -                    $validSeats = array_filter($value, function ($arrItem) use ($event) { | |
| 69 | +                    $validSeats = array_filter($value, function($arrItem) use ($event) { | |
| 70 | 70 | return $arrItem > 0 && $arrItem <= $event->seatMap->seats; | 
| 71 | 71 | }); | 
| 72 | 72 |                      if (count($validSeats) != $seatsSum) { |