Test Setup Failed
Branch master (339bb1)
by Martin
06:08
created
app/Http/Requests/SelectTickets.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,15 +27,15 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
app/PaymentProvider/PayPal.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,10 +41,10 @@
 block discarded – undo
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
             ]);
Please login to merge, or discard this patch.
app/PaymentProvider/Klarna.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     {
41 41
         $this->sofortApi->setAmount($purchase->total());
42 42
         $this->sofortApi->setCurrencyCode('EUR');
43
-        $this->sofortApi->setReason('#'.$purchase->id . ' Purchase');
43
+        $this->sofortApi->setReason('#' . $purchase->id . ' Purchase');
44 44
         $this->sofortApi->setSuccessUrl(route('ts.payment.successful', [
45 45
             'purchase' => $purchase->random_id,
46 46
             'secret' => $purchase->payment_secret
Please login to merge, or discard this patch.
app/Http/Controllers/TicketShop/PaymentProviderController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,12 +65,12 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
app/Http/Requests/PayTickets.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@
 block discarded – undo
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 [
Please login to merge, or discard this patch.
app/Http/Controllers/BoxOffice/OnlineController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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),
Please login to merge, or discard this patch.
app/Http/Requests/SetBoxOfficeSales.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
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!');
Please login to merge, or discard this patch.
app/Http/Controllers/StartController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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'));
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/ProjectController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
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!');
Please login to merge, or discard this patch.