Passed
Push — master ( d7fff5...b4538b )
by Matthijs
06:20
created
app/Http/Controllers/Backend/AttributeGroupController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         if ($request->wantsJson()) {
31 31
             $query = AttributeService::getGroupModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id);
32 32
             
33
-            $datatables = DataTables::of($query)->addColumn('action', function ($query) {
33
+            $datatables = DataTables::of($query)->addColumn('action', function($query) {
34 34
                 $deleteLink = Form::deleteajax(url()->route('attribute-group.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
35 35
                 $links = '
36 36
                     <a href="'.url()->route('attribute.index', $query->id).'" class="btn btn-sm btn-info"><i class="entypo-pencil"></i>'.$query->attributes->count().' Attributes</a>
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
     public function store(Request $request)
54 54
     {
55
-        $result  = AttributeService::createGroup($request->all());
55
+        $result = AttributeService::createGroup($request->all());
56 56
         return AttributeService::notificationRedirect('attribute-group.index', $result, 'The attribute group was inserted.');
57 57
     }
58 58
 
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
 
64 64
     public function update(Request $request, $attributeGroupId)
65 65
     {
66
-        $result  = AttributeService::updateGroupById($request->all(), $attributeGroupId);
66
+        $result = AttributeService::updateGroupById($request->all(), $attributeGroupId);
67 67
         return AttributeService::notificationRedirect('attribute-group.index', $result, 'The attribute group was updated.');
68 68
     }
69 69
 
70 70
     public function destroy($attributeGroupId)
71 71
     {
72
-        $result  = AttributeService::destroyGroup($attributeGroupId);
72
+        $result = AttributeService::destroyGroup($attributeGroupId);
73 73
 
74 74
         if ($result) {
75 75
             Notification::success('Attribute group was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/RedirectController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@  discard block
 block discarded – undo
25 25
             $query = RedirectService::selectAll();
26 26
             $datatables = \DataTables::of($query)
27 27
 
28
-            ->addColumn('url', function ($query) {
28
+            ->addColumn('url', function($query) {
29 29
                 return '<a href="'.$query->url.'" target="_blank">'.$query->url.'</a>';
30 30
             })
31 31
 
32
-            ->addColumn('action', function ($query) {
32
+            ->addColumn('action', function($query) {
33 33
                 $deleteLink = \Form::deleteajax(url()->route('redirect.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
34 34
                 $links = '<a href="'.url()->route('redirect.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
35 35
             
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     public function store()
53 53
     {
54
-        $result  = RedirectService::create(Request::all());
54
+        $result = RedirectService::create(Request::all());
55 55
         return RedirectService::notificationRedirect('redirect.index', $result, 'The redirect was inserted.');
56 56
     }
57 57
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     public function postImport()
73 73
     {
74 74
         $file = Request::file('file');
75
-        Excel::load($file, function ($reader) {
75
+        Excel::load($file, function($reader) {
76 76
 
77 77
             $results = $reader->get();
78 78
 
@@ -91,11 +91,11 @@  discard block
 block discarded – undo
91 91
 
92 92
     public function getExport()
93 93
     {
94
-        $result  =  RedirectService::selectAll();
94
+        $result = RedirectService::selectAll();
95 95
 
96
-        Excel::create('redirects', function ($excel) use ($result) {
96
+        Excel::create('redirects', function($excel) use ($result) {
97 97
 
98
-            $excel->sheet('Redirects', function ($sheet) use ($result) {
98
+            $excel->sheet('Redirects', function($sheet) use ($result) {
99 99
                 $newArray = array();
100 100
                 foreach ($result as $row) {
101 101
                     $newArray[$row->id] = array(
@@ -112,13 +112,13 @@  discard block
 block discarded – undo
112 112
 
113 113
     public function update($redirectId)
114 114
     {
115
-        $result  = RedirectService::updateById(Request::all(), $redirectId);
115
+        $result = RedirectService::updateById(Request::all(), $redirectId);
116 116
         return RedirectService::notificationRedirect('redirect.index', $result, 'The redirect was updated.');
117 117
     }
118 118
 
119 119
     public function destroy($redirectId)
120 120
     {
121
-        $result  = RedirectService::destroy($redirectId);
121
+        $result = RedirectService::destroy($redirectId);
122 122
 
123 123
         if ($result) {
124 124
             Notification::success('Redirect item is deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/SendingMethodCountryPriceController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
                 'name']
31 31
             )->where('sending_method_id', '=', $sendingMethodId);
32 32
             
33
-            $datatables = \DataTables::of($users)->addColumn('action', function ($users) use ($sendingMethodId) {
33
+            $datatables = \DataTables::of($users)->addColumn('action', function($users) use ($sendingMethodId) {
34 34
                 $delete = \Form::deleteajax(url()->route('sending-method.country-prices.destroy', array('sendingMethodId' => $sendingMethodId, 'id' => $users->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
35 35
                 $link = '<a href="'.url()->route('sending-method.country-prices.edit', array('sendingMethodId' => $sendingMethodId, 'id' => $users->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$delete;
36 36
             
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
         $countries = \Excel::load($file, function($reader) {
66 66
         })->get();
67 67
 
68
-        if($countries) {
69
-            $result  = SendingMethodService::importCountries($countries, $request->get('tax_rate_id'), $sendingMethodId);
68
+        if ($countries) {
69
+            $result = SendingMethodService::importCountries($countries, $request->get('tax_rate_id'), $sendingMethodId);
70 70
             Notification::success('The countries are inserted.');
71 71
             return redirect()->route('sending-method.country-prices.index', $sendingMethodId);
72 72
         }         
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
     public function store(Request $request, $sendingMethodId)
76 76
     {
77
-        $result  = SendingMethodService::createCountry($request->all(), $sendingMethodId);
77
+        $result = SendingMethodService::createCountry($request->all(), $sendingMethodId);
78 78
         return SendingMethodService::notificationRedirect(array('sending-method.country-prices.index', $sendingMethodId), $result, 'The country was inserted.');
79 79
     }
80 80
 
@@ -89,13 +89,13 @@  discard block
 block discarded – undo
89 89
 
90 90
     public function update(Request $request, $sendingMethodId, $id)
91 91
     {
92
-        $result  = SendingMethodService::updateCountryById($request->all(), $id);
92
+        $result = SendingMethodService::updateCountryById($request->all(), $id);
93 93
         return SendingMethodService::notificationRedirect(array('sending-method.country-prices.index', $sendingMethodId), $result, 'The country was updated.');
94 94
     }
95 95
 
96 96
     public function destroy($sendingMethodId, $id)
97 97
     {
98
-        $result  = SendingMethodService::destroyCountry($id);
98
+        $result = SendingMethodService::destroyCountry($id);
99 99
 
100 100
         if ($result) {
101 101
             Notification::success('The country price was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/GeneralSettingController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
             $query = GeneralSettingService::getModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id);
18 18
             
19
-            $datatables = DataTables::of($query)->addColumn('action', function ($query) {
19
+            $datatables = DataTables::of($query)->addColumn('action', function($query) {
20 20
                 $deleteLink = Form::deleteajax(url()->route('general-setting.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger'));
21 21
                 $links = '<a href="'.url()->route('general-setting.edit', $query->id).'" class="btn btn-sm btn-success"><i class="fi-pencil"></i>Edit</a>  '.$deleteLink;
22 22
                 return $links;
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function store(Request $request)
37 37
     {
38
-        $result  = GeneralSettingService::create($request->all());
38
+        $result = GeneralSettingService::create($request->all());
39 39
         return GeneralSettingService::notificationRedirect('general-setting.index', $result, 'The general setting was inserted.');
40 40
     }
41 41
 
@@ -46,13 +46,13 @@  discard block
 block discarded – undo
46 46
 
47 47
     public function update(Request $request, $generalSettingId)
48 48
     {
49
-        $result  = GeneralSettingService::updateById($request->all(), $generalSettingId);
49
+        $result = GeneralSettingService::updateById($request->all(), $generalSettingId);
50 50
         return GeneralSettingService::notificationRedirect('general-setting.index', $result, 'The general setting was updated.');
51 51
     }
52 52
 
53 53
     public function destroy($generalSettingId)
54 54
     {
55
-        $result  = GeneralSettingService::destroy($generalSettingId);
55
+        $result = GeneralSettingService::destroy($generalSettingId);
56 56
         if ($result) {
57 57
             Notification::error('The general setting was deleted.');
58 58
             return redirect()->route('general-setting.index');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/BrandController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         if ($request->wantsJson()) {
23 23
             $brand = BrandService::getModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id);
24 24
             
25
-            $datatables = DataTables::of($brand)->addColumn('action', function ($query) {
25
+            $datatables = DataTables::of($brand)->addColumn('action', function($query) {
26 26
                 $deleteLink = Form::deleteajax(url()->route('brand.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'), $query->title);
27 27
                 $links = '<a href="'.url()->route('brand.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
28 28
             
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
     public function store(Request $request)
44 44
     {
45
-        $result  = BrandService::create($request->all());
45
+        $result = BrandService::create($request->all());
46 46
         return BrandService::notificationRedirect('brand.index', $result, 'The brand was inserted.');
47 47
     }
48 48
 
@@ -53,13 +53,13 @@  discard block
 block discarded – undo
53 53
 
54 54
     public function update(Request $request, $brandId)
55 55
     {
56
-        $result  = BrandService::updateById($request->all(), $brandId);
56
+        $result = BrandService::updateById($request->all(), $brandId);
57 57
         return BrandService::notificationRedirect('brand.index', $result, 'The brand was updated.');
58 58
     }
59 59
 
60 60
     public function destroy($brandId)
61 61
     {
62
-        $result  = BrandService::destroy($brandId);
62
+        $result = BrandService::destroy($brandId);
63 63
         if ($result) {
64 64
             Notification::error('The brand was deleted.');
65 65
             return redirect()->route('brand.index');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ProductRelatedProductController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,13 +25,13 @@  discard block
 block discarded – undo
25 25
             $query = ProductRelatedProductService::getModel()->where('product_id', '=', $productId);
26 26
             
27 27
             $datatables = \DataTables::of($query)
28
-                ->addColumn('related', function ($query) use ($productId) {
28
+                ->addColumn('related', function($query) use ($productId) {
29 29
                     return $query->RelatedProduct->title;
30 30
                 })
31
-                ->addColumn('product', function ($query) use ($productId) {
31
+                ->addColumn('product', function($query) use ($productId) {
32 32
                     return $query->Product->title;
33 33
                 })
34
-                ->addColumn('action', function ($query) use ($productId) {
34
+                ->addColumn('action', function($query) use ($productId) {
35 35
                     $deleteLink = \Form::deleteajax(url()->route('product.related-product.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
36 36
                     
37 37
                     return $deleteLink;
@@ -52,13 +52,13 @@  discard block
 block discarded – undo
52 52
     
53 53
     public function store(Request $request, $productId)
54 54
     {
55
-        $result  = ProductRelatedProductService::create($request->all(), $productId);
55
+        $result = ProductRelatedProductService::create($request->all(), $productId);
56 56
         return redirect()->route('product.related-product.index', $productId);
57 57
     }
58 58
 
59 59
     public function destroy($productId, $productRelatedProductId)
60 60
     {
61
-        $result  = ProductRelatedProductService::destroy($productRelatedProductId);
61
+        $result = ProductRelatedProductService::destroy($productRelatedProductId);
62 62
 
63 63
         if ($result) {
64 64
             Notification::success('The related product is deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/FaqItemController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,10 +34,10 @@  discard block
 block discarded – undo
34 34
             ->where('faq_item.shop_id', '=', auth('hideyobackend')->user()->selected_shop_id);
35 35
 
36 36
             $datatables = DataTables::of($query)
37
-            ->addColumn('faqitemgroup', function ($query) {
37
+            ->addColumn('faqitemgroup', function($query) {
38 38
                 return $query->grouptitle;
39 39
             })
40
-            ->addColumn('action', function ($query) {
40
+            ->addColumn('action', function($query) {
41 41
                 $deleteLink = Form::deleteajax(url()->route('faq.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
42 42
                 $links = '<a href="'.url()->route('faq.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
43 43
             
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
     public function store(Request $request)
60 60
     {
61
-        $result  = FaqService::create($request->all());
61
+        $result = FaqService::create($request->all());
62 62
         return FaqService::notificationRedirect('faq.index', $result, 'FaqItem was inserted.');
63 63
     }
64 64
 
@@ -70,13 +70,13 @@  discard block
 block discarded – undo
70 70
 
71 71
     public function update(Request $request, $faqId)
72 72
     {
73
-        $result  = FaqService::updateById($request->all(), $faqId);
73
+        $result = FaqService::updateById($request->all(), $faqId);
74 74
         return FaqService::notificationRedirect('faq.index', $result, 'FaqItem was updated.');
75 75
     }
76 76
 
77 77
     public function destroy($faqItemId)
78 78
     {
79
-        $result  = FaqService::destroy($faqItemId);
79
+        $result = FaqService::destroy($faqItemId);
80 80
 
81 81
         if ($result) {
82 82
             Notification::success('The faq was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/PaymentMethodController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,22 +27,22 @@  discard block
 block discarded – undo
27 27
             
28 28
             $datatables = DataTables::of($query)
29 29
 
30
-            ->addColumn('orderconfirmed', function ($query) {
30
+            ->addColumn('orderconfirmed', function($query) {
31 31
                 if ($query->orderConfirmedOrderStatus) {
32 32
                     return $query->orderConfirmedOrderStatus->title;
33 33
                 }
34 34
             })
35
-            ->addColumn('paymentcompleted', function ($query) {
35
+            ->addColumn('paymentcompleted', function($query) {
36 36
                 if ($query->orderPaymentCompletedOrderStatus) {
37 37
                     return $query->orderPaymentCompletedOrderStatus->title;
38 38
                 }
39 39
             })
40
-            ->addColumn('paymentfailed', function ($query) {
40
+            ->addColumn('paymentfailed', function($query) {
41 41
                 if ($query->orderPaymentFailedOrderStatus) {
42 42
                     return $query->orderPaymentFailedOrderStatus->title;
43 43
                 }
44 44
             })
45
-            ->addColumn('action', function ($query) {
45
+            ->addColumn('action', function($query) {
46 46
                 $deleteLink = Form::deleteajax(url()->route('payment-method.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger'));
47 47
                 $links = '<a href="'.url()->route('payment-method.edit', $query->id).'" class="btn btn-sm btn-success"><i class="fi-pencil"></i>Edit</a>  '.$deleteLink;
48 48
                 return $links;
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
     public function store(Request $request)
69 69
     {
70
-        $result  = PaymentMethodService::create($request->all());
70
+        $result = PaymentMethodService::create($request->all());
71 71
         return PaymentMethodService::notificationRedirect('payment-method.index', $result, 'The payment method was inserted.');
72 72
     }
73 73
 
@@ -84,13 +84,13 @@  discard block
 block discarded – undo
84 84
 
85 85
     public function update(Request $request, $paymentMethodId)
86 86
     {
87
-        $result  = PaymentMethodService::updateById($request->all(), $paymentMethodId);
87
+        $result = PaymentMethodService::updateById($request->all(), $paymentMethodId);
88 88
         return PaymentMethodService::notificationRedirect('payment-method.index', $result, 'The payment method was updated.');
89 89
     }
90 90
 
91 91
     public function destroy($paymentMethodId)
92 92
     {
93
-        $result  = PaymentMethodService::destroy($paymentMethodId);
93
+        $result = PaymentMethodService::destroy($paymentMethodId);
94 94
 
95 95
         if ($result) {
96 96
             Notification::success('The payment method was deleted.');
Please login to merge, or discard this patch.