Passed
Push — master ( a90b5c...399722 )
by Matthijs
07:00
created
app/Http/Controllers/Frontend/CartController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
             return redirect()->to('cart');
20 20
         }
21 21
             
22
-        if($sendingMethodsList->count() AND !Cart::getConditionsByType('sending_method')->count()) {
22
+        if ($sendingMethodsList->count() AND !Cart::getConditionsByType('sending_method')->count()) {
23 23
             self::updateSendingMethod($sendingMethodsList->first()->id);
24 24
         }      
25 25
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             $request->get('amount')
59 59
         );
60 60
 
61
-        if($result){
61
+        if ($result) {
62 62
             return response()->json(array(
63 63
                 'result' => true, 
64 64
                 'producttotal' => Cart::getContent()->count(),
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             $product = Cart::get($productId);
90 90
             $amountNa = false;
91 91
 
92
-            if($product->quantity < $amount) {
92
+            if ($product->quantity < $amount) {
93 93
                 $amountNa = view('frontend.cart.amount-na')->with(array('product' => $product))->render();
94 94
             }
95 95
             
Please login to merge, or discard this patch.
app/Http/Controllers/Frontend/CheckoutController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@  discard block
 block discarded – undo
26 26
 
27 27
         $paymentMethodsList = Cart::getConditionsByType('sending_method')->first()->getAttributes()['data']['related_payment_methods_list'];
28 28
      
29
-        if(!Cart::getConditionsByType('sending_method')->count()) {
29
+        if (!Cart::getConditionsByType('sending_method')->count()) {
30 30
             Notification::error('Selecteer een verzendwijze');
31 31
             return redirect()->to('cart');
32 32
         }
33 33
 
34
-        if(!Cart::getConditionsByType('payment_method')->count()) {
34
+        if (!Cart::getConditionsByType('payment_method')->count()) {
35 35
             Notification::error('Selecteer een betaalwijze');
36 36
             return redirect()->to('cart');
37 37
         }
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
                     'paymentMethodsList' => $paymentMethodsList));
51 51
             }
52 52
               
53
-             return view('frontend.checkout.login')->with(array(  'sendingMethodsList' => $sendingMethodsList, 'paymentMethodsList' => $paymentMethodsList));
53
+             return view('frontend.checkout.login')->with(array('sendingMethodsList' => $sendingMethodsList, 'paymentMethodsList' => $paymentMethodsList));
54 54
         }
55 55
 
56 56
         $user = auth('web')->user();
@@ -108,13 +108,13 @@  discard block
 block discarded – undo
108 108
 
109 109
         $validateRegister = ClientService::validateRegister($request->all(), $noAccount);
110 110
 
111
-        if($validateRegister->fails()) {
111
+        if ($validateRegister->fails()) {
112 112
             foreach ($validator->errors()->all() as $error) {
113 113
                 Notification::error($error);
114 114
             }
115 115
 
116 116
             return redirect()->to('cart/checkout')
117
-            ->withErrors(true, 'register')->withInput();;
117
+            ->withErrors(true, 'register')->withInput(); ;
118 118
         }
119 119
 
120 120
         if ($request->get('password')) {
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
                 $data = $register;
138 138
                 $data['shop'] = app('shop');
139 139
         
140
-                Mail::send('frontend.email.register-mail', array('password' => $userdata['password'], 'user' => $data->toArray(), 'billAddress' => $data->clientBillAddress->toArray()), function ($message) use ($data) {
140
+                Mail::send('frontend.email.register-mail', array('password' => $userdata['password'], 'user' => $data->toArray(), 'billAddress' => $data->clientBillAddress->toArray()), function($message) use ($data) {
141 141
             
142 142
                     $message->to($data['email'])->from($data['shop']->email, $data['shop']->title)->subject('Je bent geregistreerd.');
143 143
                 });
@@ -198,19 +198,19 @@  discard block
 block discarded – undo
198 198
             $data['user_id'] = auth('web')->user()->id;
199 199
         }
200 200
 
201
-        if ($noAccountUser){
201
+        if ($noAccountUser) {
202 202
             $data['user_id'] = $noAccountUser['client_id'];
203 203
         }     
204 204
 
205
-        if(Cart::getConditionsByType('sending_method')->count()) {
205
+        if (Cart::getConditionsByType('sending_method')->count()) {
206 206
             $data['sending_method'] = Cart::getConditionsByType('sending_method');
207 207
         }
208 208
 
209
-        if(Cart::getConditionsByType('sending_method_country_price')->count()) {
209
+        if (Cart::getConditionsByType('sending_method_country_price')->count()) {
210 210
             $data['sending_method_country_price'] = Cart::getConditionsByType('sending_method_country_price');
211 211
         }
212 212
 
213
-        if(Cart::getConditionsByType('payment_method')->count()) {
213
+        if (Cart::getConditionsByType('payment_method')->count()) {
214 214
             $data['payment_method'] = Cart::getConditionsByType('payment_method');
215 215
         }
216 216
 
Please login to merge, or discard this patch.