Passed
Push — master ( 8a885b...fb39dd )
by Matthijs
05:16
created
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.
app/Http/Controllers/Backend/ExtraFieldController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
             
29 29
             $datatables = DataTables::of($query)
30 30
 
31
-            ->addColumn('category', function ($query) {
31
+            ->addColumn('category', function($query) {
32 32
                 if ($query->categories) {
33 33
                     $output = array();
34 34
                     foreach ($query->categories as $categorie) {
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
                 }
40 40
             })
41 41
 
42
-            ->addColumn('action', function ($query) {
42
+            ->addColumn('action', function($query) {
43 43
                 $deleteLink = Form::deleteajax(url()->route('extra-field.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
44 44
                 $links = '<a href="'.url()->route('extra-field.values.index', $query->id).'" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>'.$query->values->count().' values</a>
45 45
                  <a href="'.url()->route('extra-field.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
     public function store(Request $request)
63 63
     {
64
-        $result  = ExtraFieldService::create($request->all());
64
+        $result = ExtraFieldService::create($request->all());
65 65
         return ExtraFieldService::notificationRedirect('extra-field.index', $result, 'The extra field was inserted.');
66 66
     }
67 67
 
@@ -72,13 +72,13 @@  discard block
 block discarded – undo
72 72
 
73 73
     public function update(Request $request, $id)
74 74
     {
75
-        $result  = ExtraFieldService::updateById($request->all(), $id);
75
+        $result = ExtraFieldService::updateById($request->all(), $id);
76 76
         return ExtraFieldService::notificationRedirect('extra-field.index', $result, 'The extra field was updated.');
77 77
     }
78 78
 
79 79
     public function destroy($id)
80 80
     {
81
-        $result  = ExtraFieldService::destroy($id);
81
+        $result = ExtraFieldService::destroy($id);
82 82
 
83 83
         if ($result) {
84 84
             Notification::success('Extra field was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/TaxRateController.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
         if ($request->wantsJson()) {
15 15
             $query = TaxRateService::getModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id);
16
-            $datatables = DataTables::of($query)->addColumn('action', function ($query) {
16
+            $datatables = DataTables::of($query)->addColumn('action', function($query) {
17 17
                 $deleteLink = Form::deleteajax(url()->route('tax-rate.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger'), $query->title);
18 18
                 $links = '<a href="'.url()->route('tax-rate.edit', $query->id).'" class="btn btn-sm btn-success"><i class="fi-pencil"></i>Edit</a>  '.$deleteLink;
19 19
                 return $links;
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/AttributeController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             $query = AttributeService::getModel()->where('attribute_group_id', '=', $attributeGroupId);
33 33
             
34 34
             $datatables = DataTables::of($query)
35
-            ->addColumn('action', function ($query) use ($attributeGroupId) {
35
+            ->addColumn('action', function($query) use ($attributeGroupId) {
36 36
                 $deleteLink = Form::deleteajax(url()->route('attribute.destroy', array('attributeGroupId' => $attributeGroupId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
37 37
                 $links = ' <a href="'.url()->route('attribute.edit', array('attributeGroupId' => $attributeGroupId, 'id' => $query->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>'.$deleteLink;
38 38
                 return $links;
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      */
65 65
     public function store(Request $request, $attributeGroupId)
66 66
     {
67
-        $result  = AttributeService::create($request->all(), $attributeGroupId);
67
+        $result = AttributeService::create($request->all(), $attributeGroupId);
68 68
         return AttributeService::notificationRedirect(array('attribute.index', $attributeGroupId), $result, 'The attribute was inserted.');
69 69
     }
70 70
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      */
89 89
     public function update(Request $request, $attributeGroupId, $attributeId)
90 90
     {
91
-        $result  = AttributeService::updateById($request->all(), $attributeGroupId, $attributeId);
91
+        $result = AttributeService::updateById($request->all(), $attributeGroupId, $attributeId);
92 92
         return AttributeService::notificationRedirect(array('attribute.index', $attributeGroupId), $result, 'The attribute was updated.');
93 93
     }
94 94
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      */
101 101
     public function destroy($attributeGroupId, $attributeId)
102 102
     {
103
-        $result  = AttributeService::destroy($attributeId);
103
+        $result = AttributeService::destroy($attributeId);
104 104
 
105 105
         if ($result) {
106 106
             Notification::success('Atrribute was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ProductCategoryImageController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
             
27 27
             $datatables = DataTables::of($image)
28 28
 
29
-            ->addColumn('thumb', function ($image) use ($productCategoryId) {
29
+            ->addColumn('thumb', function($image) use ($productCategoryId) {
30 30
                 return '<img src="/files/product_category/100x100/'.$image->product_category_id.'/'.$image->file.'"  />';
31 31
             })
32
-            ->addColumn('action', function ($image) use ($productCategoryId) {
32
+            ->addColumn('action', function($image) use ($productCategoryId) {
33 33
                 $deleteLink = Form::deleteajax(url()->route('product-category.images.destroy', array('productCategoryId' => $productCategoryId, 'id' => $image->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
34 34
                 $links = '<a href="'.url()->route('product-category.images.edit', array('productCategoryId' => $productCategoryId, 'id' => $image->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
35 35
                 return $links;
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     public function store(Request $request, $productCategoryId)
51 51
     {
52
-        $result  = ProductCategoryService::createImage($request->all(), $productCategoryId);
52
+        $result = ProductCategoryService::createImage($request->all(), $productCategoryId);
53 53
         return ProductCategoryService::notificationRedirect(array('product-category.images.index', $productCategoryId), $result, 'The category image was inserted.');
54 54
     }
55 55
 
@@ -61,13 +61,13 @@  discard block
 block discarded – undo
61 61
 
62 62
     public function update(Request $request, $productCategoryId, $productCategoryImageId)
63 63
     {
64
-        $result  = ProductCategoryService::updateImageById($request->all(), $productCategoryId, $productCategoryImageId);
64
+        $result = ProductCategoryService::updateImageById($request->all(), $productCategoryId, $productCategoryImageId);
65 65
         return ProductCategoryService::notificationRedirect(array('product-category.images.index', $productCategoryId), $result, 'The category image was updated.');
66 66
     }
67 67
 
68 68
     public function destroy($productCategoryId, $productCategoryImageId)
69 69
     {
70
-        $result  = ProductCategoryService::destroyImage($productCategoryImageId);
70
+        $result = ProductCategoryService::destroyImage($productCategoryImageId);
71 71
 
72 72
         if ($result) {
73 73
             Notification::success('The file was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ClientController.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -28,10 +28,10 @@  discard block
 block discarded – undo
28 28
             $clients = ClientService::getModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id);
29 29
             
30 30
             $datatables = DataTables::of($clients)
31
-            ->addColumn('last_login', function ($clients) {
31
+            ->addColumn('last_login', function($clients) {
32 32
                 return date('d F H:i', strtotime($clients->last_login));
33 33
             })
34
-            ->addColumn('action', function ($clients) {
34
+            ->addColumn('action', function($clients) {
35 35
                 $deleteLink = Form::deleteajax(url()->route('client.destroy', $clients->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
36 36
                 $links = '<a href="'.url()->route('client.edit', $clients->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Show</a>  '.$deleteLink;
37 37
             
@@ -68,10 +68,10 @@  discard block
 block discarded – undo
68 68
     public function postActivate(Request $request, $clientId)
69 69
     {
70 70
         $input = $request->all();
71
-        $result  = ClientService::activate($clientId);
71
+        $result = ClientService::activate($clientId);
72 72
 
73 73
         if ($input['send_mail']) {
74
-                Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function ($message) use ($result) {
74
+                Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function($message) use ($result) {
75 75
                     $message->to($result['email'])->from('[email protected]', 'Hideyo')->subject('Toegang tot account.');
76 76
                 });
77 77
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
     public function store(Request $request)
93 93
     {
94
-        $result  = ClientService::create($request->all());
94
+        $result = ClientService::create($request->all());
95 95
         return ClientService::notificationRedirect('client.index', $result, 'The client was inserted.');
96 96
     }
97 97
 
@@ -122,24 +122,24 @@  discard block
 block discarded – undo
122 122
 
123 123
     public function postExport()
124 124
     {
125
-        $result  =  ClientService::selectAllExport();
126
-        Excel::create('export', function ($excel) use ($result) {
125
+        $result = ClientService::selectAllExport();
126
+        Excel::create('export', function($excel) use ($result) {
127 127
 
128
-            $excel->sheet('Clients', function ($sheet) use ($result) {
128
+            $excel->sheet('Clients', function($sheet) use ($result) {
129 129
                 $newArray = array();
130 130
                 foreach ($result as $row) {
131 131
                     $firstname = null;
132
-                    if($row->clientBillAddress) {
132
+                    if ($row->clientBillAddress) {
133 133
                         $firstname = $row->clientBillAddress->firstname;
134 134
                     }
135 135
 
136 136
                     $lastname = null;
137
-                    if($row->clientBillAddress) {
137
+                    if ($row->clientBillAddress) {
138 138
                         $lastname = $row->clientBillAddress->lastname;
139 139
                     }
140 140
 
141 141
                     $gender = null;
142
-                    if($row->clientBillAddress) {
142
+                    if ($row->clientBillAddress) {
143 143
                         $gender = $row->clientBillAddress->gender;
144 144
                     }
145 145
 
@@ -163,12 +163,12 @@  discard block
 block discarded – undo
163 163
 
164 164
     public function update(Request $request, $clientId)
165 165
     {
166
-        $result  = ClientService::updateById($request->all(), $clientId);
166
+        $result = ClientService::updateById($request->all(), $clientId);
167 167
         $input = $request->all();
168 168
         if (isset($result->id)) {
169 169
             if ($result->active) {
170 170
                 if ($input['send_mail']) {
171
-                    Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function ($message) use ($result) {
171
+                    Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function($message) use ($result) {
172 172
                         $message->to($result['email'])->from('[email protected]', 'Hideyo')->subject('Toegang tot account.');
173 173
                     });
174 174
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 
190 190
     public function destroy($clientId)
191 191
     {
192
-        $result  = ClientService::destroy($clientId);
192
+        $result = ClientService::destroy($clientId);
193 193
 
194 194
         if ($result) {
195 195
             Notification::success('The client was deleted.');
Please login to merge, or discard this patch.