Passed
Push — master ( 5ccd99...5e275f )
by Martin
05:51
created
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.
app/Providers/AppServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,10 +16,10 @@  discard block
 block discarded – undo
16 16
      */
17 17
     public function boot()
18 18
     {
19
-        Blade::directive('time', function ($expression) {
19
+        Blade::directive('time', function($expression) {
20 20
             return "<?php echo strftime('%H:%M', date_create($expression)->getTimestamp()); ?>";
21 21
         });
22
-        Blade::directive('datetime', function ($expression) {
22
+        Blade::directive('datetime', function($expression) {
23 23
             return "<?php echo strftime('%A, %d.%m.%Y', date_create($expression)->getTimestamp()); ?>";
24 24
         });
25 25
     }
@@ -32,12 +32,12 @@  discard block
 block discarded – undo
32 32
     public function register()
33 33
     {
34 34
         $this->app->bind('App\PaymentProvider\Klarna', function() {
35
-            return new Klarna( config('paymentprovider.sofortConfigKey') );
35
+            return new Klarna(config('paymentprovider.sofortConfigKey'));
36 36
         });
37 37
 
38 38
         $this->app->bind('App\PaymentProvider\PayPal', function() {
39 39
             return new PayPal(
40
-                config('paymentprovider.payPalClientId'),     // ClientID
40
+                config('paymentprovider.payPalClientId'), // ClientID
41 41
                 config('paymentprovider.payPalClientSecret')  // ClientSecret
42 42
             );
43 43
         });
Please login to merge, or discard this patch.
app/PaymentProvider/Klarna.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 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
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
         if ($this->sofortApi->isError()) {
54 54
             // SOFORT-API didn't accept the data
55
-            foreach($this->sofortApi->getErrors() as $error) {
55
+            foreach ($this->sofortApi->getErrors() as $error) {
56 56
                 Log::error($error);
57 57
             }
58 58
             throw new PaymentProviderException("SOFORT got errors...");
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/SeatMapController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,10 +50,10 @@
 block discarded – undo
50 50
         $seatMap->description = $validated['description'];
51 51
         $seatMap->seats = $validated['seats'];
52 52
 
53
-        if( !empty(json_decode($validated['layout'])) )
53
+        if (!empty(json_decode($validated['layout'])))
54 54
         {
55 55
             $numberOfSeatsInLayout = preg_match_all('/a/', $validated['layout']);
56
-            if($numberOfSeatsInLayout != $validated['seats']) {
56
+            if ($numberOfSeatsInLayout != $validated['seats']) {
57 57
                 return redirect()
58 58
                     ->route('admin.dependencies.seatmap.get', $seatMap)
59 59
                     ->with('status', 'Counted seats of layout (' . $numberOfSeatsInLayout . ') does not match the given seats (' . $validated['seats'] . ')!');
Please login to merge, or discard this patch.
app/Ticket.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -41,19 +41,19 @@
 block discarded – undo
41 41
 
42 42
     public function getRowAndSeat()
43 43
     {
44
-        if( !$this->event->seatMap->layout ) {
44
+        if (!$this->event->seatMap->layout) {
45 45
             return null;
46 46
         }
47 47
 
48 48
         $counter = 0;
49 49
         $result = [];
50 50
         $rows = json_decode($this->event->seatMap->layout);
51
-        foreach( $rows as $rowId => $row ) {
52
-            foreach( str_split($row) as $charId => $char) {
53
-                if($char === 'a') {
51
+        foreach ($rows as $rowId => $row) {
52
+            foreach (str_split($row) as $charId => $char) {
53
+                if ($char === 'a') {
54 54
                     $counter++;
55 55
                 }
56
-                if($counter === $this->seat_number) {
56
+                if ($counter === $this->seat_number) {
57 57
                     $result['row'] = $rowId;
58 58
                     $result['seat'] = $charId;
59 59
                 break;
Please login to merge, or discard this patch.
app/Rules/SeatMapLayout.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function passes($attribute, $value)
37 37
     {
38
-        if($value === NULL || $value === "") {
38
+        if ($value === NULL || $value === "") {
39 39
             // it is allowed for the value to be empty
40 40
             return true;
41 41
         }
@@ -45,20 +45,20 @@  discard block
 block discarded – undo
45 45
 
46 46
         // if json_decode result is falsy, then json object could
47 47
         // not be decoded and therefore the input is invalid
48
-        if(!$rows) {
48
+        if (!$rows) {
49 49
             return false;
50 50
         }
51 51
 
52 52
         // iterate over all rows to check that only valid
53 53
         // characters ('a' and '_') have been submitted
54
-        foreach( $rows as $row ) {
54
+        foreach ($rows as $row) {
55 55
             // explanation for regex ^[a_]*$
56 56
             //  ^     = Start of string
57 57
             //  [a_]  = Only characters "a" and "_" allowed
58 58
             //  *     = zero or more characters
59 59
             //  $     = End of string
60 60
             // Complete: Only match strings that contain from start to end only zero or more characters on the whitelist of a and _
61
-            if( !preg_match('/^[a_]*$/', $row) ) {
61
+            if (!preg_match('/^[a_]*$/', $row)) {
62 62
                 return false;
63 63
             }
64 64
         }
Please login to merge, or discard this patch.