mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-05 20:57:12 +00:00
[CS][DX] Refactor
This commit is contained in:
parent
827990dfe8
commit
7754061131
11 changed files with 11 additions and 11 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ final class ProductVariantLowestPriceMapProviderTest extends TestCase
|
|||
|
||||
private ChannelPricingInterface&MockObject $channelPricing;
|
||||
|
||||
private MockObject&CatalogPricesCalculatorInterface $calculator;
|
||||
private CatalogPricesCalculatorInterface&MockObject $calculator;
|
||||
|
||||
private ProductVariantLowestPriceMapProvider $provider;
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ final class ProductVariantOriginalPriceMapProviderTest extends TestCase
|
|||
|
||||
private ChannelPricingInterface&MockObject $channelPricing;
|
||||
|
||||
private MockObject&CatalogPricesCalculatorInterface $calculator;
|
||||
private CatalogPricesCalculatorInterface&MockObject $calculator;
|
||||
|
||||
private ProductVariantOriginalPriceMapProvider $provider;
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ final class ProductVariantPriceMapProviderTest extends TestCase
|
|||
|
||||
private ChannelPricingInterface&MockObject $channelPricing;
|
||||
|
||||
private MockObject&CatalogPricesCalculatorInterface $calculator;
|
||||
private CatalogPricesCalculatorInterface&MockObject $calculator;
|
||||
|
||||
private ProductVariantPriceMapProvider $provider;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue