Passed
Push — master ( 46bb46...96f0ff )
by Matthijs
23:45 queued 17:36
created
app/Http/Controllers/Backend/ClientAddressController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
             })
49 49
             ->addColumn('bill', function ($addresses) {
50 50
                 if ($addresses->clientBillAddress()->count()) {
51
-                          return '<span class="glyphicon glyphicon-ok icon-green"></span>';
51
+                            return '<span class="glyphicon glyphicon-ok icon-green"></span>';
52 52
                 }
53 53
 
54 54
                 return '<span class="glyphicon glyphicon-remove icon-red"></span>';
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,24 +36,24 @@  discard block
 block discarded – undo
36 36
             )->with(array('clientDeliveryAddress', 'clientBillAddress'))->where('client_id', '=', $clientId);
37 37
             
38 38
             $datatables = Datatables::of($addresses)
39
-            ->addColumn('housenumber', function ($addresses) {
39
+            ->addColumn('housenumber', function($addresses) {
40 40
                 return $addresses->housenumber.$addresses->housenumber_suffix;
41 41
             })
42
-            ->addColumn('delivery', function ($addresses) {
42
+            ->addColumn('delivery', function($addresses) {
43 43
                 if ($addresses->clientDeliveryAddress()->count()) {
44 44
                     return '<span class="glyphicon glyphicon-ok icon-green"></span>';
45 45
                 }
46 46
                 
47 47
                 return '<span class="glyphicon glyphicon-remove icon-red"></span>';   
48 48
             })
49
-            ->addColumn('bill', function ($addresses) {
49
+            ->addColumn('bill', function($addresses) {
50 50
                 if ($addresses->clientBillAddress()->count()) {
51 51
                           return '<span class="glyphicon glyphicon-ok icon-green"></span>';
52 52
                 }
53 53
 
54 54
                 return '<span class="glyphicon glyphicon-remove icon-red"></span>';
55 55
             })
56
-            ->addColumn('action', function ($addresses) use ($clientId) {
56
+            ->addColumn('action', function($addresses) use ($clientId) {
57 57
                 $deleteLink = Form::deleteajax(url()->route('client.addresses.destroy', array('clientId' => $clientId, 'clientAddressId' => $addresses->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
58 58
                 $links = '<a href="'.url()->route('client.addresses.edit', array('clientId' => $clientId, 'clientAddressId' => $addresses->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
59 59
             
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
     public function store(Request $request, $clientId)
76 76
     {
77
-        $result  = ClientService::createAddress($request->all(), $clientId);
77
+        $result = ClientService::createAddress($request->all(), $clientId);
78 78
         return ClientService::notificationRedirect(array('client.addresses.index', $clientId), $result, 'The client adress is inserted.');
79 79
     }
80 80
 
@@ -86,13 +86,13 @@  discard block
 block discarded – undo
86 86
 
87 87
     public function update(Request $request, $clientId, $id)
88 88
     {
89
-        $result  = ClientService::editAddress($clientId, $id, $request->all());
89
+        $result = ClientService::editAddress($clientId, $id, $request->all());
90 90
         return ClientService::notificationRedirect(array('client.addresses.index', $clientId), $result, 'The client adress is updated.'); 
91 91
     }
92 92
 
93 93
     public function destroy($clientId, $id)
94 94
     {
95
-        $result  = ClientService::destroyAddress($id);
95
+        $result = ClientService::destroyAddress($id);
96 96
 
97 97
         if ($result) {
98 98
             Notification::success('The client address is deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/BrandImageController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,15 +23,15 @@  discard block
 block discarded – undo
23 23
         if ($request->wantsJson()) {
24 24
 
25 25
             $image = BrandService::getModelImage()
26
-            ->select(['id','file', 'brand_id'])
26
+            ->select(['id', 'file', 'brand_id'])
27 27
             ->where('brand_id', '=', $brandId);
28 28
             
29 29
             $datatables = Datatables::of($image)
30 30
 
31
-            ->addColumn('thumb', function ($image) {
31
+            ->addColumn('thumb', function($image) {
32 32
                 return '<img src="'.config('hideyo.public_path').'/brand/100x100/'.$image->brand_id.'/'.$image->file.'"  />';
33 33
             })
34
-            ->addColumn('action', function ($image) use ($brandId) {
34
+            ->addColumn('action', function($image) use ($brandId) {
35 35
                 $deleteLink = Form::deleteajax(url()->route('brand.images.destroy', array('brandId' => $brandId, 'id' => $image->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
36 36
                 $links = '<a href="'.url()->route('brand.images.edit', array('brandId' => $brandId, 'id' => $image->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
37 37
                 return $links;
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             return $datatables->make(true);
41 41
         }
42 42
         
43
-        return view('backend.brand_image.index')->with(array( 'brand' => $brand));
43
+        return view('backend.brand_image.index')->with(array('brand' => $brand));
44 44
     }
45 45
 
46 46
     public function create($brandId)
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     public function store(Request $request, $brandId)
53 53
     {
54
-        $result  = BrandService::createImage($request->all(), $brandId);
54
+        $result = BrandService::createImage($request->all(), $brandId);
55 55
         return BrandService::notificationRedirect(array('brand.images.index', $brandId), $result, 'The brand image was inserted.');
56 56
     }
57 57
 
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
 
64 64
     public function update(Request $request, $brandId, $brandImageId)
65 65
     {
66
-        $result  = BrandService::updateImageById($request->all(), $brandId, $brandImageId);
66
+        $result = BrandService::updateImageById($request->all(), $brandId, $brandImageId);
67 67
         return BrandService::notificationRedirect(array('brand.images.index', $brandId), $result, 'The brand image was updated.');
68 68
     }
69 69
 
70 70
     public function destroy($brandId, $brandImageId)
71 71
     {
72
-        $result  = BrandService::destroyImage($brandImageId);
72
+        $result = BrandService::destroyImage($brandImageId);
73 73
 
74 74
         if ($result) {
75 75
             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
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
             $datatables = Datatables::of($clients)
36 36
 
37 37
 
38
-            ->addColumn('last_login', function ($clients) {
38
+            ->addColumn('last_login', function($clients) {
39 39
                 return date('d F H:i', strtotime($clients->last_login));
40 40
             })
41 41
 
42
-            ->addColumn('action', function ($clients) {
42
+            ->addColumn('action', function($clients) {
43 43
                 $deleteLink = Form::deleteajax(url()->route('client.destroy', $clients->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
44 44
                 $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;
45 45
             
@@ -76,10 +76,10 @@  discard block
 block discarded – undo
76 76
     public function postActivate(Request $request, $clientId)
77 77
     {
78 78
         $input = $request->all();
79
-        $result  = ClientService::activate($clientId);
79
+        $result = ClientService::activate($clientId);
80 80
 
81 81
         if ($input['send_mail']) {
82
-                Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function ($message) use ($result) {
82
+                Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function($message) use ($result) {
83 83
                     $message->to($result['email'])->from('[email protected]', 'Hideyo')->subject('Toegang tot account.');
84 84
                 });
85 85
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
     public function store(Request $request)
101 101
     {
102
-        $result  = ClientService::create($request->all());
102
+        $result = ClientService::create($request->all());
103 103
         return ClientService::notificationRedirect('client.index', $result, 'The client was inserted.');
104 104
     }
105 105
 
@@ -130,24 +130,24 @@  discard block
 block discarded – undo
130 130
 
131 131
     public function postExport()
132 132
     {
133
-        $result  =  ClientService::selectAllExport();
134
-        Excel::create('export', function ($excel) use ($result) {
133
+        $result = ClientService::selectAllExport();
134
+        Excel::create('export', function($excel) use ($result) {
135 135
 
136
-            $excel->sheet('Clients', function ($sheet) use ($result) {
136
+            $excel->sheet('Clients', function($sheet) use ($result) {
137 137
                 $newArray = array();
138 138
                 foreach ($result as $row) {
139 139
                     $firstname = null;
140
-                    if($row->clientBillAddress) {
140
+                    if ($row->clientBillAddress) {
141 141
                         $firstname = $row->clientBillAddress->firstname;
142 142
                     }
143 143
 
144 144
                     $lastname = null;
145
-                    if($row->clientBillAddress) {
145
+                    if ($row->clientBillAddress) {
146 146
                         $lastname = $row->clientBillAddress->lastname;
147 147
                     }
148 148
 
149 149
                     $gender = null;
150
-                    if($row->clientBillAddress) {
150
+                    if ($row->clientBillAddress) {
151 151
                         $gender = $row->clientBillAddress->gender;
152 152
                     }
153 153
 
@@ -171,12 +171,12 @@  discard block
 block discarded – undo
171 171
 
172 172
     public function update(Request $request, $clientId)
173 173
     {
174
-        $result  = ClientService::updateById($request->all(), $clientId);
174
+        $result = ClientService::updateById($request->all(), $clientId);
175 175
         $input = $request->all();
176 176
         if (isset($result->id)) {
177 177
             if ($result->active) {
178 178
                 if ($input['send_mail']) {
179
-                    Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function ($message) use ($result) {
179
+                    Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function($message) use ($result) {
180 180
                         $message->to($result['email'])->from('[email protected]', 'Hideyo')->subject('Toegang tot account.');
181 181
                     });
182 182
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 
198 198
     public function destroy($clientId)
199 199
     {
200
-        $result  = ClientService::destroy($clientId);
200
+        $result = ClientService::destroy($clientId);
201 201
 
202 202
         if ($result) {
203 203
             Notification::success('The client 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
@@ -29,10 +29,10 @@  discard block
 block discarded – undo
29 29
             
30 30
             $datatables = Datatables::of($image)
31 31
 
32
-            ->addColumn('thumb', function ($image) {
32
+            ->addColumn('thumb', function($image) {
33 33
                 return '<img src="/files/news/100x100/'.$image->news_id.'/'.$image->file.'"  />';
34 34
             })
35
-            ->addColumn('action', function ($image) use ($newsId) {
35
+            ->addColumn('action', function($image) use ($newsId) {
36 36
                 $deleteLink = Form::deleteajax(url()->route('news-images.destroy', array('newsId' => $newsId, 'id' => $image->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
37 37
                 $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;
38 38
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
     public function store(Request $request, $newsId)
55 55
     {
56
-        $result  = NewsService::createImage($request->all(), $newsId);
56
+        $result = NewsService::createImage($request->all(), $newsId);
57 57
         return NewsService::notificationRedirect(array('news-images.index', $newsId), $result, 'The news image was inserted.');
58 58
     }
59 59
 
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
 
66 66
     public function update(Request $request, $newsId, $newsImageId)
67 67
     {
68
-        $result  = NewsService::updateImageById($request->all(), $newsId, $newsImageId);
68
+        $result = NewsService::updateImageById($request->all(), $newsId, $newsImageId);
69 69
         return NewsService::notificationRedirect(array('news-images.index', $newsId), $result, 'The news image was updated.');
70 70
     }
71 71
 
72 72
     public function destroy($newsId, $newsImageId)
73 73
     {
74
-        $result  = NewsService::destroyImage($newsImageId);
74
+        $result = NewsService::destroyImage($newsImageId);
75 75
 
76 76
         if ($result) {
77 77
             Notification::success('The file 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/ErrorController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@
 block discarded – undo
22 22
             $query = $this->error->getModel()->select(
23 23
                 [
24 24
                 'id',
25
-                'class', 'file' , 'status_code', 'line', 'message', 'url', 'method']
25
+                'class', 'file', 'status_code', 'line', 'message', 'url', 'method']
26 26
             );
27 27
             
28
-            $datatables = \Datatables::of($query)->addColumn('action', function ($query) {
29
-                $deleteLink = \Form::deleteajax('/admin/general-setting/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
28
+            $datatables = \Datatables::of($query)->addColumn('action', function($query) {
29
+                $deleteLink = \Form::deleteajax('/admin/general-setting/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
30 30
                 $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;
31 31
             
32 32
                 return $links;
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/OrderStatusController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -22,12 +22,12 @@  discard block
 block discarded – undo
22 22
         if ($request->wantsJson()) {
23 23
 
24 24
             $query = OrderStatusService::getModel()->select(
25
-                ['id', 'color','title']
25
+                ['id', 'color', 'title']
26 26
             )->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id);
27 27
             
28 28
             $datatables = \Datatables::of($query)
29 29
 
30
-            ->addColumn('title', function ($query) {
30
+            ->addColumn('title', function($query) {
31 31
      
32 32
                 if ($query->color) {
33 33
                     return '<span style="background-color:'.$query->color.'; padding: 10px; line-height:30px; text-align:center; color:white;">'.$query->title.'</span>';
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
             })
37 37
 
38 38
 
39
-            ->addColumn('action', function ($query) {
40
-                $deleteLink = Form::deleteajax('/admin/order-status/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
39
+            ->addColumn('action', function($query) {
40
+                $deleteLink = Form::deleteajax('/admin/order-status/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
41 41
                 $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;
42 42
             
43 43
                 return $links;
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
     public function store(Request $request)
60 60
     {
61
-        $result  = OrderStatusService::create($request->all());
61
+        $result = OrderStatusService::create($request->all());
62 62
         return OrderStatusService::notificationRedirect('order-status.index', $result, 'The order status was inserted.');
63 63
     }
64 64
 
@@ -79,13 +79,13 @@  discard block
 block discarded – undo
79 79
 
80 80
     public function update(Request $request, $orderStatusId)
81 81
     {
82
-        $result  = OrderStatusService::updateById($request->all(), $orderStatusId);
82
+        $result = OrderStatusService::updateById($request->all(), $orderStatusId);
83 83
         return OrderStatusService::notificationRedirect('order-status.index', $result, 'The order status was updated.');
84 84
     }
85 85
 
86 86
     public function destroy($orderStatusId)
87 87
     {
88
-        $result  = OrderStatusService::destroy($orderStatusId);
88
+        $result = OrderStatusService::destroy($orderStatusId);
89 89
 
90 90
         if ($result) {
91 91
             Notification::success('The order status was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ProductAmountSeriesController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,19 +23,19 @@  discard block
 block discarded – undo
23 23
         $product = ProductService::find($productId);
24 24
         if ($request->wantsJson()) {
25 25
             $query = ProductAmountSeriesService::getModel()->select(
26
-                ['id', 'series_start', 'series_value', 'active','series_max']
26
+                ['id', 'series_start', 'series_value', 'active', 'series_max']
27 27
             )->where('product_id', '=', $productId);
28 28
             
29 29
             $datatables = Datatables::of($query)
30 30
 
31
-            ->addColumn('active', function ($query) {
31
+            ->addColumn('active', function($query) {
32 32
                 if ($query->active) {
33 33
                     return '<a href="#" class="change-active" data-url="/admin/html-block/change-active/'.$query->id.'"><span class="glyphicon glyphicon-ok icon-green"></span></a>';
34 34
                 }
35 35
                 
36 36
                 return '<a href="#" class="change-active" data-url="/admin/html-block/change-active/'.$query->id.'"><span class="glyphicon glyphicon-remove icon-red"></span></a>';
37 37
             })
38
-            ->addColumn('action', function ($query) use ($productId) {
38
+            ->addColumn('action', function($query) use ($productId) {
39 39
                 $deleteLink = Form::deleteajax(url()->route('product.product-amount-series.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
40 40
                 $links = '<a href="'.url()->route('product.product-amount-series.edit', array('productId' => $productId, 'id' => $query->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
41 41
                 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     public function store(Request $request, $productId)
53 53
     {
54
-        $result  = ProductAmountSeriesService::create($request->all(), $productId);
54
+        $result = ProductAmountSeriesService::create($request->all(), $productId);
55 55
         return ProductService::notificationRedirect(array('product.product-amount-series.index', $productId), $result, 'The product amount series is inserted.');
56 56
     }
57 57
 
@@ -70,13 +70,13 @@  discard block
 block discarded – undo
70 70
 
71 71
     public function update(Request $request, $productId, $id)
72 72
     {
73
-        $result  = ProductAmountSeriesService::updateById($request->all(), $productId, $id);
73
+        $result = ProductAmountSeriesService::updateById($request->all(), $productId, $id);
74 74
         return ProductService::notificationRedirect(array('product.product-amount-series.index', $productId), $result, 'The product amount series is updated.');
75 75
     }
76 76
 
77 77
     public function destroy($productId, $id)
78 78
     {
79
-        $result  = ProductAmountSeriesService::destroy($id);
79
+        $result = ProductAmountSeriesService::destroy($id);
80 80
 
81 81
         if ($result) {
82 82
             Notification::success('The product amount series is deleted.');
Please login to merge, or discard this patch.