Test Failed
Push — master ( 67d6ff...f8d747 )
by Gianluca
16:33
created
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.
src/Http/Controllers/admin/AdminSettingsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@
 block discarded – undo
8 8
 
9 9
 class AdminSettingsController
10 10
 {
11
-    public function page(){
11
+    public function page() {
12 12
         $settings = AdminSetting::first();
13
-        return view('mongicommerce::admin.pages.settings',['settings' => $settings]);
13
+        return view('mongicommerce::admin.pages.settings', ['settings' => $settings]);
14 14
     }
15 15
 }
Please login to merge, or discard this patch.
src/Models/Product.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,13 +11,13 @@
 block discarded – undo
11 11
 {
12 12
     use HasFactory;
13 13
 
14
-    protected $dates = ["created_at","updated_at"];
14
+    protected $dates = ["created_at", "updated_at"];
15 15
 
16
-    public function items(){
16
+    public function items() {
17 17
         return $this->hasMany(ProductItem::class);
18 18
     }
19 19
 
20
-    public function category(){
20
+    public function category() {
21 21
         return $this->belongsTo(Category::class);
22 22
     }
23 23
 
Please login to merge, or discard this patch.
src/Models/Category.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
         return $this->children_rec()->with('children');
30 30
     }
31 31
 
32
-    public function configuration_fields(){
32
+    public function configuration_fields() {
33 33
         return $this->hasMany(ConfigurationField::class);
34 34
     }
35 35
 
Please login to merge, or discard this patch.
migrations/2020_12_22_085261_create_product_configuration_field_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('product_configuration_fields', function (Blueprint $table) {
16
+        Schema::create('product_configuration_fields', function(Blueprint $table) {
17 17
             $table->id();
18 18
             $table->unsignedBigInteger('product_item_id');
19 19
             $table->unsignedBigInteger('config_field_id');
Please login to merge, or discard this patch.
database/migrations/2020_12_28_085261_create_admin_settings_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('admin_settings', function (Blueprint $table) {
16
+        Schema::create('admin_settings', function(Blueprint $table) {
17 17
             $table->id();
18 18
             $table->string('shop_name')->default('MongiCommerce');
19 19
             $table->string('iban')->default('DE79100110012626219557');
Please login to merge, or discard this patch.