Test Failed
Push — master ( befccc...a4b299 )
by Gianluca
19:49
created
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/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.
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.
src/MongicommerceServiceProvider.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@  discard block
 block discarded – undo
26 26
         $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
27 27
         $this->loadRoutesFrom(__DIR__.'/routes.php');
28 28
 
29
-        if(Schema::hasTable('admin_settings')){
29
+        if (Schema::hasTable('admin_settings')) {
30 30
             //inject global information into views
31 31
             View::share('mongicommerce', AdminSetting::first());
32 32
         }
33 33
 
34
-        if(Schema::hasTable('categories')){
34
+        if (Schema::hasTable('categories')) {
35 35
             //inject global information into views
36 36
             View::share('categories', Template::getStructureCategories());
37 37
         }
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         if ($this->app->runningInConsole()) {
41 41
 
42 42
             $config_file = config_path('mongicommerce.php');
43
-            if(file_exists($config_file)){
43
+            if (file_exists($config_file)) {
44 44
                 File::delete($config_file);
45 45
             }
46 46
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
                 __DIR__.'/../config/config.php' => config_path('mongicommerce.php'),
50 50
             ], 'config');
51 51
 
52
-            if(file_exists(resource_path('/views/mongicommerce'))){
52
+            if (file_exists(resource_path('/views/mongicommerce'))) {
53 53
                 File::deleteDirectory(resource_path('/views/mongicommerce'));
54 54
             }
55 55
             // Publishing the views.
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                 __DIR__.'/../resources/views/shop' => resource_path('/views/mongicommerce'),
58 58
             ], 'views');
59 59
 
60
-            if(file_exists(public_path('/mongicommerce/template'))){
60
+            if (file_exists(public_path('/mongicommerce/template'))) {
61 61
                 File::deleteDirectory(public_path('/mongicommerce/template'));
62 62
             }
63 63
             // Publishing assets.
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'mongicommerce');
88 88
 
89 89
         // Register the main class to use with the facade
90
-        $this->app->singleton('mongicommerce', function () {
90
+        $this->app->singleton('mongicommerce', function() {
91 91
             return new Mongicommerce;
92 92
         });
93 93
     }
Please login to merge, or discard this patch.
src/Http/Controllers/admin/AdminOrdersController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
 
8 8
 class AdminOrdersController
9 9
 {
10
-    public function page(){
10
+    public function page() {
11 11
         $orders = Order::all();
12
-        return view('mongicommerce::admin.pages.orders.orders_list',['orders' => $orders]);
12
+        return view('mongicommerce::admin.pages.orders.orders_list', ['orders' => $orders]);
13 13
     }
14 14
 }
Please login to merge, or discard this patch.