Passed
Push — master ( cd4b7b...19cfe1 )
by Matthijs
05:23
created
app/Http/Controllers/Frontend/AccountController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         );
60 60
 
61 61
         foreach ($replace as $key => $val) {
62
-            $content = str_replace("[" . $key . "]", $val, $content);
62
+            $content = str_replace("[".$key."]", $val, $content);
63 63
         }
64 64
 
65 65
         return $content;
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
                     'confirmation_code' => $requestChange->confirmation_code
164 164
                 );
165 165
 
166
-                Mail::send('frontend.email.reset-account-settings-mail', $data, function ($message) use ($data) {
166
+                Mail::send('frontend.email.reset-account-settings-mail', $data, function($message) use ($data) {
167 167
                 
168 168
                     $message->to($data['email'])->from('[email protected]', 'Hideyo')->subject('confirm changing account details');
169 169
                 });
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
                 'code' => $forgotPassword->confirmation_code
288 288
             );
289 289
 
290
-            Mail::send('frontend.email.reset-password-mail', $data, function ($message) use ($data) {
290
+            Mail::send('frontend.email.reset-password-mail', $data, function($message) use ($data) {
291 291
             
292 292
                 $message->to($data['email'])->from('[email protected]', 'Phil & Phae')->subject('Wachtwoord vergeten');
293 293
             });
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
 
369 369
         $validateRegister = ClientService::validateRegister($userdata);
370 370
 
371
-        if($validateRegister->fails()) {
371
+        if ($validateRegister->fails()) {
372 372
 
373 373
             foreach ($validator->errors()->all() as $error) {
374 374
                 Notification::error($error);
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
         $register = ClientService::register($userdata, config()->get('app.shop_id'));
381 381
 
382 382
         if ($register) {
383
-            Mail::send('frontend.email.register-mail', array('user' => $register->toArray(), 'password' => $request->get('password'), 'billAddress' => $register->clientBillAddress->toArray()), function ($message) use ($data) {
383
+            Mail::send('frontend.email.register-mail', array('user' => $register->toArray(), 'password' => $request->get('password'), 'billAddress' => $register->clientBillAddress->toArray()), function($message) use ($data) {
384 384
                 $message->to($data['email'])->from('[email protected]', 'Hideyo')->subject(trans('register-completed-subject'));
385 385
             });
386 386
             Notification::success(trans('you-are-registered-consumer'));
Please login to merge, or discard this patch.
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/Frontend/CartController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
   
27 27
         if (app('cart')->getContent()->count()) {
28 28
             
29
-            if($sendingMethodsList->count() AND !app('cart')->getConditionsByType('sending_method')->count()) {
29
+            if ($sendingMethodsList->count() AND !app('cart')->getConditionsByType('sending_method')->count()) {
30 30
                 self::updateSendingMethod($sendingMethodsList->first()->id);
31 31
             }      
32 32
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             $request->get('amount')
74 74
         );
75 75
 
76
-        if($result){
76
+        if ($result) {
77 77
 
78 78
             return response()->json(array(
79 79
                 'result' => true, 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             $product = app('cart')->get($productId);
107 107
             $amountNa = false;
108 108
 
109
-            if($product->quantity < $amount) {
109
+            if ($product->quantity < $amount) {
110 110
                 $amountNa = view('frontend.cart.amount-na')->with(array('product' => $product))->render();
111 111
             }
112 112
             
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/InvoiceController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,12 +41,12 @@  discard block
 block discarded – undo
41 41
             
42 42
             
43 43
             $datatables = \DataTables::of($invoice)
44
-            ->addColumn('price_with_tax', function ($order) {
44
+            ->addColumn('price_with_tax', function($order) {
45 45
                 $money = '&euro; '.$order->price_with_tax;
46 46
                 return $money;
47 47
             })
48
-            ->addColumn('action', function ($invoice) {
49
-                $deleteLink = \Form::deleteajax('/invoice/'. $invoice->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
48
+            ->addColumn('action', function($invoice) {
49
+                $deleteLink = \Form::deleteajax('/invoice/'.$invoice->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
50 50
                 $download = '<a href="/invoice/'.$invoice->id.'/download" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>Download</a>  ';
51 51
                 $links = '<a href="/invoice/'.$invoice->id.'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Show</a>  '.$download;
52 52
             
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
     public function store()
84 84
     {
85
-        $result  = $this->invoice->create(Request::all());
85
+        $result = $this->invoice->create(Request::all());
86 86
 
87 87
         if (isset($result->id)) {
88 88
             \Notification::success('The invoice was inserted.');
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
     public function update($invoiceId)
106 106
     {
107
-        $result  = $this->invoice->updateById(Request::all(), $invoiceId);
107
+        $result = $this->invoice->updateById(Request::all(), $invoiceId);
108 108
 
109 109
         if (isset($result->id)) {
110 110
             \Notification::success('The invoice was updated.');
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
     public function destroy($invoiceId)
119 119
     {
120
-        $result  = $this->invoice->destroy($invoiceId);
120
+        $result = $this->invoice->destroy($invoiceId);
121 121
 
122 122
         if ($result) {
123 123
             Notification::success('The invoice was deleted.');
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.