refactor: use phpstan stubs instead of opencart sources
This commit is contained in:
@@ -6,10 +6,6 @@ parameters:
|
|||||||
- framework
|
- framework
|
||||||
|
|
||||||
scanDirectories:
|
scanDirectories:
|
||||||
- /web/upload/system
|
- stubs
|
||||||
|
|
||||||
scanFiles:
|
|
||||||
- /web/upload/config.php
|
|
||||||
- /web/upload/admin/config.php
|
|
||||||
|
|
||||||
inferPrivatePropertyTypeFromConstructor: true
|
inferPrivatePropertyTypeFromConstructor: true
|
||||||
@@ -119,7 +119,7 @@ class CartService
|
|||||||
'product_option_id' => (int) $option['product_option_id'],
|
'product_option_id' => (int) $option['product_option_id'],
|
||||||
'product_option_value_id' => (int) $option['product_option_value_id'],
|
'product_option_value_id' => (int) $option['product_option_value_id'],
|
||||||
'name' => $option['name'],
|
'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'],
|
'type' => $option['type'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
7
module/oc_telegram_shop/upload/oc_telegram_shop/stubs/Cart.php
Executable file
7
module/oc_telegram_shop/upload/oc_telegram_shop/stubs/Cart.php
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Cart;
|
||||||
|
|
||||||
|
class Cart
|
||||||
|
{
|
||||||
|
}
|
||||||
5
module/oc_telegram_shop/upload/oc_telegram_shop/stubs/Proxy.php
Executable file
5
module/oc_telegram_shop/upload/oc_telegram_shop/stubs/Proxy.php
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class Proxy
|
||||||
|
{
|
||||||
|
}
|
||||||
5
module/oc_telegram_shop/upload/oc_telegram_shop/stubs/Registry.php
Executable file
5
module/oc_telegram_shop/upload/oc_telegram_shop/stubs/Registry.php
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
final class Registry
|
||||||
|
{
|
||||||
|
}
|
||||||
7
module/oc_telegram_shop/upload/oc_telegram_shop/stubs/Tax.php
Executable file
7
module/oc_telegram_shop/upload/oc_telegram_shop/stubs/Tax.php
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Cart;
|
||||||
|
|
||||||
|
final class Tax
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
// HTTP
|
||||||
|
define('HTTP_SERVER', 'https://api.tg.nikitakiselev.ru/');
|
||||||
|
// HTTPS
|
||||||
|
define('HTTPS_SERVER', 'https://api.tg.nikitakiselev.ru/');
|
||||||
|
// DIR
|
||||||
|
define('DIR_APPLICATION', '/web/upload/catalog/');
|
||||||
|
define('DIR_SYSTEM', '/web/upload/system/');
|
||||||
|
define('DIR_IMAGE', '/web/upload/image/');
|
||||||
|
define('DIR_STORAGE', '/web/storage/');
|
||||||
|
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
|
||||||
|
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/theme/');
|
||||||
|
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
|
||||||
|
define('DIR_CACHE', DIR_STORAGE . 'cache/');
|
||||||
|
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
|
||||||
|
define('DIR_LOGS', DIR_STORAGE . 'logs/');
|
||||||
|
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
|
||||||
|
define('DIR_SESSION', DIR_STORAGE . 'session/');
|
||||||
|
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');
|
||||||
|
|
||||||
|
// DB
|
||||||
|
define('DB_DRIVER', 'mysqli');
|
||||||
|
define('DB_HOSTNAME', 'mysql');
|
||||||
|
define('DB_USERNAME', 'root');
|
||||||
|
define('DB_PASSWORD', 'secret');
|
||||||
|
define('DB_DATABASE', 'ocstore3');
|
||||||
|
define('DB_PREFIX', 'oc_');
|
||||||
|
define('DB_PORT', '3306');
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Cart;
|
||||||
|
|
||||||
|
class Currency
|
||||||
|
{
|
||||||
|
public function format($number, $currency, $value = '', $format = true)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function convert($value, $from, $to)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getId($currency)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSymbolLeft($currency)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSymbolRight($currency)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDecimalPlace($currency)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getValue($currency)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function has($currency)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user