Passed
Push — master ( 81fcb0...eef980 )
by Nicolaas
03:07
created
code/model/process/extensions/CountryPrice_OrderDOD.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         if ($order->IsSubmitted()) {
62 62
             return true;
63 63
         }
64
-        if (! $countryCode) {
64
+        if (!$countryCode) {
65 65
             $countryCode = $order->getCountry();
66 66
         }
67 67
         $currencyObject = CountryPrice_EcommerceCurrency::get_currency_for_country($countryCode);
@@ -75,13 +75,13 @@  discard block
 block discarded – undo
75 75
         //check if the billing and shipping address have a country so that they will not be overridden by previous Orders
76 76
         //we do this to make sure that the previous address can not change the region and thereby destroy the order in the cart
77 77
         if ($billingAddress = $order->CreateOrReturnExistingAddress('BillingAddress')) {
78
-            if (! $billingAddress->Country || $force) {
78
+            if (!$billingAddress->Country || $force) {
79 79
                 $billingAddress->Country = $countryCode;
80 80
                 $billingAddress->write();
81 81
             }
82 82
         }
83 83
         if ($shippingAddress = $order->CreateOrReturnExistingAddress('ShippingAddress')) {
84
-            if (! $shippingAddress->ShippingCountry || $force) {
84
+            if (!$shippingAddress->ShippingCountry || $force) {
85 85
                 $shippingAddress->ShippingCountry = $countryCode;
86 86
                 $shippingAddress->write();
87 87
             }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         //if a country code and currency has been set then all is good
91 91
         //from there we keep it this way
92 92
         if (
93
-            $order->OriginatingCountryCode ==  $countryCode &&
93
+            $order->OriginatingCountryCode == $countryCode &&
94 94
             $order->CurrencyUsedID == $currencyObject->ID
95 95
         ) {
96 96
             return true;
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
             if ($items) {
112 112
                 foreach ($items as $item) {
113 113
                     $buyable = $item->Buyable(true);
114
-                    if (! $buyable->canPurchase()) {
114
+                    if (!$buyable->canPurchase()) {
115 115
                         $item->delete();
116 116
                     }
117 117
                 }
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
     public function canEdit($member = null)
159 159
     {
160
-        if (! $member) {
160
+        if (!$member) {
161 161
             $member = Member::currentUser();
162 162
         }
163 163
         if ($member) {
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
                 $countryMessageObject->CountrySpecificEmailMessage
269 269
             );
270 270
         }
271
-        if($step->SendEmailToDistributor) {
271
+        if ($step->SendEmailToDistributor) {
272 272
             if ($distributor = $this->owner->Distributor()) {
273 273
                 $distributorEmail = $distributor->Email;
274 274
                 if ($distributorEmail) {
Please login to merge, or discard this patch.
code/model/process/extensions/CountryPrice_OrderStepDOD.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
                 ),
51 51
             )
52 52
         );
53
-        if($this->owner->SendEmailToDistributor) {
53
+        if ($this->owner->SendEmailToDistributor) {
54 54
             $customisation = _t(
55 55
                 'CountryPrice_OrderStepDOD.CUSTOMISATION_PER_COUNTRY',
56 56
                 'Customisation per country');
Please login to merge, or discard this patch.