@@ -41,10 +41,10 @@ |
||
41 | 41 | public function __construct($clientId, $clientSecret) |
42 | 42 | { |
43 | 43 | $this->apiContext = new ApiContext( |
44 | - new OAuthTokenCredential( $clientId, $clientSecret) |
|
44 | + new OAuthTokenCredential($clientId, $clientSecret) |
|
45 | 45 | ); |
46 | 46 | |
47 | - if(App::environment('prod')) { |
|
47 | + if (App::environment('prod')) { |
|
48 | 48 | $this->apiContext->setConfig([ |
49 | 49 | 'mode' => 'live' |
50 | 50 | ]); |
@@ -65,12 +65,12 @@ |
||
65 | 65 | $returnable->with('status', $e->getMessage()); |
66 | 66 | Log::warning($e); |
67 | 67 | } catch (PayPalConnectionException $e) { |
68 | - Log::warning('[PayPal] [paymentId='. $paymentId . '|payerId=' . $payerId . '] ' . $e->getMessage()); |
|
68 | + Log::warning('[PayPal] [paymentId=' . $paymentId . '|payerId=' . $payerId . '] ' . $e->getMessage()); |
|
69 | 69 | // This will print the detailed information on the exception. |
70 | 70 | //REALLY HELPFUL FOR DEBUGGING |
71 | 71 | Log::error($e->getData()); |
72 | 72 | } catch (\Exception $e) { |
73 | - Log::warning('[General] [paymentId='. $paymentId . '|payerId=' . $payerId . '] ' . $e->getMessage()); |
|
73 | + Log::warning('[General] [paymentId=' . $paymentId . '|payerId=' . $payerId . '] ' . $e->getMessage()); |
|
74 | 74 | } |
75 | 75 | return $returnable; |
76 | 76 | } |
@@ -24,10 +24,10 @@ |
||
24 | 24 | public function rules() |
25 | 25 | { |
26 | 26 | $filter = 'in:'; |
27 | - if(env('KLARNA_CONFIG_KEY')) { |
|
27 | + if (env('KLARNA_CONFIG_KEY')) { |
|
28 | 28 | $filter .= 'Klarna,'; |
29 | 29 | } |
30 | - if(env('PAYPAL_CLIENT_SECRET')) { |
|
30 | + if (env('PAYPAL_CLIENT_SECRET')) { |
|
31 | 31 | $filter .= 'PayPal,'; |
32 | 32 | } |
33 | 33 | return [ |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | public function switchTicketState(Ticket $ticket) |
26 | 26 | { |
27 | - if($ticket->state == 'no_show') { |
|
27 | + if ($ticket->state == 'no_show') { |
|
28 | 28 | $ticket->state = 'consumed'; |
29 | 29 | } else { |
30 | 30 | $ticket->state = 'no_show'; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | { |
48 | 48 | // On the first call of this function the event has not an associated boxoffice purchase. |
49 | 49 | // So we must create one. |
50 | - if(!$event->boxoffice) { |
|
50 | + if (!$event->boxoffice) { |
|
51 | 51 | $purchase = new Purchase(); |
52 | 52 | $purchase->generateSecrets(); |
53 | 53 | $purchase->customer_name = 'Box Office'; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | Ticket::where('purchase_id', $purchase->id)->delete(); |
69 | 69 | |
70 | 70 | // Freshly create the tickets sent for the box office |
71 | - foreach($request->tickets as $categoryId => $count) { |
|
71 | + foreach ($request->tickets as $categoryId => $count) { |
|
72 | 72 | for ($i = 0; $i < $count; $i++) { |
73 | 73 | Ticket::create([ |
74 | 74 | 'random_id' => Str::random(32), |
@@ -28,7 +28,7 @@ |
||
28 | 28 | 'tickets' => [ |
29 | 29 | 'required', |
30 | 30 | 'array', |
31 | - function ($attribute, $value, $fail) { |
|
31 | + function($attribute, $value, $fail) { |
|
32 | 32 | foreach ($value as $category => $count) { |
33 | 33 | if (!PriceCategory::find($category)) { |
34 | 34 | $fail('Please select only offered price categories!'); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | public function getLogo() |
37 | 37 | { |
38 | 38 | $logo = Setting::where('name', 'logo')->first(); |
39 | - if( $logo ) { |
|
39 | + if ($logo) { |
|
40 | 40 | return response()->file(Storage::path($logo->value)); |
41 | 41 | } else { |
42 | 42 | return redirect(asset('img/logos/fa-ticket.png')); |
@@ -38,7 +38,7 @@ |
||
38 | 38 | { |
39 | 39 | // check if events are associate with the to be deleted project |
40 | 40 | // if yes do not delete and send back with errors |
41 | - if( $project->events()->exists() ) |
|
41 | + if ($project->events()->exists()) |
|
42 | 42 | { |
43 | 43 | return redirect()->route('admin.events.project.get', $project) |
44 | 44 | ->with('status', 'Error on deletion: Project has events!'); |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | { |
18 | 18 | $projects = Project::where('is_archived', false)->get(); |
19 | 19 | $archive = Project::where('is_archived', true)->get(); |
20 | - foreach( $archive as $project ) |
|
20 | + foreach ($archive as $project) |
|
21 | 21 | { |
22 | 22 | // Set the time range of the project by selecting the last and first dates of its events |
23 | 23 | // if no events are associated with the project, set the dates to '-' |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | public function delete(Event $event) |
110 | 110 | { |
111 | - if($event->tickets()->exists()) |
|
111 | + if ($event->tickets()->exists()) |
|
112 | 112 | { |
113 | 113 | return redirect()->route('admin.events.get', $event) |
114 | 114 | ->with('status', 'Error on deletion: Event has tickets!'); |
@@ -23,11 +23,11 @@ |
||
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 |