Passed
Push — master ( 3fc932...f1f98d )
by Matthijs
06:22
created
app/Http/Controllers/Frontend/ProductController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
                 $template = 'frontend.product.combinations';
44 44
 
45 45
                 $leadingAttributeId = key(reset($newPullDowns));
46
-                if($productAttributeId) { 
46
+                if ($productAttributeId) { 
47 47
                     $leadingAttributeId = $productAttributeId;
48 48
                 } else {
49 49
                     $productAttributeId = $pullDowns['productAttribute']->first()->id;
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ProductExtraFieldValueController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 
47 47
     public function store($productId, Request $request)
48 48
     {
49
-        $result  = ProductExtraFieldValueService::create($request->all(), $productId);
49
+        $result = ProductExtraFieldValueService::create($request->all(), $productId);
50 50
          return ProductExtraFieldValueService::notificationRedirect(array('product.product-extra-field-value.index', $productId), $result, 'The product extra fields are updated.');
51 51
     }
52 52
 }
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/CouponGroupController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
             $query = CouponService::getGroupModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id);
25 25
 
26 26
             $datatables = \DataTables::of($query)
27
-            ->addColumn('action', function ($query) {
27
+            ->addColumn('action', function($query) {
28 28
                 $deleteLink = Form::deleteajax(url()->route('coupon-group.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger'));
29 29
                 $links = '<a href="'.url()->route('coupon-group.edit', $query->id).'" class="btn btn-sm btn-success"><i class="fi-pencil"></i>Edit</a>  '.$deleteLink;
30 30
                 return $links;
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
     public function store(Request $request)
45 45
     {
46
-        $result  = CouponService::createGroup($request->all());
46
+        $result = CouponService::createGroup($request->all());
47 47
         return CouponService::notificationRedirect('coupon-group.index', $result, 'The coupon group was inserted.');
48 48
     }
49 49
 
@@ -54,13 +54,13 @@  discard block
 block discarded – undo
54 54
 
55 55
     public function update(Request $request, $couponGroupId)
56 56
     {
57
-        $result  = CouponService::updateGroupById($request->all(), $couponGroupId);
57
+        $result = CouponService::updateGroupById($request->all(), $couponGroupId);
58 58
         return CouponService::notificationRedirect('coupon-group.index', $result, 'The coupon group was updated.');
59 59
     }
60 60
 
61 61
     public function destroy($couponGroupId)
62 62
     {
63
-        $result  = CouponService::destroyGroup($couponGroupId);
63
+        $result = CouponService::destroyGroup($couponGroupId);
64 64
 
65 65
         if ($result) {
66 66
             Notification::success('The coupon was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ContentImageController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
             
32 32
             $datatables = DataTables::of($image)
33 33
 
34
-            ->addColumn('thumb', function ($image) {
34
+            ->addColumn('thumb', function($image) {
35 35
                 return '<img src="/files/content/100x100/'.$image->content_id.'/'.$image->file.'"  />';
36 36
             })
37
-            ->addColumn('action', function ($image) use ($contentId) {
38
-                $deleteLink = Form::deleteajax('/admin/content/'.$contentId.'/images/'. $image->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
37
+            ->addColumn('action', function($image) use ($contentId) {
38
+                $deleteLink = Form::deleteajax('/admin/content/'.$contentId.'/images/'.$image->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
39 39
                 $links = '<a href="/admin/content/'.$contentId.'/images/'.$image->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
40 40
 
41 41
                 return $links;
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     public function store(Request $request, $contentId)
57 57
     {
58
-        $result  = ContentService::createImage($request->all(), $contentId);
58
+        $result = ContentService::createImage($request->all(), $contentId);
59 59
         return ContentService::notificationRedirect(array('content.{contentId}.images.index', $contentId), $result, 'The content image was inserted.');
60 60
     }
61 61
 
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
 
68 68
     public function update(Request $request, $contentId, $contentImageId)
69 69
     {
70
-        $result  = ContentService::updateImageById($request->all(), $contentId, $contentImageId);
70
+        $result = ContentService::updateImageById($request->all(), $contentId, $contentImageId);
71 71
         return ContentService::notificationRedirect(array('content.{contentId}.images.index', $contentId), $result, 'The content image was updated.');
72 72
     }
73 73
 
74 74
     public function destroy($contentId, $contentImageId)
75 75
     {
76
-        $result  = ContentService::destroyImage($contentImageId);
76
+        $result = ContentService::destroyImage($contentImageId);
77 77
 
78 78
         if ($result) {
79 79
             Notification::success('The file was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/NewsController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,20 +31,20 @@  discard block
 block discarded – undo
31 31
             ->with(array('newsGroup'))        ->leftJoin(NewsService::getGroupModel()->getTable(), NewsService::getGroupModel()->getTable().'.id', '=', 'news_group_id');
32 32
             
33 33
             $datatables = DataTables::of($query)
34
-            ->filterColumn('title', function ($query, $keyword) {
34
+            ->filterColumn('title', function($query, $keyword) {
35 35
 
36 36
                 $query->where(
37
-                    function ($query) use ($keyword) {
37
+                    function($query) use ($keyword) {
38 38
                         $query->whereRaw("news.title like ?", ["%{$keyword}%"]);
39 39
                         ;
40 40
                     }
41 41
                 );
42 42
             })
43
-            ->addColumn('newsgroup', function ($query) {
43
+            ->addColumn('newsgroup', function($query) {
44 44
                 return $query->newstitle;
45 45
             })
46 46
 
47
-            ->addColumn('action', function ($query) {
47
+            ->addColumn('action', function($query) {
48 48
                 $deleteLink = Form::deleteajax(url()->route('news.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
49 49
                 $links = '<a href="'.url()->route('news.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
50 50
             
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     public function store(Request $request)
67 67
     {
68
-        $result  = NewsService::create($request->all());
68
+        $result = NewsService::create($request->all());
69 69
         return NewsService::notificationRedirect('news.index', $result, 'The news item was inserted.');
70 70
     }
71 71
 
@@ -90,13 +90,13 @@  discard block
 block discarded – undo
90 90
     
91 91
     public function update(Request $request, $newsId)
92 92
     {
93
-        $result  = NewsService::updateById($request->all(), $newsId);
93
+        $result = NewsService::updateById($request->all(), $newsId);
94 94
         return NewsService::notificationRedirect('news.index', $result, 'The news item was inserted.');
95 95
     }
96 96
 
97 97
     public function destroy($newsId)
98 98
     {
99
-        $result  = NewsService::destroy($newsId);
99
+        $result = NewsService::destroy($newsId);
100 100
 
101 101
         if ($result) {
102 102
             Notification::success('The news was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ClientOrderController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -44,16 +44,16 @@  discard block
 block discarded – undo
44 44
             
45 45
             $datatables = DataTables::of($order)
46 46
 
47
-            ->addColumn('status', function ($order) {
47
+            ->addColumn('status', function($order) {
48 48
                 if ($order->orderStatus) {
49 49
                      return $order->orderStatus->title;
50 50
                 }
51 51
             })
52 52
 
53
-            ->addColumn('created_at', function ($order) {
53
+            ->addColumn('created_at', function($order) {
54 54
                 return date('d F H:i', strtotime($order->created_at));
55 55
             })
56
-            ->addColumn('status', function ($order) {
56
+            ->addColumn('status', function($order) {
57 57
                 if ($order->orderStatus) {
58 58
                     if ($order->orderStatus->color) {
59 59
                         return '<a href="/admin/order/'.$order->id.'" style="text-decoration:none;"><span style="background-color:'.$order->orderStatus->color.'; padding: 10px; line-height:30px; text-align:center; color:white;">'.$order->orderStatus->title.'</span></a>';
@@ -61,33 +61,33 @@  discard block
 block discarded – undo
61 61
                     return $order->orderStatus->title;
62 62
                 }
63 63
             })
64
-            ->addColumn('client', function ($order) {
64
+            ->addColumn('client', function($order) {
65 65
                 if ($order->client) {
66 66
                     if ($order->orderBillAddress) {
67 67
                         return $order->orderBillAddress->firstname.' '.$order->orderBillAddress->lastname;
68 68
                     }
69 69
                 }
70 70
             })
71
-            ->addColumn('products', function ($order) {
71
+            ->addColumn('products', function($order) {
72 72
                 if ($order->products) {
73 73
                     return $order->products->count();
74 74
                 }
75 75
             })
76
-            ->addColumn('price_with_tax', function ($order) {
76
+            ->addColumn('price_with_tax', function($order) {
77 77
                 $money = '&euro; '.$order->getPriceWithTaxNumberFormat();
78 78
                 return $money;
79 79
             })
80
-            ->addColumn('paymentMethod', function ($order) {
80
+            ->addColumn('paymentMethod', function($order) {
81 81
                 if ($order->orderPaymentMethod) {
82 82
                     return $order->orderPaymentMethod->title;
83 83
                 }
84 84
             })
85
-            ->addColumn('sendingMethod', function ($order) {
85
+            ->addColumn('sendingMethod', function($order) {
86 86
                 if ($order->orderSendingMethod) {
87 87
                     return $order->orderSendingMethod->title;
88 88
                 }
89 89
             })
90
-            ->addColumn('action', function ($order) {
90
+            ->addColumn('action', function($order) {
91 91
                 $download = '<a href="/admin/order/'.$order->id.'/download" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>Download</a>  ';
92 92
                 $links = '<a href="/admin/order/'.$order->id.'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Show</a>  '.$download;
93 93
             
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ProductCombinationController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -26,23 +26,23 @@  discard block
 block discarded – undo
26 26
     {
27 27
         $product = ProductService::find($productId);
28 28
 
29
-        if($product) {
29
+        if ($product) {
30 30
             if ($request->wantsJson()) {
31 31
 
32 32
                 $query = ProductCombinationService::getModel()->where('product_id', '=', $productId);
33 33
 
34
-                $datatables = \DataTables::of($query)->addColumn('action', function ($query) use ($productId) {
34
+                $datatables = \DataTables::of($query)->addColumn('action', function($query) use ($productId) {
35 35
                     $deleteLink = \Form::deleteajax(url()->route('product-combination.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
36 36
                     $links = '<a href="'.url()->route('product-combination.edit', array('productId' => $productId, 'id' => $query->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
37 37
                 
38 38
                     return $links;
39 39
                 })
40 40
 
41
-                ->addColumn('amount', function ($query) {
41
+                ->addColumn('amount', function($query) {
42 42
                     return '<input type="text" class="change-amount-product-attribute" value="'.$query->amount.'" data-url="/admin/product/'.$query->product_id.'/product-combination/change-amount-attribute/'.$query->id.'">';
43 43
                 })
44 44
 
45
-                ->addColumn('price', function ($query) {
45
+                ->addColumn('price', function($query) {
46 46
                     $result = 0;
47 47
                     if ($query->price) {
48 48
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
                             'amount' => $query->amount
92 92
                             );
93 93
 
94
-                        $result =  '&euro; '.$output['orginal_price_ex_tax_number_format'].' / &euro; '.$output['orginal_price_inc_tax_number_format'];
94
+                        $result = '&euro; '.$output['orginal_price_ex_tax_number_format'].' / &euro; '.$output['orginal_price_inc_tax_number_format'];
95 95
 
96 96
 
97 97
                         if ($query->discount_value) {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                     return $result;
103 103
                 })
104 104
 
105
-                ->addColumn('combinations', function ($query) use ($productId) {
105
+                ->addColumn('combinations', function($query) use ($productId) {
106 106
                     $items = array();
107 107
                     foreach ($query->combinations as $row) {
108 108
                         $items[] = $row->attribute->attributeGroup->title.': '.$row->attribute->value;
@@ -147,8 +147,8 @@  discard block
 block discarded – undo
147 147
 
148 148
     public function store(Request $request, $productId)
149 149
     {
150
-        $result  = ProductCombinationService::create($request->all(), $productId);
151
-        if($result) {
150
+        $result = ProductCombinationService::create($request->all(), $productId);
151
+        if ($result) {
152 152
             return ProductCombinationService::notificationRedirect(array('product-combination.index', $productId), $result, 'The product extra fields are updated.');
153 153
         }
154 154
 
@@ -184,14 +184,14 @@  discard block
 block discarded – undo
184 184
     public function update(Request $request, $productId, $id)
185 185
     {
186 186
 
187
-        $result  = ProductCombinationService::updateById($request->all(), $productId, $id);
187
+        $result = ProductCombinationService::updateById($request->all(), $productId, $id);
188 188
         return ProductCombinationService::notificationRedirect(array('product-combination.index', $productId), $result, 'The product combinations are updated.');
189 189
 
190 190
     }
191 191
 
192 192
     public function destroy($productId, $id)
193 193
     {
194
-        $result  = ProductCombinationService::destroy($id);
194
+        $result = ProductCombinationService::destroy($id);
195 195
 
196 196
         if ($result) {
197 197
             Notification::success('The product combination 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/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.