Passed
Push — master ( 15fb0b...7beac6 )
by Matthijs
01:41
created
src/Services/Redirect/RedirectService.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@  discard block
 block discarded – undo
9 9
  
10 10
 class RedirectService extends BaseService
11 11
 {
12
-	public function __construct(RedirectRepository $taxRate)
13
-	{
14
-		$this->repo = $taxRate;
15
-	} 
12
+    public function __construct(RedirectRepository $taxRate)
13
+    {
14
+        $this->repo = $taxRate;
15
+    } 
16 16
 
17 17
     /**
18 18
      * The validation rules for the model.
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
                         $attributes['active'] = 1;
86 86
                     } 
87 87
                     $model = $this->find($result->id);
88
-		            $model->fill($attributes);
89
-		            $model->save();
88
+                    $model->fill($attributes);
89
+                    $model->save();
90 90
 
91
-		            return $model;
91
+                    return $model;
92 92
                 }
93 93
 
94 94
             } else {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
                 $result = $this->repo->getModel()->where('url', '=', $attributes['url'])->get()->first();
82 82
                 if ($result) {
83 83
                     $attributes['active'] = 0;
84
-                    if($attributes['redirect_url']) {
84
+                    if ($attributes['redirect_url']) {
85 85
                         $attributes['active'] = 1;
86 86
                     } 
87 87
                     $model = $this->find($result->id);
Please login to merge, or discard this patch.
src/Services/BaseRepository.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,19 +4,19 @@
 block discarded – undo
4 4
  
5 5
 class BaseRepository 
6 6
 {
7
-	public function selectAll()
8
-	{
9
-	    return $this->model->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id)->get();
10
-	}
7
+    public function selectAll()
8
+    {
9
+        return $this->model->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id)->get();
10
+    }
11 11
 
12 12
     function selectAllByShopId($shopId)
13 13
     {
14
-         return $this->model->where('shop_id', '=', $shopId)->get();
14
+            return $this->model->where('shop_id', '=', $shopId)->get();
15 15
     }
16 16
 
17 17
     public function selectAllActiveByShopId($shopId)
18 18
     {
19
-         return $this->model->where('shop_id', '=', $shopId)->where('active', '=', 1)->get();
19
+            return $this->model->where('shop_id', '=', $shopId)->where('active', '=', 1)->get();
20 20
     }
21 21
 
22 22
     public function getModel() {
Please login to merge, or discard this patch.
src/Services/Invoice/InvoiceService.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@
 block discarded – undo
9 9
  
10 10
 class InvoiceService extends BaseService
11 11
 {
12
-	public function __construct(InvoiceRepository $invoice)
13
-	{
14
-		$this->repo = $invoice;
15
-	} 
12
+    public function __construct(InvoiceRepository $invoice)
13
+    {
14
+        $this->repo = $invoice;
15
+    } 
16 16
 }
17 17
\ No newline at end of file
Please login to merge, or discard this patch.
src/Services/Invoice/Entity/InvoiceAddressRepository.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,6 +33,6 @@
 block discarded – undo
33 33
 
34 34
     function selectAllByInvoiceId($orderId)
35 35
     {
36
-         return $this->model->where('order_id', '=', $orderId)->get();
36
+            return $this->model->where('order_id', '=', $orderId)->get();
37 37
     }  
38 38
 }
39 39
\ No newline at end of file
Please login to merge, or discard this patch.
src/Services/Invoice/Entity/Invoice.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@
 block discarded – undo
15 15
     protected $table = 'invoice';
16 16
 
17 17
     // Add the 'avatar' attachment to the fillable array so that it's mass-assignable on this model.
18
-    protected $fillable = ['order_id', 'type', 'client_id', 'shop_id', 'price_with_tax', 'price_without_tax', 'bill_invoice_address_id', 'delivery_invoice_address_id',];
18
+    protected $fillable = ['order_id', 'type', 'client_id', 'shop_id', 'price_with_tax', 'price_without_tax', 'bill_invoice_address_id', 'delivery_invoice_address_id', ];
19 19
 
20 20
     public static function boot()
21 21
     {
22
-        static::creating(function ($model) {
22
+        static::creating(function($model) {
23 23
 
24 24
             $order = Invoice::whereNotNull('client_id')->where('shop_id', '=', $model->shop_id)->where('created_at', '>=', Carbon::now()->year)->orderBy('created_at', 'desc')->first();
25 25
             $shop = Shop::find($model->shop_id);
Please login to merge, or discard this patch.
src/Services/Order/Events/Handlers/HandleOrderStatusEmail.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function handle(OrderChangeStatus $event)
35 35
     {
36
-        if($event->order->shop->wholesale) {
36
+        if ($event->order->shop->wholesale) {
37 37
 
38 38
             if ($event->status->send_email_to_customer) {
39 39
     
40 40
                 if ($event->status->orderStatusEmailTemplate) {
41 41
 
42
-                    $destinationPath = storage_path() . "/app";
42
+                    $destinationPath = storage_path()."/app";
43 43
                     $orderStatusEmailFromResult = GeneralSettingService::selectOneByShopIdAndName($event->order->shop_id, 'order-status-email-from');
44 44
                     
45 45
                     $orderStatusEmailFrom = '[email protected]';
@@ -57,12 +57,12 @@  discard block
 block discarded – undo
57 57
 
58 58
                     $orderStatusEmailBcc = '[email protected]';
59 59
                     $language = 'en';
60
-                    if(strtoupper($event->order->orderBillAddress->country) == 'NL') {
60
+                    if (strtoupper($event->order->orderBillAddress->country) == 'NL') {
61 61
                         $language = 'nl';
62 62
                     }    
63 63
             
64 64
 
65
-                    Mail::send('frontend.email.order-status', ['content' => $this->cart->replaceTags($event->status->orderStatusEmailTemplate->translate($language)->content, $event->order)], function ($message) use ($event, $destinationPath, $orderStatusEmailFrom, $orderStatusEmailName, $orderStatusEmailBcc, $language) {
65
+                    Mail::send('frontend.email.order-status', ['content' => $this->cart->replaceTags($event->status->orderStatusEmailTemplate->translate($language)->content, $event->order)], function($message) use ($event, $destinationPath, $orderStatusEmailFrom, $orderStatusEmailName, $orderStatusEmailBcc, $language) {
66 66
                         $message->from($orderStatusEmailFrom, $orderStatusEmailName);
67 67
                         $message->to($event->order->client->email, $event->order->orderBillAddress->firstname)->subject($this->cart->replaceTags($event->status->orderStatusEmailTemplate->translate($language)->subject, $event->order));
68 68
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
                         if ($event->order and $event->status->attach_order_to_email) {
74 74
                             $pdfText = "";
75 75
                             $sign = '€';
76
-                            if($event->order->client->usd) {
76
+                            if ($event->order->client->usd) {
77 77
                                 $sign = '$';
78 78
                             }
79 79
 
@@ -96,9 +96,9 @@  discard block
 block discarded – undo
96 96
                     }
97 97
                 }
98 98
 
99
-                if($event->order->type == 'pre_order') {
99
+                if ($event->order->type == 'pre_order') {
100 100
 
101
-                }elseif($event->order->type == 'from_stock') {
101
+                }elseif ($event->order->type == 'from_stock') {
102 102
 
103 103
                 }
104 104
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         } else {
108 108
             if ($event->status->send_email_to_customer) {
109 109
                 if ($event->status->orderStatusEmailTemplate) {
110
-                    $destinationPath = storage_path() . "/app";
110
+                    $destinationPath = storage_path()."/app";
111 111
                     $orderStatusEmailFromResult = GeneralSettingService::selectOneByShopIdAndName($event->order->shop_id, 'order-status-email-from');
112 112
                     
113 113
                     $orderStatusEmailFrom = '[email protected]';
@@ -130,11 +130,11 @@  discard block
 block discarded – undo
130 130
                     }
131 131
 
132 132
                     $language = 'en';
133
-                    if(strtoupper($event->order->orderBillAddress->country) == 'NL') {
133
+                    if (strtoupper($event->order->orderBillAddress->country) == 'NL') {
134 134
                         $language = 'nl';
135 135
                     }    
136 136
 
137
-                    Mail::send('frontend.email.order-status', ['content' => $this->cart->replaceTags($event->status->orderStatusEmailTemplate->translate($language)->content, $event->order)], function ($message) use ($event, $destinationPath, $orderStatusEmailFrom, $orderStatusEmailName, $orderStatusEmailBcc, $language) {
137
+                    Mail::send('frontend.email.order-status', ['content' => $this->cart->replaceTags($event->status->orderStatusEmailTemplate->translate($language)->content, $event->order)], function($message) use ($event, $destinationPath, $orderStatusEmailFrom, $orderStatusEmailName, $orderStatusEmailBcc, $language) {
138 138
                         $message->from($orderStatusEmailFrom, $orderStatusEmailName);
139 139
                         $message->to($event->order->client->email, $event->order->orderBillAddress->firstname)->subject($this->cart->replaceTags($event->status->orderStatusEmailTemplate->translate($language)->subject, $event->order));
140 140
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
 
99 99
                 if($event->order->type == 'pre_order') {
100 100
 
101
-                }elseif($event->order->type == 'from_stock') {
101
+                } elseif($event->order->type == 'from_stock') {
102 102
 
103 103
                 }
104 104
 
Please login to merge, or discard this patch.
src/Services/Order/OrderStatusEmailTemplateService.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@
 block discarded – undo
10 10
 
11 11
 class OrderStatusEmailTemplateService extends BaseService
12 12
 {
13
-	public function __construct(OrderStatusEmailTemplateRepository $orderStatusEmailTemplate)
14
-	{
15
-		$this->repo = $orderStatusEmailTemplate;
16
-	} 
13
+    public function __construct(OrderStatusEmailTemplateRepository $orderStatusEmailTemplate)
14
+    {
15
+        $this->repo = $orderStatusEmailTemplate;
16
+    } 
17 17
 
18 18
 
19 19
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         );
34 34
         
35 35
         if ($id) {
36
-            $rules['title'] =   'required|unique_with:order_status_email_template, shop_id,'.$id;
36
+            $rules['title'] = 'required|unique_with:order_status_email_template, shop_id,'.$id;
37 37
         }
38 38
 
39 39
         return $rules;
Please login to merge, or discard this patch.
src/Services/Order/OrderStatusService.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@
 block discarded – undo
10 10
 
11 11
 class OrderStatusService extends BaseService
12 12
 {
13
-	public function __construct(OrderStatusRepository $orderStatus)
14
-	{
15
-		$this->repo = $orderStatus;
16
-	} 
13
+    public function __construct(OrderStatusRepository $orderStatus)
14
+    {
15
+        $this->repo = $orderStatus;
16
+    } 
17 17
 
18 18
     /**
19 19
      * The validation rules for the model.
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
         );
30 30
         
31 31
         if ($id) {
32
-            $rules['title'] =   'required|between:4,65|unique_with:order_status, shop_id, '.$id.' = id';
32
+            $rules['title'] = 'required|between:4,65|unique_with:order_status, shop_id, '.$id.' = id';
33 33
         }
34 34
 
35 35
         return $rules;
Please login to merge, or discard this patch.
src/Services/Order/Entity/Order.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
             }
54 54
         });
55 55
 
56
-          parent::boot();
56
+            parent::boot();
57 57
     }
58 58
 
59 59
     public function products()
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@
 block discarded – undo
18 18
     protected $table = 'order';
19 19
 
20 20
     // Add the 'avatar' attachment to the fillable array so that it's mass-assignable on this model.
21
-    protected $fillable = ['id', 'validated', 'client_id', 'shop_id', 'price_with_tax', 'price_without_tax', 'total_discount', 'coupon_id', 'coupon_title',  'coupon_discount_way', 'coupon_type', 'coupon_value', 'coupon_code', 'coupon_group_title', 'bill_order_address_id', 'delivery_order_address_id', 'order_status_id', 'mollie_payment_id', 'comments', 'present_gender', 'present_occassion', 'present_message', 'browser_detect'];
21
+    protected $fillable = ['id', 'validated', 'client_id', 'shop_id', 'price_with_tax', 'price_without_tax', 'total_discount', 'coupon_id', 'coupon_title', 'coupon_discount_way', 'coupon_type', 'coupon_value', 'coupon_code', 'coupon_group_title', 'bill_order_address_id', 'delivery_order_address_id', 'order_status_id', 'mollie_payment_id', 'comments', 'present_gender', 'present_occassion', 'present_message', 'browser_detect'];
22 22
 
23 23
     public static function boot()
24 24
     {
25
-        static::creating(function ($model) {
25
+        static::creating(function($model) {
26 26
 
27 27
             if ($model->created_at) {
28 28
                 $order = Order::where('shop_id', '=', $model->shop_id)->where('created_at', '>=', Carbon::createFromFormat('Y-m-d H:i:s', $model->created_at)->year)->orderBy('id', 'desc')->first();
Please login to merge, or discard this patch.