Skip to content

Commit

Permalink
interfaces cleanup (#3732)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitek-rostislav authored Jan 17, 2025
2 parents 1040205 + 8a09efd commit 7039722
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 45 deletions.
6 changes: 3 additions & 3 deletions src/DataFixtures/HeurekaCategoryDataFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Shopsys\ProductFeed\HeurekaBundle\DataFixtures;

use Shopsys\Plugin\PluginDataFixtureInterface;
use Shopsys\ProductFeed\HeurekaBundle\Model\HeurekaCategory\HeurekaCategoryDataFactoryInterface;
use Shopsys\ProductFeed\HeurekaBundle\Model\HeurekaCategory\HeurekaCategoryDataFactory;
use Shopsys\ProductFeed\HeurekaBundle\Model\HeurekaCategory\HeurekaCategoryFacade;

class HeurekaCategoryDataFixture implements PluginDataFixtureInterface
Expand All @@ -22,11 +22,11 @@ class HeurekaCategoryDataFixture implements PluginDataFixtureInterface

/**
* @param \Shopsys\ProductFeed\HeurekaBundle\Model\HeurekaCategory\HeurekaCategoryFacade $heurekaCategoryFacade
* @param \Shopsys\ProductFeed\HeurekaBundle\Model\HeurekaCategory\HeurekaCategoryDataFactoryInterface $heurekaCategoryDataFactory
* @param \Shopsys\ProductFeed\HeurekaBundle\Model\HeurekaCategory\HeurekaCategoryDataFactory $heurekaCategoryDataFactory
*/
public function __construct(
private readonly HeurekaCategoryFacade $heurekaCategoryFacade,
private readonly HeurekaCategoryDataFactoryInterface $heurekaCategoryDataFactory,
private readonly HeurekaCategoryDataFactory $heurekaCategoryDataFactory,
) {
}

Expand Down
6 changes: 3 additions & 3 deletions src/DataFixtures/HeurekaProductDataFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Shopsys\FrameworkBundle\Component\Money\Money;
use Shopsys\Plugin\PluginDataFixtureInterface;
use Shopsys\ProductFeed\HeurekaBundle\Model\Product\HeurekaProductDomainDataFactoryInterface;
use Shopsys\ProductFeed\HeurekaBundle\Model\Product\HeurekaProductDomainDataFactory;
use Shopsys\ProductFeed\HeurekaBundle\Model\Product\HeurekaProductDomainFacade;

class HeurekaProductDataFixture implements PluginDataFixtureInterface
Expand All @@ -21,11 +21,11 @@ class HeurekaProductDataFixture implements PluginDataFixtureInterface

/**
* @param \Shopsys\ProductFeed\HeurekaBundle\Model\Product\HeurekaProductDomainFacade $heurekaProductDomainFacade
* @param \Shopsys\ProductFeed\HeurekaBundle\Model\Product\HeurekaProductDomainDataFactoryInterface $heurekaProductDomainDataFactory
* @param \Shopsys\ProductFeed\HeurekaBundle\Model\Product\HeurekaProductDomainDataFactory $heurekaProductDomainDataFactory
*/
public function __construct(
private readonly HeurekaProductDomainFacade $heurekaProductDomainFacade,
private readonly HeurekaProductDomainDataFactoryInterface $heurekaProductDomainDataFactory,
private readonly HeurekaProductDomainDataFactory $heurekaProductDomainDataFactory,
) {
}

Expand Down
6 changes: 3 additions & 3 deletions src/Form/HeurekaProductCrudExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Shopsys\ProductFeed\HeurekaBundle\Form;

use Shopsys\Plugin\PluginCrudExtensionInterface;
use Shopsys\ProductFeed\HeurekaBundle\Model\Product\HeurekaProductDomainDataFactoryInterface;
use Shopsys\ProductFeed\HeurekaBundle\Model\Product\HeurekaProductDomainDataFactory;
use Shopsys\ProductFeed\HeurekaBundle\Model\Product\HeurekaProductDomainFacade;
use Symfony\Contracts\Translation\TranslatorInterface;

Expand All @@ -14,12 +14,12 @@ class HeurekaProductCrudExtension implements PluginCrudExtensionInterface
/**
* @param \Symfony\Contracts\Translation\TranslatorInterface $translator
* @param \Shopsys\ProductFeed\HeurekaBundle\Model\Product\HeurekaProductDomainFacade $heurekaProductDomainFacade
* @param \Shopsys\ProductFeed\HeurekaBundle\Model\Product\HeurekaProductDomainDataFactoryInterface $heurekaProductDomainDataFactory
* @param \Shopsys\ProductFeed\HeurekaBundle\Model\Product\HeurekaProductDomainDataFactory $heurekaProductDomainDataFactory
*/
public function __construct(
private readonly TranslatorInterface $translator,
private readonly HeurekaProductDomainFacade $heurekaProductDomainFacade,
private readonly HeurekaProductDomainDataFactoryInterface $heurekaProductDomainDataFactory,
private readonly HeurekaProductDomainDataFactory $heurekaProductDomainDataFactory,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/Model/HeurekaCategory/HeurekaCategoryDataFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Shopsys\ProductFeed\HeurekaBundle\Model\HeurekaCategory;

class HeurekaCategoryDataFactory implements HeurekaCategoryDataFactoryInterface
class HeurekaCategoryDataFactory
{
/**
* @return \Shopsys\ProductFeed\HeurekaBundle\Model\HeurekaCategory\HeurekaCategoryData
Expand Down
13 changes: 0 additions & 13 deletions src/Model/HeurekaCategory/HeurekaCategoryDataFactoryInterface.php

This file was deleted.

4 changes: 2 additions & 2 deletions src/Model/HeurekaCategory/HeurekaCategoryDownloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ class HeurekaCategoryDownloader

/**
* @param string $heurekaCategoryFeedUrl
* @param \Shopsys\ProductFeed\HeurekaBundle\Model\HeurekaCategory\HeurekaCategoryDataFactoryInterface $heurekaCategoryDataFactory
* @param \Shopsys\ProductFeed\HeurekaBundle\Model\HeurekaCategory\HeurekaCategoryDataFactory $heurekaCategoryDataFactory
*/
public function __construct(
$heurekaCategoryFeedUrl,
protected readonly HeurekaCategoryDataFactoryInterface $heurekaCategoryDataFactory,
protected readonly HeurekaCategoryDataFactory $heurekaCategoryDataFactory,
) {
$this->heurekaCategoryFeedUrl = $heurekaCategoryFeedUrl;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Product/HeurekaProductDomainDataFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Shopsys\ProductFeed\HeurekaBundle\Model\Product;

class HeurekaProductDomainDataFactory implements HeurekaProductDomainDataFactoryInterface
class HeurekaProductDomainDataFactory
{
/**
* @return \Shopsys\ProductFeed\HeurekaBundle\Model\Product\HeurekaProductDomainData
Expand Down
13 changes: 0 additions & 13 deletions src/Model/Product/HeurekaProductDomainDataFactoryInterface.php

This file was deleted.

6 changes: 0 additions & 6 deletions src/Resources/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ services:
tags:
- { name: shopsys.feed, hours: '2', minutes: '0' }

Shopsys\ProductFeed\HeurekaBundle\Model\HeurekaCategory\HeurekaCategoryDataFactoryInterface:
alias: Shopsys\ProductFeed\HeurekaBundle\Model\HeurekaCategory\HeurekaCategoryDataFactory

Shopsys\ProductFeed\HeurekaBundle\Model\HeurekaCategory\HeurekaCategoryDownloader:
arguments:
- '%shopsys.product_feed.heureka_bundle.heureka_category_feed_url%'

Shopsys\ProductFeed\HeurekaBundle\Model\Product\HeurekaProductDomainDataFactoryInterface:
alias: Shopsys\ProductFeed\HeurekaBundle\Model\Product\HeurekaProductDomainDataFactory

0 comments on commit 7039722

Please sign in to comment.