Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaymo committed Jan 2, 2025
1 parent 4e21d13 commit bb97562
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/Payment/Request/Decorators/AddressDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

class AddressDecorator implements RequestDecoratorInterface
{
public const MAXIMAL_LENGHT_ADDRESS = 100;
public const MAXIMAL_LENGHT_POSTALCODE = 20;
public const MAXIMAL_LENGHT_CITY = 200;
public const MAXIMAL_LENGHT_REGION = 200;
public const MAXIMAL_LENGTH_ADDRESS = 100;
public const MAXIMAL_LENGTH_POSTALCODE = 20;
public const MAXIMAL_LENGTH_CITY = 200;
public const MAXIMAL_LENGTH_REGION = 200;
public function decorate(array $requestData, WC_Order $order, $context = null): array
{
$isPayPalExpressOrder = $order->get_meta('_mollie_payment_method_button') === 'PayPalButton';
Expand Down Expand Up @@ -56,41 +56,41 @@ private function createBillingAddress(WC_Order $order)
? null
: $this->maximalFieldLengths(
$order->get_billing_address_1(),
self::MAXIMAL_LENGHT_ADDRESS
self::MAXIMAL_LENGTH_ADDRESS
);
$billingAddress->streetAdditional = (ctype_space(
$order->get_billing_address_2()
))
? null
: $this->maximalFieldLengths(
$order->get_billing_address_2(),
self::MAXIMAL_LENGHT_ADDRESS
self::MAXIMAL_LENGTH_ADDRESS
);
$billingAddress->postalCode = (ctype_space(
$order->get_billing_postcode()
))
? null
: $this->maximalFieldLengths(
$order->get_billing_postcode(),
self::MAXIMAL_LENGHT_POSTALCODE
self::MAXIMAL_LENGTH_POSTALCODE
);
$billingAddress->city = (ctype_space($order->get_billing_city()))
? null
: $this->maximalFieldLengths(
$order->get_billing_city(),
self::MAXIMAL_LENGHT_CITY
self::MAXIMAL_LENGTH_CITY
);
$billingAddress->region = (ctype_space($order->get_billing_state()))
? null
: $this->maximalFieldLengths(
$order->get_billing_state(),
self::MAXIMAL_LENGHT_REGION
self::MAXIMAL_LENGTH_REGION
);
$billingAddress->country = (ctype_space($order->get_billing_country()))
? null
: $this->maximalFieldLengths(
$order->get_billing_country(),
self::MAXIMAL_LENGHT_REGION
self::MAXIMAL_LENGTH_REGION
);
$billingAddress->organizationName = $this->billingCompanyField($order);
$phone = $this->getPhoneNumber($order);
Expand Down Expand Up @@ -122,43 +122,43 @@ private function createShippingAddress(WC_Order $order)
? null
: $this->maximalFieldLengths(
$order->get_shipping_address_1(),
self::MAXIMAL_LENGHT_ADDRESS
self::MAXIMAL_LENGTH_ADDRESS
);
$shippingAddress->streetAdditional = (ctype_space(
$order->get_shipping_address_2()
))
? null
: $this->maximalFieldLengths(
$order->get_shipping_address_2(),
self::MAXIMAL_LENGHT_ADDRESS
self::MAXIMAL_LENGTH_ADDRESS
);
$shippingAddress->postalCode = (ctype_space(
$order->get_shipping_postcode()
))
? null
: $this->maximalFieldLengths(
$order->get_shipping_postcode(),
self::MAXIMAL_LENGHT_POSTALCODE
self::MAXIMAL_LENGTH_POSTALCODE
);
$shippingAddress->city = (ctype_space($order->get_shipping_city()))
? null
: $this->maximalFieldLengths(
$order->get_shipping_city(),
self::MAXIMAL_LENGHT_CITY
self::MAXIMAL_LENGTH_CITY
);
$shippingAddress->region = (ctype_space($order->get_shipping_state()))
? null
: $this->maximalFieldLengths(
$order->get_shipping_state(),
self::MAXIMAL_LENGHT_REGION
self::MAXIMAL_LENGTH_REGION
);
$shippingAddress->country = (ctype_space(
$order->get_shipping_country()
))
? null
: $this->maximalFieldLengths(
$order->get_shipping_country(),
self::MAXIMAL_LENGHT_REGION
self::MAXIMAL_LENGTH_REGION
);
return $shippingAddress;
}
Expand Down Expand Up @@ -202,7 +202,7 @@ public function billingCompanyField($order): ?string
}
return $this->maximalFieldLengths(
$order->get_billing_company(),
self::MAXIMAL_LENGHT_ADDRESS
self::MAXIMAL_LENGTH_ADDRESS
);
}

Expand All @@ -221,7 +221,7 @@ private function checkBillieCompanyField($order)
}
return $this->maximalFieldLengths(
$fieldPosted,
self::MAXIMAL_LENGHT_ADDRESS
self::MAXIMAL_LENGTH_ADDRESS
);
}
return null;
Expand Down

0 comments on commit bb97562

Please sign in to comment.