Passed
Push — master ( e64d58...0bc63b )
by Matthijs
25:18 queued 18:03
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.