Passed
Push — master ( 4c8e8d...c6d06b )
by Matthijs
05:44
created
app/Http/Controllers/Backend/ProductAmountOptionController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@  discard block
 block discarded – undo
38 38
 
39 39
     public function index($productId)
40 40
     {   
41
-        $datatable =  new ProductAmountOptionDatatable();
41
+        $datatable = new ProductAmountOptionDatatable();
42 42
         $product = $this->product->find($productId);
43 43
         if (Request::wantsJson()) {
44 44
 
45 45
             $query = $this->productAmountOption->getModel()->where('product_id', '=', $productId);
46 46
             
47
-            $datatables = DataTables::of($query)->addColumn('action', function ($query) use ($productId) {
48
-                $deleteLink = Form::deleteajax('/admin/product/'.$productId.'/product-amount-option/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
47
+            $datatables = DataTables::of($query)->addColumn('action', function($query) use ($productId) {
48
+                $deleteLink = Form::deleteajax('/admin/product/'.$productId.'/product-amount-option/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
49 49
                 $links = '<a href="/admin/product/'.$productId.'/product-amount-option/'.$query->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
50 50
                 
51 51
                 return $links;
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     public function store($productId)
78 78
     {
79 79
 
80
-        $result  = $this->productAmountOption->create(Request::all(), $productId);
80
+        $result = $this->productAmountOption->create(Request::all(), $productId);
81 81
  
82 82
         if (isset($result->id)) {
83 83
             Notification::success('The product amount option is updated.');
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     public function update($productId, $id)
109 109
     {
110 110
 
111
-        $result  = $this->productAmountOption->updateById(Request::all(), $productId, $id);
111
+        $result = $this->productAmountOption->updateById(Request::all(), $productId, $id);
112 112
 
113 113
         if (!$result->id) {
114 114
             return redirect()->back()->withInput()->withErrors($result->errors()->all());
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
     public function destroy($productId, $id)
122 122
     {
123
-        $result  = $this->productAmountOption->destroy($id);
123
+        $result = $this->productAmountOption->destroy($id);
124 124
 
125 125
         if ($result) {
126 126
             Notification::success('The product amount option is deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/HtmlBlockController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -27,18 +27,18 @@  discard block
 block discarded – undo
27 27
             
28 28
             $datatables = DataTables::of($query)
29 29
 
30
-            ->addColumn('active', function ($query) {
30
+            ->addColumn('active', function($query) {
31 31
                 if ($query->active) {
32 32
                     return '<a href="#" class="change-active" data-url="/admin/html-block/change-active/'.$query->id.'"><span class="glyphicon glyphicon-ok icon-green"></span></a>';
33 33
                 }
34 34
                 return '<a href="#" class="change-active" data-url="/admin/html-block/change-active/'.$query->id.'"><span class="glyphicon glyphicon-remove icon-red"></span></a>';
35 35
             })
36
-            ->addColumn('image', function ($query) {
36
+            ->addColumn('image', function($query) {
37 37
                 if ($query->image_file_name) {
38 38
                     return '<img src="'.config('hideyo.public_path').'/html_block/'.$query->id.'/'.$query->image_file_name.'" width="200px" />';
39 39
                 }
40 40
             })
41
-            ->addColumn('action', function ($query) {
41
+            ->addColumn('action', function($query) {
42 42
                 $deleteLink = Form::deleteajax(url()->route('html-block.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
43 43
                 $copy = '<a href="/admin/html-block/'.$query->id.'/copy" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>Copy</a>';
44 44
                 $links = '<a href="'.url()->route('html-block.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$copy.' '.$deleteLink;
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
     public function store(Request $request)
60 60
     {
61
-        $result  = HtmlBlockService::create($request->all());
61
+        $result = HtmlBlockService::create($request->all());
62 62
         return HtmlBlockService::notificationRedirect('html-block.index', $result, 'The html block was inserted.');     
63 63
     }
64 64
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
     public function update(Request $request, $htmlBlockId)
77 77
     {
78
-        $result  = HtmlBlockService::updateById($request->all(), $htmlBlockId);
78
+        $result = HtmlBlockService::updateById($request->all(), $htmlBlockId);
79 79
             return HtmlBlockService::notificationRedirect('html-block.index', $result, 'The html block was updated.');     
80 80
     }
81 81
 
@@ -94,8 +94,8 @@  discard block
 block discarded – undo
94 94
     {
95 95
         $htmlBlock = HtmlBlockService::find($htmlBlockId);
96 96
 
97
-        if($htmlBlock) {
98
-            $result  = HtmlBlockService::createCopy($request->all(), $htmlBlockId);
97
+        if ($htmlBlock) {
98
+            $result = HtmlBlockService::createCopy($request->all(), $htmlBlockId);
99 99
             return HtmlBlockService::notificationRedirect('html-block.index', $result, 'The html block was inserted.');      
100 100
         }
101 101
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
     public function destroy($htmlBlockId)
106 106
     {
107
-        $result  = HtmlBlockService::destroy($htmlBlockId);
107
+        $result = HtmlBlockService::destroy($htmlBlockId);
108 108
 
109 109
         if ($result) {
110 110
             Notification::success('The html block was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ErrorController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
 
22 22
             $query = $this->error->getModel();
23 23
             
24
-            $datatables = \DataTables::of($query)->addColumn('action', function ($query) {
25
-                $deleteLink = \Form::deleteajax('/admin/general-setting/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
24
+            $datatables = \DataTables::of($query)->addColumn('action', function($query) {
25
+                $deleteLink = \Form::deleteajax('/admin/general-setting/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
26 26
                 $links = '<a href="/admin/general-setting/'.$query->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
27 27
             
28 28
                 return $links;
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/CouponController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -33,12 +33,12 @@  discard block
 block discarded – undo
33 33
             ->with(array('couponGroup'));
34 34
             
35 35
             $datatables = DataTables::of($query)
36
-            ->filterColumn('title', function ($query, $keyword) {
36
+            ->filterColumn('title', function($query, $keyword) {
37 37
                 $query->whereRaw("coupon.title like ?", ["%{$keyword}%"]);
38 38
             })
39 39
 
40
-            ->addColumn('action', function ($query) {
41
-                $deleteLink = Form::deleteajax('/admin/coupon/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
40
+            ->addColumn('action', function($query) {
41
+                $deleteLink = Form::deleteajax('/admin/coupon/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
42 42
                 $links = '<a href="/admin/coupon/'.$query->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
43 43
             
44 44
                 return $links;
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
     public function store(Request $request)
65 65
     {
66
-        $result  = CouponService::create($request->all());
66
+        $result = CouponService::create($request->all());
67 67
         return CouponService::notificationRedirect('coupon.index', $result, 'The coupon was inserted.');
68 68
     }
69 69
 
@@ -83,13 +83,13 @@  discard block
 block discarded – undo
83 83
 
84 84
     public function update(Request $request, $couponId)
85 85
     {
86
-        $result  = CouponService::updateById($request->all(), $couponId);
86
+        $result = CouponService::updateById($request->all(), $couponId);
87 87
         return CouponService::notificationRedirect('coupon.index', $result, 'The coupon was updated.');
88 88
     }
89 89
 
90 90
     public function destroy($couponId)
91 91
     {
92
-        $result  = CouponService::destroy($couponId);
92
+        $result = CouponService::destroy($couponId);
93 93
 
94 94
         if ($result) {
95 95
             Notification::success('The coupon was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/OrderStatusController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
             
26 26
             $datatables = \DataTables::of($query)
27 27
 
28
-            ->addColumn('title', function ($query) {
28
+            ->addColumn('title', function($query) {
29 29
      
30 30
                 if ($query->color) {
31 31
                     return '<span style="background-color:'.$query->color.'; padding: 10px; line-height:30px; text-align:center; color:white;">'.$query->title.'</span>';
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
                 return $query->title;
35 35
             })
36 36
 
37
-            ->addColumn('action', function ($query) {
38
-                $deleteLink = Form::deleteajax('/admin/order-status/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
37
+            ->addColumn('action', function($query) {
38
+                $deleteLink = Form::deleteajax('/admin/order-status/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
39 39
                 $links = '<a href="/admin/order-status/'.$query->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
40 40
             
41 41
                 return $links;
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
     public function store(Request $request)
56 56
     {
57
-        $result  = OrderStatusService::create($request->all());
57
+        $result = OrderStatusService::create($request->all());
58 58
         return OrderStatusService::notificationRedirect('order-status.index', $result, 'The order status was inserted.');
59 59
     }
60 60
 
@@ -75,13 +75,13 @@  discard block
 block discarded – undo
75 75
 
76 76
     public function update(Request $request, $orderStatusId)
77 77
     {
78
-        $result  = OrderStatusService::updateById($request->all(), $orderStatusId);
78
+        $result = OrderStatusService::updateById($request->all(), $orderStatusId);
79 79
         return OrderStatusService::notificationRedirect('order-status.index', $result, 'The order status was updated.');
80 80
     }
81 81
 
82 82
     public function destroy($orderStatusId)
83 83
     {
84
-        $result  = OrderStatusService::destroy($orderStatusId);
84
+        $result = OrderStatusService::destroy($orderStatusId);
85 85
 
86 86
         if ($result) {
87 87
             Notification::success('The order status was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ShopController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,13 +25,13 @@
 block discarded – undo
25 25
 
26 26
             $datatables = DataTables::of($query)
27 27
 
28
-            ->addColumn('action', function ($query) {
28
+            ->addColumn('action', function($query) {
29 29
                 $deleteLink = Form::deleteajax(url()->route('shop.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
30 30
                 $links = '<a href="'.url()->route('shop.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
31 31
                 return $links;
32 32
             })
33 33
 
34
-            ->addColumn('image', function ($query) {
34
+            ->addColumn('image', function($query) {
35 35
                 if ($query->logo_file_name) {
36 36
                     return '<img src="http://shop.brulo.nl/files/'.$query->id.'/logo/'.$query->logo_file_name.'"  />';
37 37
                 }
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/OrderStatusEmailTemplateController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
             $query = OrderStatusEmailTemplateService::getModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id);
25 25
             
26 26
             $datatables = DataTables::of($query)
27
-            ->addColumn('action', function ($query) {
28
-                $deleteLink = Form::deleteajax('/admin/order-status-email-template/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
27
+            ->addColumn('action', function($query) {
28
+                $deleteLink = Form::deleteajax('/admin/order-status-email-template/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
29 29
                 $links = '<a href="/admin/order-status-email-template/'.$query->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
30 30
             
31 31
                 return $links;
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
     public function store(Request $request)
46 46
     {
47
-        $result  = OrderStatusEmailTemplateService::create($request->all());
47
+        $result = OrderStatusEmailTemplateService::create($request->all());
48 48
         return OrderStatusEmailTemplateService::notificationRedirect('order-status-email-template.index', $result, 'The template was inserted.');
49 49
     }
50 50
 
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
 
61 61
     public function update(Request $request, $templateId)
62 62
     {
63
-        $result  = OrderStatusEmailTemplateService::updateById($request->all(), $templateId);
63
+        $result = OrderStatusEmailTemplateService::updateById($request->all(), $templateId);
64 64
         return OrderStatusEmailTemplateService::notificationRedirect('order-status-email-template.index', $result, 'The template was updated.');
65 65
     }
66 66
 
67 67
     public function destroy($templateId)
68 68
     {
69
-        $result  = OrderStatusEmailTemplateService::destroy($templateId);
69
+        $result = OrderStatusEmailTemplateService::destroy($templateId);
70 70
 
71 71
         if ($result) {
72 72
             Notification::success('template was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/NewsGroupController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
             $query = NewsService::getGroupModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id);
24 24
 
25 25
             $datatables = \DataTables::of($query)
26
-            ->addColumn('action', function ($query) {
26
+            ->addColumn('action', function($query) {
27 27
                 $deleteLink = \Form::deleteajax(url()->route('news-group.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
28 28
                 $links = '<a href="'.url()->route('news-group.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
29 29
             
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
     public function store(Request $request)
46 46
     {
47
-        $result  = NewsService::createGroup($request->all());
47
+        $result = NewsService::createGroup($request->all());
48 48
         return NewsService::notificationRedirect('news-group.index', $result, 'The news group was inserted.');
49 49
     }
50 50
 
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
 
56 56
     public function update(Request $request, $newsGroupId)
57 57
     {
58
-        $result  = NewsService::updateGroupById($request->all(), $newsGroupId);
58
+        $result = NewsService::updateGroupById($request->all(), $newsGroupId);
59 59
         return NewsService::notificationRedirect('news-group.index', $result, 'The news group was updated.');
60 60
     }
61 61
 
62 62
     public function destroy($newsGroupId)
63 63
     {
64
-        $result  = NewsService::destroyGroup($newsGroupId);
64
+        $result = NewsService::destroyGroup($newsGroupId);
65 65
 
66 66
         if ($result) {
67 67
             Notification::success('The news group was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ExtraFieldDefaultValueController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
             $query = ExtraFieldService::getValueModel()->where('extra_field_id', '=', $extraFieldId);
25 25
             
26
-            $datatables = DataTables::of($query)->addColumn('action', function ($query) use ($extraFieldId) {
26
+            $datatables = DataTables::of($query)->addColumn('action', function($query) use ($extraFieldId) {
27 27
                 $deleteLink = Form::deleteajax(url()->route('extra-field.values.destroy', array('ExtraFieldId' => $extraFieldId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
28 28
                 $links = ' <a href="'.url()->route('extra-field.values.edit', array('ExtraFieldId' => $extraFieldId, 'id' => $query->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> 
29 29
                 '.$deleteLink;
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
     public function store(Request $request, $extraFieldId)
46 46
     {
47
-        $result  = ExtraFieldService::createValue($request->all(), $extraFieldId);
47
+        $result = ExtraFieldService::createValue($request->all(), $extraFieldId);
48 48
         return ExtraFieldService::notificationRedirect(array('extra-field.values.index', $extraFieldId), $result, 'The extra field was inserted.');
49 49
     }
50 50
 
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
 
56 56
     public function update(Request $request, $extraFieldId, $id)
57 57
     {
58
-        $result  = ExtraFieldService::updateValueById($request->all(), $extraFieldId, $id);
58
+        $result = ExtraFieldService::updateValueById($request->all(), $extraFieldId, $id);
59 59
         return ExtraFieldService::notificationRedirect(array('extra-field.values.index', $extraFieldId), $result, 'The extra field was updated.');
60 60
     }
61 61
 
62 62
     public function destroy($extraFieldId, $id)
63 63
     {
64
-        $result  = ExtraFieldService::destroyValue($id);
64
+        $result = ExtraFieldService::destroyValue($id);
65 65
 
66 66
         if ($result) {
67 67
             Notification::success('Extra field was deleted.');
Please login to merge, or discard this patch.