Test Failed
Push — master ( bb09d0...43a40c )
by Gianluca
16:56 queued 11:51
created
src/Models/ConfigurationField.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@
 block discarded – undo
11 11
 {
12 12
     use HasFactory;
13 13
 
14
-    public function value(){
15
-        return $this->belongsTo(ConfigurationFieldValue::class,'configuration_field_id');
14
+    public function value() {
15
+        return $this->belongsTo(ConfigurationFieldValue::class, 'configuration_field_id');
16 16
     }
17 17
 
18 18
 
Please login to merge, or discard this patch.
src/Http/Controllers/admin/AdminNewProductController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,11 +12,11 @@
 block discarded – undo
12 12
 
13 13
 class AdminNewProductController extends Controller
14 14
 {
15
-    public function page(){
15
+    public function page() {
16 16
         return view('mongicommerce::admin.pages.products.new_product');
17 17
     }
18 18
 
19
-    public function createNewProduct(Request $r){
19
+    public function createNewProduct(Request $r) {
20 20
 
21 21
         $r->validate([
22 22
             'product_name' => 'required',
Please login to merge, or discard this patch.
src/Models/ProductItemDetail.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 {
12 12
     use HasFactory;
13 13
 
14
-    public function detail(){
15
-        return $this->belongsTo(DetailValue::class,'product_detail_value_id');
14
+    public function detail() {
15
+        return $this->belongsTo(DetailValue::class, 'product_detail_value_id');
16 16
     }
17 17
 }
Please login to merge, or discard this patch.
src/Models/ProductItem.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@
 block discarded – undo
11 11
 {
12 12
     use HasFactory;
13 13
 
14
-    public function details(){
15
-        return $this->hasMany(ProductItemDetail::class,'product_item_id');
14
+    public function details() {
15
+        return $this->hasMany(ProductItemDetail::class, 'product_item_id');
16 16
     }
17 17
 
18 18
 }
Please login to merge, or discard this patch.
src/Models/DetailValue.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@
 block discarded – undo
11 11
 {
12 12
     use HasFactory;
13 13
 
14
-    public function detail(){
15
-        return $this->belongsTo(Detail::class,'detail_id');
14
+    public function detail() {
15
+        return $this->belongsTo(Detail::class, 'detail_id');
16 16
     }
17 17
 
18 18
 }
Please login to merge, or discard this patch.
src/Http/Controllers/admin/AdminProductsListController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@
 block discarded – undo
9 9
 
10 10
 class AdminProductsListController extends Controller
11 11
 {
12
-    public function page(){
12
+    public function page() {
13 13
         $products = Product::all();
14
-        return view('mongicommerce::admin.pages.products.products_list',['products' => $products]);
14
+        return view('mongicommerce::admin.pages.products.products_list', ['products' => $products]);
15 15
     }
16 16
 }
Please login to merge, or discard this patch.
src/Seedeers/SettingsSeeder.php 2 patches
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 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';
Please login to merge, or discard this patch.
src/Http/Controllers/admin/AdminConfigurationFieldController.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 class AdminConfigurationFieldController extends Controller
14 14
 {
15
-    public function setNewConfiguration(Request $r){
15
+    public function setNewConfiguration(Request $r) {
16 16
 
17 17
         $r->validate([
18 18
             'name' => 'required',
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
         return response()->json(true);
34 34
     }
35 35
 
36
-    public function getConfigurationFields(Request $r){
36
+    public function getConfigurationFields(Request $r) {
37 37
         $category_id = $r->get('category_id');
38
-        $configurationFields = ConfigurationField::where('category_id',$category_id)->get();
38
+        $configurationFields = ConfigurationField::where('category_id', $category_id)->get();
39 39
         $d = [];
40
-        foreach ($configurationFields as $field){
40
+        foreach ($configurationFields as $field) {
41 41
             $d[] = [
42 42
                 'name' => $field->name,
43 43
                 'type' => $field->type,
@@ -48,14 +48,14 @@  discard block
 block discarded – undo
48 48
 
49 49
     }
50 50
 
51
-    public function generateConfigurationFieldHtml($field){
51
+    public function generateConfigurationFieldHtml($field) {
52 52
         $type = $field->type;
53 53
         $html = '';
54
-        if($type === 'textarea'){
54
+        if ($type === 'textarea') {
55 55
             $html = '';
56
-            $html .= '<textarea data-configuration_id="'.$field->id .'" class="form-control mongiconfigurationfield"></textarea>';
57
-        }else{
58
-            $html .= '<input type="'.$type.'" data-configuration_id="'.$field->id .'" class="form-control mongiconfigurationfield">';
56
+            $html .= '<textarea data-configuration_id="'.$field->id.'" class="form-control mongiconfigurationfield"></textarea>';
57
+        } else {
58
+            $html .= '<input type="'.$type.'" data-configuration_id="'.$field->id.'" class="form-control mongiconfigurationfield">';
59 59
         }
60 60
         return $html;
61 61
     }
Please login to merge, or discard this 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/admin/AdminNewProductVariationController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -14,14 +14,14 @@  discard block
 block discarded – undo
14 14
 
15 15
 class AdminNewProductVariationController extends Controller
16 16
 {
17
-    public function page($id_product){
17
+    public function page($id_product) {
18 18
         $product = Product::find($id_product);
19 19
         $items = $product->items;
20 20
 
21
-        return view('mongicommerce::admin.pages.products.new_product_variation',['product' => $product,'items' => $items]);
21
+        return view('mongicommerce::admin.pages.products.new_product_variation', ['product' => $product, 'items' => $items]);
22 22
     }
23 23
 
24
-    public function createNewVariation(Request $r){
24
+    public function createNewVariation(Request $r) {
25 25
         $r->validate([
26 26
             'category_id' => 'required',
27 27
             'quantity' => 'required',
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
         ]);
31 31
         $product_id = $r->get('product_id');
32 32
 
33
-        $details = json_decode($r->get('details'),true);
34
-        $configuration_fields = json_decode($r->get('configuration_fields'),true);
33
+        $details = json_decode($r->get('details'), true);
34
+        $configuration_fields = json_decode($r->get('configuration_fields'), true);
35 35
         $quantity = $r->get('quantity');
36 36
         $price = $r->get('price');
37 37
         $product_name = $r->get('product_name');
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $product_item->quantity = $quantity;
49 49
         $product_item->save();
50 50
 
51
-        foreach($details as $detail){
51
+        foreach ($details as $detail) {
52 52
             $detail_obj = (object) $detail;
53 53
             $product_detail = new ProductItemDetail();
54 54
             $product_detail->product_item_id = $product_item->id;
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             $product_detail->save();
58 58
         }
59 59
 
60
-        foreach ($configuration_fields as $conf_field){
60
+        foreach ($configuration_fields as $conf_field) {
61 61
             $conf_fields_obj = (object) $conf_field;
62 62
             $configuration_field = new ProductConfigurationField();
63 63
             $configuration_field->product_item_id = $product_item->id;
Please login to merge, or discard this patch.