Test Failed
Push — master ( 1129de...bac6db )
by Gianluca
06:48
created
src/Seedeers/DetailTypeSeeder.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,9 +10,9 @@
 block discarded – undo
10 10
 
11 11
 class DetailTypeSeeder extends Seeder
12 12
 {
13
-     public function run(){
14
-         foreach (DetailTypes::all() as $detail) {
15
-             DB::table('detail_type')->insert(['name' => $detail]);
16
-         }
17
-     }
13
+        public function run(){
14
+            foreach (DetailTypes::all() as $detail) {
15
+                DB::table('detail_type')->insert(['name' => $detail]);
16
+            }
17
+        }
18 18
 }
Please login to merge, or discard this patch.
src/Seedeers/SettingsSeeder.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 class SettingsSeeder extends Seeder
13 13
 {
14
-     public function run(){
14
+        public function run(){
15 15
         $settings = new AdminSetting();
16 16
         $settings->shop_name = 'MongiCommerce';
17 17
         $settings->iban = 'DE79100110012626219557';
@@ -26,5 +26,5 @@  discard block
 block discarded – undo
26 26
         $settings->claim_email = '[email protected]';
27 27
         $settings->piva = '12345678901';
28 28
         $settings->save();
29
-     }
29
+        }
30 30
 }
Please login to merge, or discard this patch.
src/Http/Controllers/admin/AdminConfigurationFieldController.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
         if($type === 'textarea'){
55 55
             $html = '';
56 56
             $html .= '<textarea data-configuration_id="'.$field->id .'" class="form-control mongiconfigurationfield"></textarea>';
57
-        }else{
57
+        } else{
58 58
             $html .= '<input type="'.$type.'" data-configuration_id="'.$field->id .'" class="form-control mongiconfigurationfield">';
59 59
         }
60 60
         return $html;
Please login to merge, or discard this patch.
src/Http/Controllers/shop/ShopShowVariationProductController.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
             if(count($informations) == $key +1){
33 33
                 $condition = '';
34
-            }else{
34
+            } else{
35 35
                 $condition = 'or';
36 36
             }
37 37
             $g .= ('(a.product_detail_id ='.$product_detail_id.' and a.product_detail_value_id ='.$product_detail_value_id.') '.$condition.'');
@@ -46,10 +46,10 @@  discard block
 block discarded – undo
46 46
                 $product_item_id = $result->product_item_id;
47 47
 
48 48
                 return response()->json(route('shop.single.product',[$product_id,$product_item_id]));
49
-            }else{
49
+            } else{
50 50
                 return response()->json(false);
51 51
             }
52
-        }else{
52
+        } else{
53 53
             return response()->json(false);
54 54
         }
55 55
 
Please login to merge, or discard this patch.
src/Http/Controllers/shop/ShopCartController.php 1 patch
Braces   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
         if (is_null($checkElement)) {
27 27
             if($num_avaibile_product > 0){
28 28
                 return true;
29
-            }else{
29
+            } else{
30 30
                 return false;
31 31
             }
32
-        }else{
32
+        } else{
33 33
             //if there is something in the cart check the avaibility
34 34
             if ($checkElement->quantity + 1 <= $num_avaibile_product) {
35 35
                 return true;
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
                 session()->push('products.ids', $product_item_id);
52 52
                 session()->put('cart',self::getCountableCart(session('products.ids')));
53 53
                 return response()->json(session('cart'));
54
-            }else{
54
+            } else{
55 55
                 //if number i want is less than number avaible product i can add into cart
56 56
                 $mycart = Cart::where('product_item_id',$product->id)->where('user_id',Auth::user()->id)->first();
57 57
                 if(is_null($mycart)){
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
                     $cart->product_item_id = $product_item_id;
61 61
                     $cart->quantity = 1;
62 62
                     $cart->save();
63
-                }else{
63
+                } else{
64 64
                     $mycart->quantity = $mycart->quantity + 1;
65 65
                     $mycart->save();
66 66
                 }
67 67
                 return true;
68 68
             }
69
-        }else{
69
+        } else{
70 70
             return response()->json([
71 71
                 'errors' => "Prodotto non disponibile o terminato",
72 72
             ], 422);
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
                     session()->put('cart',$cart);
170 170
                 }
171 171
             }
172
-        }else{
172
+        } else{
173 173
             $cart = Cart::where('product_item_id',$product_id)->first();
174 174
             if($product->quantity > $cart->quantity || $operator < 0){
175 175
                 if($cart->quantity > 1 || $operator > 0){
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
             $cart_in_session = session('cart');
188 188
             unset($cart_in_session[$product_id]);
189 189
             session()->put('cart',$cart_in_session);
190
-        }else{
190
+        } else{
191 191
             Cart::where('product_item_id',$product_id)->delete();
192 192
             return true;
193 193
         }
Please login to merge, or discard this patch.
src/routes.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      *-----SHOP------*
32 32
      *****************/
33 33
 
34
-     /*
34
+        /*
35 35
      AUTH
36 36
      */
37 37
     Route::get('/page/register', [ShopRegisterController::class, 'create'])->name('shop.register');
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     //orders
91 91
     Route::get('/admin/ordini',[AdminOrdersController::class,'page'])->name('admin.orders.list');
92 92
     Route::get('/admin/ordine/{order_id}',[AdminOrderDetailsController::class,'page'])->name('admin.order');
93
-     Route::get('/admin/clienti',[AdminClientsController::class,'page'])->name('admin.clients');
93
+        Route::get('/admin/clienti',[AdminClientsController::class,'page'])->name('admin.clients');
94 94
 
95 95
 
96 96
 
Please login to merge, or discard this patch.
src/Http/Controllers/shop/ShopShipmentController.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
                 $user->cap = $cap;
99 99
                 $user->save();
100 100
         //if user doesn't exist
101
-        }else{
101
+        } else{
102 102
             $user = new User();
103 103
             $user->piva = $piva;
104 104
             $user->company = $rag_soc;
Please login to merge, or discard this patch.
src/Http/Controllers/shop/ShopPaymentController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@
 block discarded – undo
135 135
 
136 136
     }
137 137
 
138
-      public function normalPayment(Request $r){
138
+        public function normalPayment(Request $r){
139 139
         $type = $r->get('type_payment');
140 140
         switch ($type){
141 141
             case 'iban':
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
             $check_order = Order::orderBy('created_at','desc')->first();
42 42
             if(is_null($check_order)){
43 43
                 $order_id = 1;
44
-            }else{
44
+            } else{
45 45
                 $order_id = $check_order->id + 1;
46 46
             }
47 47
             Stripe::setApiKey(AdminSetting::getStripeApiSecretKey());
Please login to merge, or discard this patch.
src/Http/Controllers/auth/ShopLogoutController.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@
 block discarded – undo
7 7
 
8 8
 class ShopLogoutController extends AuthenticatedSessionController
9 9
 {
10
-     /**
11
-     * Destroy an authenticated session.
12
-     *
13
-     * @param  \Illuminate\Http\Request  $request
14
-     * @return \Illuminate\Http\RedirectResponse
15
-     */
10
+        /**
11
+         * Destroy an authenticated session.
12
+         *
13
+         * @param  \Illuminate\Http\Request  $request
14
+         * @return \Illuminate\Http\RedirectResponse
15
+         */
16 16
     public function destroy(Request $request)
17 17
     {
18 18
         Auth::guard('web')->logout();
Please login to merge, or discard this patch.