Passed
Push — master ( aa6221...1beb6d )
by Matthijs
15:26
created
app/Http/Controllers/Backend/NewsController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,20 +36,20 @@  discard block
 block discarded – undo
36 36
             ->with(array('newsGroup'))        ->leftJoin(NewsService::getGroupModel()->getTable(), NewsService::getGroupModel()->getTable().'.id', '=', 'news_group_id');
37 37
             
38 38
             $datatables = Datatables::of($query)
39
-            ->filterColumn('title', function ($query, $keyword) {
39
+            ->filterColumn('title', function($query, $keyword) {
40 40
 
41 41
                 $query->where(
42
-                    function ($query) use ($keyword) {
42
+                    function($query) use ($keyword) {
43 43
                         $query->whereRaw("news.title like ?", ["%{$keyword}%"]);
44 44
                         ;
45 45
                     }
46 46
                 );
47 47
             })
48
-            ->addColumn('newsgroup', function ($query) {
48
+            ->addColumn('newsgroup', function($query) {
49 49
                 return $query->newstitle;
50 50
             })
51 51
 
52
-            ->addColumn('action', function ($query) {
52
+            ->addColumn('action', function($query) {
53 53
                 $deleteLink = Form::deleteajax(url()->route('news.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
54 54
                 $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;
55 55
             
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
     public function store()
72 72
     {
73
-        $result  = NewsService::create($this->request->all());
73
+        $result = NewsService::create($this->request->all());
74 74
         return NewsService::notificationRedirect('news.index', $result, 'The news item was inserted.');
75 75
     }
76 76
 
@@ -95,13 +95,13 @@  discard block
 block discarded – undo
95 95
     
96 96
     public function update($newsId)
97 97
     {
98
-        $result  = NewsService::updateById($this->request->all(), $newsId);
98
+        $result = NewsService::updateById($this->request->all(), $newsId);
99 99
         return NewsService::notificationRedirect('news.index', $result, 'The news item was inserted.');
100 100
     }
101 101
 
102 102
     public function destroy($newsId)
103 103
     {
104
-        $result  = NewsService::destroy($newsId);
104
+        $result = NewsService::destroy($newsId);
105 105
 
106 106
         if ($result) {
107 107
             Notification::success('The news 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
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             )->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id);
39 39
 
40 40
             $datatables = \Datatables::of($query)
41
-            ->addColumn('action', function ($query) {
41
+            ->addColumn('action', function($query) {
42 42
                 $deleteLink = \Form::deleteajax(url()->route('news-group.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
43 43
                 $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;
44 44
             
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
     public function store()
61 61
     {
62
-        $result  = NewsService::createGroup($this->request->all());
62
+        $result = NewsService::createGroup($this->request->all());
63 63
         return NewsService::notificationRedirect('news-group.index', $result, 'The news group was inserted.');
64 64
     }
65 65
 
@@ -70,13 +70,13 @@  discard block
 block discarded – undo
70 70
 
71 71
     public function update($newsGroupId)
72 72
     {
73
-        $result  = NewsService::updateGroupById($this->request->all(), $newsGroupId);
73
+        $result = NewsService::updateGroupById($this->request->all(), $newsGroupId);
74 74
         return NewsService::notificationRedirect('news-group.index', $result, 'The news group was updated.');
75 75
     }
76 76
 
77 77
     public function destroy($newsGroupId)
78 78
     {
79
-        $result  = NewsService::destroyGroup($newsGroupId);
79
+        $result = NewsService::destroyGroup($newsGroupId);
80 80
 
81 81
         if ($result) {
82 82
             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
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
                 'value']
34 34
             )->where('extra_field_id', '=', $extraFieldId);
35 35
             
36
-            $datatables = Datatables::of($query)->addColumn('action', function ($query) use ($extraFieldId) {
36
+            $datatables = Datatables::of($query)->addColumn('action', function($query) use ($extraFieldId) {
37 37
                 $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'));
38 38
                 $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> 
39 39
                 '.$deleteLink;
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
     public function store($extraFieldId)
56 56
     {
57
-        $result  = ExtraFieldService::createValue($this->request->all(), $extraFieldId);
57
+        $result = ExtraFieldService::createValue($this->request->all(), $extraFieldId);
58 58
         return ExtraFieldService::notificationRedirect(array('extra-field.values.index', $extraFieldId), $result, 'The extra field was inserted.');
59 59
     }
60 60
 
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
 
66 66
     public function update($extraFieldId, $id)
67 67
     {
68
-        $result  = ExtraFieldService::updateValueById($this->request->all(), $extraFieldId, $id);
68
+        $result = ExtraFieldService::updateValueById($this->request->all(), $extraFieldId, $id);
69 69
         return ExtraFieldService::notificationRedirect(array('extra-field.values.index', $extraFieldId), $result, 'The extra field was updated.');
70 70
     }
71 71
 
72 72
     public function destroy($extraFieldId, $id)
73 73
     {
74
-        $result  = ExtraFieldService::destroyValue($id);
74
+        $result = ExtraFieldService::destroyValue($id);
75 75
 
76 76
         if ($result) {
77 77
             Notification::success('Extra field was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ProductAmountOptionController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -38,16 +38,16 @@  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()->select(
46
-                ['id', 'amount','default_on']
46
+                ['id', 'amount', 'default_on']
47 47
             )->where('product_id', '=', $productId);
48 48
             
49
-            $datatables = Datatables::of($query)->addColumn('action', function ($query) use ($productId) {
50
-                $deleteLink = Form::deleteajax('/admin/product/'.$productId.'/product-amount-option/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
49
+            $datatables = Datatables::of($query)->addColumn('action', function($query) use ($productId) {
50
+                $deleteLink = Form::deleteajax('/admin/product/'.$productId.'/product-amount-option/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
51 51
                 $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;
52 52
                 
53 53
                 return $links;
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     public function store($productId)
80 80
     {
81 81
 
82
-        $result  = $this->productAmountOption->create(Request::all(), $productId);
82
+        $result = $this->productAmountOption->create(Request::all(), $productId);
83 83
  
84 84
         if (isset($result->id)) {
85 85
             Notification::success('The product amount option is updated.');
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     public function update($productId, $id)
111 111
     {
112 112
 
113
-        $result  = $this->productAmountOption->updateById(Request::all(), $productId, $id);
113
+        $result = $this->productAmountOption->updateById(Request::all(), $productId, $id);
114 114
 
115 115
         if (!$result->id) {
116 116
             return redirect()->back()->withInput()->withErrors($result->errors()->all());
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 
123 123
     public function destroy($productId, $id)
124 124
     {
125
-        $result  = $this->productAmountOption->destroy($id);
125
+        $result = $this->productAmountOption->destroy($id);
126 126
 
127 127
         if ($result) {
128 128
             Notification::success('The product amount option is deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ClientOrderController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 
47 47
             ->addColumn('status', function ($order) {
48 48
                 if ($order->orderStatus) {
49
-                     return $order->orderStatus->title;
49
+                        return $order->orderStatus->title;
50 50
                 }
51 51
             })
52 52
 
Please login to merge, or discard this 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/UserController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
     public function index()
24 24
     {
25 25
         if (Request::wantsJson()) {
26
-            $query = UserService::getModel()->select(['id','email', 'username']);
27
-            $datatables = \Datatables::of($query)->addColumn('action', function ($query) {
26
+            $query = UserService::getModel()->select(['id', 'email', 'username']);
27
+            $datatables = \Datatables::of($query)->addColumn('action', function($query) {
28 28
                 $deleteLink = \Form::deleteajax(url()->route('user.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
29 29
                 $links = '<a href="'.url()->route('user.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
30 30
             
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
     public function store()
47 47
     {
48
-        $result  = UserService::signup(Request::all());
48
+        $result = UserService::signup(Request::all());
49 49
         return UserService::notificationRedirect('user.index', $result, 'The user was inserted.');
50 50
     }
51 51
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         }
74 74
 
75 75
         $shop = ShopService::find($shopId);
76
-        $result  = UserService::updateShopProfileById($shop, $id);
76
+        $result = UserService::updateShopProfileById($shop, $id);
77 77
         Notification::success('The shop changed.');
78 78
         return redirect()->route('shop.index');
79 79
     }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             $id = auth()->id();
85 85
         }
86 86
 
87
-        $result  = UserService::updateProfileById(Request::all(), Request::file('avatar'), $id);
87
+        $result = UserService::updateProfileById(Request::all(), Request::file('avatar'), $id);
88 88
         return UserService::notificationRedirect('user.index', $result, 'The user was updated.');
89 89
     }
90 90
 
@@ -106,13 +106,13 @@  discard block
 block discarded – undo
106 106
 
107 107
     public function update($id)
108 108
     {
109
-        $result  = UserService::updateById(Request::all(), Request::file('avatar'), $id);
109
+        $result = UserService::updateById(Request::all(), Request::file('avatar'), $id);
110 110
         return UserService::notificationRedirect('user.index', $result, 'The user was updated.');
111 111
     }
112 112
 
113 113
     public function destroy($id)
114 114
     {
115
-        $result  = UserService::destroy($id);
115
+        $result = UserService::destroy($id);
116 116
 
117 117
         if ($result) {
118 118
             Notification::success('The user was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/NewsImageController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
             
35 35
             $datatables = Datatables::of($image)
36 36
 
37
-            ->addColumn('thumb', function ($image) use ($newsId) {
37
+            ->addColumn('thumb', function($image) use ($newsId) {
38 38
 
39 39
 
40 40
                 return '<img src="/files/news/100x100/'.$image->news_id.'/'.$image->file.'"  />';
41 41
             })
42 42
 
43 43
 
44
-            ->addColumn('action', function ($image) use ($newsId) {
44
+            ->addColumn('action', function($image) use ($newsId) {
45 45
                 $deleteLink = Form::deleteajax(url()->route('news-images.destroy', array('newsId' => $newsId, 'id' => $image->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
46 46
                 $links = '<a href="'.url()->route('news-images.edit', array('newsId' => $newsId, 'id' => $image->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
47 47
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
     public function store($newsId)
64 64
     {
65
-        $result  = NewsService::createImage($this->request->all(), $newsId);
65
+        $result = NewsService::createImage($this->request->all(), $newsId);
66 66
         return NewsService::notificationRedirect(array('news-images.index', $newsId), $result, 'The news image was inserted.');
67 67
     }
68 68
 
@@ -74,13 +74,13 @@  discard block
 block discarded – undo
74 74
 
75 75
     public function update($newsId, $newsImageId)
76 76
     {
77
-        $result  = NewsService::updateImageById($this->request->all(), $newsId, $newsImageId);
77
+        $result = NewsService::updateImageById($this->request->all(), $newsId, $newsImageId);
78 78
         return NewsService::notificationRedirect(array('news-images.index', $newsId), $result, 'The news image was updated.');
79 79
     }
80 80
 
81 81
     public function destroy($newsId, $newsImageId)
82 82
     {
83
-        $result  = NewsService::destroyImage($newsImageId);
83
+        $result = NewsService::destroyImage($newsImageId);
84 84
 
85 85
         if ($result) {
86 86
             Notification::success('The file was 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
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
                 'name']
37 37
             )->where('sending_method_id', '=', $sendingMethodId);
38 38
             
39
-            $datatables = \Datatables::of($users)->addColumn('action', function ($users) use ($sendingMethodId) {
39
+            $datatables = \Datatables::of($users)->addColumn('action', function($users) use ($sendingMethodId) {
40 40
                 $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'));
41 41
                 $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;
42 42
             
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
         $countries = \Excel::load($file, function($reader) {
72 72
         })->get();
73 73
 
74
-        if($countries) {
75
-            $result  = SendingMethodService::importCountries($countries, $this->request->get('tax_rate_id'), $sendingMethodId);
74
+        if ($countries) {
75
+            $result = SendingMethodService::importCountries($countries, $this->request->get('tax_rate_id'), $sendingMethodId);
76 76
             Notification::success('The countries are inserted.');
77 77
             return redirect()->route('sending-method.country-prices.index', $sendingMethodId);
78 78
         }         
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
     public function store($sendingMethodId)
82 82
     {
83
-        $result  = SendingMethodService::createCountry($this->request->all(), $sendingMethodId);
83
+        $result = SendingMethodService::createCountry($this->request->all(), $sendingMethodId);
84 84
         return SendingMethodService::notificationRedirect(array('sending-method.country-prices.index', $sendingMethodId), $result, 'The country was inserted.');
85 85
     }
86 86
 
@@ -95,13 +95,13 @@  discard block
 block discarded – undo
95 95
 
96 96
     public function update($sendingMethodId, $id)
97 97
     {
98
-        $result  = SendingMethodService::updateCountryById($this->request->all(), $id);
98
+        $result = SendingMethodService::updateCountryById($this->request->all(), $id);
99 99
         return SendingMethodService::notificationRedirect(array('sending-method.country-prices.index', $sendingMethodId), $result, 'The country was updated.');
100 100
     }
101 101
 
102 102
     public function destroy($sendingMethodId, $id)
103 103
     {
104
-        $result  = SendingMethodService::destroyCountry($id);
104
+        $result = SendingMethodService::destroyCountry($id);
105 105
 
106 106
         if ($result) {
107 107
             Notification::success('The country price 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
@@ -37,11 +37,11 @@  discard block
 block discarded – undo
37 37
             
38 38
             $datatables = Datatables::of($image)
39 39
 
40
-            ->addColumn('thumb', function ($image) use ($contentId) {
40
+            ->addColumn('thumb', function($image) use ($contentId) {
41 41
                 return '<img src="/files/content/100x100/'.$image->content_id.'/'.$image->file.'"  />';
42 42
             })
43
-            ->addColumn('action', function ($image) use ($contentId) {
44
-                $deleteLink = Form::deleteajax('/admin/content/'.$contentId.'/images/'. $image->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
43
+            ->addColumn('action', function($image) use ($contentId) {
44
+                $deleteLink = Form::deleteajax('/admin/content/'.$contentId.'/images/'.$image->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
45 45
                 $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;
46 46
 
47 47
                 return $links;
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
     public function store($contentId)
63 63
     {
64
-        $result  = ContentService::createImage($this->request->all(), $contentId);
64
+        $result = ContentService::createImage($this->request->all(), $contentId);
65 65
         return ContentService::notificationRedirect(array('content.{contentId}.images.index', $contentId), $result, 'The content image was inserted.');
66 66
     }
67 67
 
@@ -73,13 +73,13 @@  discard block
 block discarded – undo
73 73
 
74 74
     public function update($contentId, $contentImageId)
75 75
     {
76
-        $result  = ContentService::updateImageById($this->request->all(), $contentId, $contentImageId);
76
+        $result = ContentService::updateImageById($this->request->all(), $contentId, $contentImageId);
77 77
         return ContentService::notificationRedirect(array('content.{contentId}.images.index', $contentId), $result, 'The content image was updated.');
78 78
     }
79 79
 
80 80
     public function destroy($contentId, $contentImageId)
81 81
     {
82
-        $result  = ContentService::destroyImage($contentImageId);
82
+        $result = ContentService::destroyImage($contentImageId);
83 83
 
84 84
         if ($result) {
85 85
             Notification::success('The file was deleted.');
Please login to merge, or discard this patch.