[CS][DX] Refactor

This commit is contained in:
Sylius Bot 2026-06-23 03:06:15 +00:00 committed by GitHub
parent 827990dfe8
commit 7754061131
11 changed files with 11 additions and 11 deletions

View file

@ -39,7 +39,7 @@ final class ProductVariantNormalizer implements NormalizerInterface, NormalizerA
private const ALREADY_CALLED = 'sylius_product_variant_normalizer_already_called';
public function __construct(
private readonly ProductVariantPricesCalculatorInterface|CatalogPricesCalculatorInterface $priceCalculator,
private readonly CatalogPricesCalculatorInterface|ProductVariantPricesCalculatorInterface $priceCalculator,
private readonly AvailabilityCheckerInterface $availabilityChecker,
private readonly SectionProviderInterface $uriBasedSectionContext,
private readonly IriConverterInterface $iriConverter,

View file

@ -34,7 +34,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
final class ProductVariantNormalizerTest extends TestCase
{
private MockObject&CatalogPricesCalculatorInterface $pricesCalculator;
private CatalogPricesCalculatorInterface&MockObject $pricesCalculator;
private AvailabilityCheckerInterface&MockObject $availabilityChecker;

View file

@ -23,7 +23,7 @@ use Webmozart\Assert\Assert;
final class PriceExtension extends AbstractExtension
{
public function __construct(
private readonly ProductVariantPricesCalculatorInterface|CatalogPricesCalculatorInterface $productVariantPricesCalculator,
private readonly CatalogPricesCalculatorInterface|ProductVariantPricesCalculatorInterface $productVariantPricesCalculator,
) {
if (!$this->productVariantPricesCalculator instanceof CatalogPricesCalculatorInterface) {
trigger_deprecation(

View file

@ -49,7 +49,7 @@ class CardComponent
protected readonly ProductVariantResolverInterface $productVariantResolver,
protected readonly ChannelContextInterface $channelContext,
protected readonly LocaleContextInterface $localeContext,
protected readonly ProductVariantPricesCalculatorInterface|CatalogPricesCalculatorInterface $productVariantPricesCalculator,
protected readonly CatalogPricesCalculatorInterface|ProductVariantPricesCalculatorInterface $productVariantPricesCalculator,
) {
if (!$this->productVariantPricesCalculator instanceof CatalogPricesCalculatorInterface) {
trigger_deprecation(

View file

@ -44,7 +44,7 @@ class PriceComponent
public bool $hasDiscount = false;
public function __construct(
protected readonly ProductVariantPricesCalculatorInterface|CatalogPricesCalculatorInterface $productVariantPricesCalculator,
protected readonly CatalogPricesCalculatorInterface|ProductVariantPricesCalculatorInterface $productVariantPricesCalculator,
protected readonly MoneyFormatterInterface $moneyFormatter,
protected readonly ChannelContextInterface $channelContext,
protected readonly LocaleContextInterface $localeContext,

View file

@ -21,7 +21,7 @@ use Sylius\Component\Core\Model\ProductVariantInterface;
final readonly class ProductVariantLowestPriceMapProvider implements ProductVariantMapProviderInterface
{
public function __construct(
private ProductVariantPricesCalculatorInterface|CatalogPricesCalculatorInterface $calculator,
private CatalogPricesCalculatorInterface|ProductVariantPricesCalculatorInterface $calculator,
) {
if (!$this->calculator instanceof CatalogPricesCalculatorInterface) {
trigger_deprecation(

View file

@ -21,7 +21,7 @@ use Sylius\Component\Core\Model\ProductVariantInterface;
final class ProductVariantOriginalPriceMapProvider implements ProductVariantMapProviderInterface
{
public function __construct(
private ProductVariantPricesCalculatorInterface|CatalogPricesCalculatorInterface $calculator,
private CatalogPricesCalculatorInterface|ProductVariantPricesCalculatorInterface $calculator,
) {
if (!$this->calculator instanceof CatalogPricesCalculatorInterface) {
trigger_deprecation(

View file

@ -21,7 +21,7 @@ use Sylius\Component\Core\Model\ProductVariantInterface;
final class ProductVariantPriceMapProvider implements ProductVariantMapProviderInterface
{
public function __construct(
private ProductVariantPricesCalculatorInterface|CatalogPricesCalculatorInterface $calculator,
private CatalogPricesCalculatorInterface|ProductVariantPricesCalculatorInterface $calculator,
) {
if (!$this->calculator instanceof CatalogPricesCalculatorInterface) {
trigger_deprecation(

View file

@ -30,7 +30,7 @@ final class ProductVariantLowestPriceMapProviderTest extends TestCase
private ChannelPricingInterface&MockObject $channelPricing;
private MockObject&CatalogPricesCalculatorInterface $calculator;
private CatalogPricesCalculatorInterface&MockObject $calculator;
private ProductVariantLowestPriceMapProvider $provider;

View file

@ -30,7 +30,7 @@ final class ProductVariantOriginalPriceMapProviderTest extends TestCase
private ChannelPricingInterface&MockObject $channelPricing;
private MockObject&CatalogPricesCalculatorInterface $calculator;
private CatalogPricesCalculatorInterface&MockObject $calculator;
private ProductVariantOriginalPriceMapProvider $provider;

View file

@ -30,7 +30,7 @@ final class ProductVariantPriceMapProviderTest extends TestCase
private ChannelPricingInterface&MockObject $channelPricing;
private MockObject&CatalogPricesCalculatorInterface $calculator;
private CatalogPricesCalculatorInterface&MockObject $calculator;
private ProductVariantPriceMapProvider $provider;