Passed
Push — master ( 697d1a...ebeb83 )
by Matthijs
06:55
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/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
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.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public function handle(OrderChangeStatus $event)
22 22
     {
23
-        if($event->order->shop->wholesale) {
23
+        if ($event->order->shop->wholesale) {
24 24
 
25 25
             if ($event->status->send_email_to_customer) {
26 26
     
27 27
                 if ($event->status->orderStatusEmailTemplate) {
28 28
 
29
-                    $destinationPath = storage_path() . "/app";
29
+                    $destinationPath = storage_path()."/app";
30 30
                     $orderStatusEmailFromResult = GeneralSettingService::selectOneByShopIdAndName($event->order->shop_id, 'order-status-email-from');
31 31
                     
32 32
                     $orderStatusEmailFrom = '[email protected]';
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
 
45 45
                     $orderStatusEmailBcc = '[email protected]';
46 46
                     $language = 'en';
47
-                    if(strtoupper($event->order->orderBillAddress->country) == 'NL') {
47
+                    if (strtoupper($event->order->orderBillAddress->country) == 'NL') {
48 48
                         $language = 'nl';
49 49
                     }    
50 50
             
51 51
 
52
-                    Mail::send('frontend.email.order-status', ['content' => Cart::replaceTags($event->status->orderStatusEmailTemplate->translate($language)->content, $event->order)], function ($message) use ($event, $destinationPath, $orderStatusEmailFrom, $orderStatusEmailName, $orderStatusEmailBcc, $language) {
52
+                    Mail::send('frontend.email.order-status', ['content' => Cart::replaceTags($event->status->orderStatusEmailTemplate->translate($language)->content, $event->order)], function($message) use ($event, $destinationPath, $orderStatusEmailFrom, $orderStatusEmailName, $orderStatusEmailBcc, $language) {
53 53
                         $message->from($orderStatusEmailFrom, $orderStatusEmailName);
54 54
                         $message->to($event->order->client->email, $event->order->orderBillAddress->firstname)->subject(Cart::replaceTags($event->status->orderStatusEmailTemplate->translate($language)->subject, $event->order));
55 55
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
                         if ($event->order and $event->status->attach_order_to_email) {
61 61
                             $pdfText = "";
62 62
                             $sign = '€';
63
-                            if($event->order->client->usd) {
63
+                            if ($event->order->client->usd) {
64 64
                                 $sign = '$';
65 65
                             }
66 66
 
@@ -83,9 +83,9 @@  discard block
 block discarded – undo
83 83
                     }
84 84
                 }
85 85
 
86
-                if($event->order->type == 'pre_order') {
86
+                if ($event->order->type == 'pre_order') {
87 87
 
88
-                }elseif($event->order->type == 'from_stock') {
88
+                }elseif ($event->order->type == 'from_stock') {
89 89
 
90 90
                 }
91 91
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         } else {
95 95
             if ($event->status->send_email_to_customer) {
96 96
                 if ($event->status->orderStatusEmailTemplate) {
97
-                    $destinationPath = storage_path() . "/app";
97
+                    $destinationPath = storage_path()."/app";
98 98
                     $orderStatusEmailFromResult = GeneralSettingService::selectOneByShopIdAndName($event->order->shop_id, 'order-status-email-from');
99 99
                     
100 100
                     $orderStatusEmailFrom = '[email protected]';
@@ -117,11 +117,11 @@  discard block
 block discarded – undo
117 117
                     }
118 118
 
119 119
                     $language = 'en';
120
-                    if(strtoupper($event->order->orderBillAddress->country) == 'NL') {
120
+                    if (strtoupper($event->order->orderBillAddress->country) == 'NL') {
121 121
                         $language = 'nl';
122 122
                     }    
123 123
 
124
-                    Mail::send('frontend.email.order-status', ['content' => Cart::replaceTags($event->status->orderStatusEmailTemplate->translate($language)->content, $event->order)], function ($message) use ($event, $destinationPath, $orderStatusEmailFrom, $orderStatusEmailName, $orderStatusEmailBcc, $language) {
124
+                    Mail::send('frontend.email.order-status', ['content' => Cart::replaceTags($event->status->orderStatusEmailTemplate->translate($language)->content, $event->order)], function($message) use ($event, $destinationPath, $orderStatusEmailFrom, $orderStatusEmailName, $orderStatusEmailBcc, $language) {
125 125
                         $message->from($orderStatusEmailFrom, $orderStatusEmailName);
126 126
                         $message->to($event->order->client->email, $event->order->orderBillAddress->firstname)->subject(Cart::replaceTags($event->status->orderStatusEmailTemplate->translate($language)->subject, $event->order));
127 127
 
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.
src/Services/Cart/ItemAttributeCollection.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 
9 9
     public function __get($name)
10 10
     {
11
-        if( $this->has($name) ) return $this->get($name);
11
+        if ($this->has($name)) return $this->get($name);
12 12
         return null;
13 13
     }
14 14
 }
15 15
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,9 @@
 block discarded – undo
8 8
 
9 9
     public function __get($name)
10 10
     {
11
-        if( $this->has($name) ) return $this->get($name);
11
+        if( $this->has($name) ) {
12
+            return $this->get($name);
13
+        }
12 14
         return null;
13 15
     }
14 16
 }
15 17
\ No newline at end of file
Please login to merge, or discard this patch.