Test Setup Failed
Branch master (339bb1)
by Martin
06:08
created
app/Http/Controllers/Retail/SellTicketsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@
 block discarded – undo
23 23
      */
24 24
     public function events()
25 25
     {
26
-        $projects = Project::where('is_archived', 0)->with(['events' => function ($query) {
26
+        $projects = Project::where('is_archived', 0)->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
 
Please login to merge, or discard this patch.
app/Http/Controllers/TicketShop/EventsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@
 block discarded – undo
29 29
         $deadline = new \DateTime();
30 30
         $deadline->add(new \DateInterval('PT2H'));
31 31
 
32
-        $projects = Project::where('is_archived', 0)->with(['events' => function ($query) use ($deadline) {
32
+        $projects = Project::where('is_archived', 0)->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
 
Please login to merge, or discard this patch.
app/Project.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
                             ->get();
64 64
         
65 65
         // Iterate over all events and fill in the values for each fetched header
66
-        foreach( $this->events as $event ) {
66
+        foreach ($this->events as $event) {
67 67
             $eventResults = [];
68 68
 
69 69
             $eventResults['date'] = $event->start_date;
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                                                                 ->count();
75 75
 
76 76
             // Get ticket category stats
77
-            foreach( $priceCategories as $cat) {
77
+            foreach ($priceCategories as $cat) {
78 78
                 // Get the number of tickets sold of this category
79 79
                 $eventResults[$cat->name . '_total'] = with(clone $viewQuery)->where('tickets.event_id', $event->id)
80 80
                                                                             ->where('purchases.state', 'paid')
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             $eventResults['total_sum'] = with(clone $viewQuery)->where('tickets.event_id', $event->id)->sum('price_categories.price');
98 98
 
99 99
             // Get the sales for each vendor
100
-            foreach( $vendors as $vendor ) {
100
+            foreach ($vendors as $vendor) {
101 101
                 $eventResults[$vendor->name . '_sum'] = with(clone $viewQuery)->where('tickets.event_id', $event->id)
102 102
                                                                             ->where('purchases.vendor_id', $vendor->id)
103 103
                                                                             ->sum('price_categories.price');
Please login to merge, or discard this patch.