diff --git a/module/oc_telegram_shop/upload/oc_telegram_shop/phpstan.neon b/module/oc_telegram_shop/upload/oc_telegram_shop/phpstan.neon index 1da1883..220bbb3 100644 --- a/module/oc_telegram_shop/upload/oc_telegram_shop/phpstan.neon +++ b/module/oc_telegram_shop/upload/oc_telegram_shop/phpstan.neon @@ -6,10 +6,6 @@ parameters: - framework scanDirectories: - - /web/upload/system - - scanFiles: - - /web/upload/config.php - - /web/upload/admin/config.php + - stubs inferPrivatePropertyTypeFromConstructor: true \ No newline at end of file diff --git a/module/oc_telegram_shop/upload/oc_telegram_shop/src/Services/CartService.php b/module/oc_telegram_shop/upload/oc_telegram_shop/src/Services/CartService.php index a6139d3..cf5e4af 100755 --- a/module/oc_telegram_shop/upload/oc_telegram_shop/src/Services/CartService.php +++ b/module/oc_telegram_shop/upload/oc_telegram_shop/src/Services/CartService.php @@ -119,7 +119,7 @@ class CartService 'product_option_id' => (int) $option['product_option_id'], 'product_option_value_id' => (int) $option['product_option_value_id'], 'name' => $option['name'], - 'value' => (utf8_strlen($value) > 20 ? utf8_substr($value, 0, 20) . '..' : $value), + 'value' => (strlen($value) > 20 ? substr($value, 0, 20) . '..' : $value), 'type' => $option['type'], ]; } diff --git a/module/oc_telegram_shop/upload/oc_telegram_shop/stubs/Cart.php b/module/oc_telegram_shop/upload/oc_telegram_shop/stubs/Cart.php new file mode 100755 index 0000000..0a061fa --- /dev/null +++ b/module/oc_telegram_shop/upload/oc_telegram_shop/stubs/Cart.php @@ -0,0 +1,7 @@ +