Updated: Changes for PHP 8.x compatibility

This commit is contained in:
Sumit Panwar
2025-05-23 14:41:46 +05:30
parent fa0a498733
commit b9dbc449fe
91 changed files with 574 additions and 409 deletions

View File

@@ -175,7 +175,7 @@ class DiscountCore extends CartRule
/**
* @deprecated 1.5.0.1
*/
public static function getCustomerDiscounts($id_lang, $id_customer, $active = false, $includeGenericOnes = true, $hasStock = false, Cart $cart = null)
public static function getCustomerDiscounts($id_lang, $id_customer, $active = false, $includeGenericOnes = true, $hasStock = false, ?Cart $cart = null)
{
return parent::getCustomerCartRules($id_lang, $id_customer, $active, $includeGenericOnes, $hasStock, $cart);
}
@@ -191,7 +191,7 @@ class DiscountCore extends CartRule
/**
* @deprecated 1.5.0.1
*/
public function getValue($nb_discounts = 0, $order_total_products = 0, $shipping_fees = 0, $id_cart = false, $useTax = true, Currency $currency = null, Shop $shop = null)
public function getValue($nb_discounts = 0, $order_total_products = 0, $shipping_fees = 0, $id_cart = false, $useTax = true, ?Currency $currency = null, ?Shop $shop = null)
{
$context = Context::getContext();
if ((int)$id_cart) {