Add PHPStan configuration for Symfony4 tests

- Created a new phpstan.neon file in the Symfony4 tests directory.
- Configured paths and excluded Symfony3 directory.
- Added bootstrap files for autoloading.
- Set dynamic constant names and adjusted reporting settings.
- Established PHPStan level to 6 for stricter analysis.
This commit is contained in:
2026-02-09 23:14:09 +01:00
parent 58947ad589
commit 3bd8164d3d
169 changed files with 4964 additions and 3877 deletions

View File

@@ -48,12 +48,13 @@ class AdminEmpikOffersController extends ModuleAdminController
$continue = !$this->exportOfferProcessor->isLastPage();
$this->ajaxDie(json_encode([
$this->ajaxRender(json_encode([
'success' => !$this->exportOfferProcessor->hasErrors(),
'errors' => $this->exportOfferProcessor->getErrors(),
'continue' => $continue,
'redirect' => $this->link->getAdminLink($this->controller_name, ['conf' => self::CONF_EXPORT_SUCCESS]),
]));
die();
}
public function initContent()
@@ -112,6 +113,7 @@ class AdminEmpikOffersController extends ModuleAdminController
'type' => 'switch',
'label' => $this->l('Sync Empik Marketplace offers automatically'),
'hint' => $this->l('Sync Empik Marketplace offers automatically'),
'desc' => $this->l('When enabled, prices and stock will be automatically synchronized with EmpikPlace via CRON.'),
'name' => 'sync_offers',
'is_bool' => true,
'values' => [
@@ -131,6 +133,7 @@ class AdminEmpikOffersController extends ModuleAdminController
'type' => 'switch',
'label' => $this->l('Sync logistic class'),
'hint' => $this->l('Enabling this option will update logistic class for all offers'),
'desc' => $this->l('When enabled, logistic class will be included in offer export.'),
'name' => 'sync_logistic_class',
'is_bool' => true,
'values' => [
@@ -150,6 +153,7 @@ class AdminEmpikOffersController extends ModuleAdminController
'type' => 'select',
'label' => $this->l('Offer identifier'),
'hint' => $this->l('Offer identifier'),
'desc' => $this->l('Product identifier sent to EmpikPlace. If products have EAN codes, we recommend using EAN.'),
'name' => 'offer_identifier',
'options' => [
'query' => [
@@ -170,6 +174,7 @@ class AdminEmpikOffersController extends ModuleAdminController
'type' => 'select',
'label' => $this->l('SKU type'),
'hint' => $this->l('SKU type'),
'desc' => $this->l('Field visible as offer SKU in EmpikPlace. Must match existing offers or delete old offers first.'),
'name' => 'sku_type',
'options' => [
'query' => [
@@ -194,6 +199,7 @@ class AdminEmpikOffersController extends ModuleAdminController
'type' => 'select',
'label' => $this->l('Leadtime to ship'),
'hint' => $this->l('Leadtime to ship'),
'desc' => $this->l('Business days to prepare and ship the order. Leave unset to use EmpikPlace default.'),
'name' => 'lead_time_to_ship',
'options' => [
'query' => $leadTimeToShip,
@@ -205,18 +211,22 @@ class AdminEmpikOffersController extends ModuleAdminController
'type' => 'text',
'label' => $this->l('Price ratio'),
'hint' => $this->l('Price ratio'),
'desc' => $this->l('Multiplier for offer prices. Value 1.0 = original price, 1.1 = +10%, 0.9 = -10%.'),
'name' => 'price_ratio',
],
[
'type' => 'text',
'label' => $this->l('Add to price'),
'hint' => $this->l('Add to price'),
'desc' => $this->l('Fixed amount added to all offer prices.'),
'name' => 'add_to_price',
'suffix' => Currency::getDefaultCurrency()->sign,
],
[
'type' => 'text',
'label' => $this->l('Reduce stock'),
'hint' => $this->l('Reduce stock'),
'desc' => $this->l('Safety stock buffer. E.g. value 3 means products with stock ≤3 will be sent as 0.'),
'name' => 'reduce_stock',
],
[
@@ -338,4 +348,4 @@ class AdminEmpikOffersController extends ModuleAdminController
{
return Translate::getModuleTranslation($this->module, $string, get_class($this), null, $addslashes);
}
}
}