Skip to content

Commit

Permalink
OXDEV-7573 Remove unused eventDispatcher dependency
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Fedurtsya <[email protected]>
  • Loading branch information
Sieg committed Nov 17, 2023
1 parent 9e145a5 commit 212d63b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 8 deletions.
5 changes: 0 additions & 5 deletions src/Setting/Infrastructure/ShopSettingRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,16 @@
use OxidEsales\EshopCommunity\Internal\Framework\Config\DataObject\ShopConfigurationSetting;
use OxidEsales\EshopCommunity\Internal\Framework\Config\Utility\ShopSettingEncoderInterface;
use OxidEsales\EshopCommunity\Internal\Framework\Database\QueryBuilderFactoryInterface;
use OxidEsales\EshopCommunity\Internal\Framework\Theme\Event\ThemeSettingChangedEvent;
use OxidEsales\EshopCommunity\Internal\Transition\Utility\BasicContextInterface;
use OxidEsales\GraphQL\Base\Exception\NotFound;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\Enum\FieldType;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\Exception\NoSettingsFoundForShopException;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\Exception\WrongSettingTypeException;
use OxidEsales\GraphQL\ConfigurationAccess\Setting\Exception\WrongSettingValueException;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use TheCodingMachine\GraphQLite\Types\ID;

final class ShopSettingRepository implements ShopSettingRepositoryInterface
{
public function __construct(
private BasicContextInterface $basicContext,
private EventDispatcherInterface $eventDispatcher,
private QueryBuilderFactoryInterface $queryBuilderFactory,
protected ShopSettingEncoderInterface $shopSettingEncoder,
protected ShopConfigurationSettingDaoInterface $configurationSettingDao,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ public function getSutForShop(int $shopId): ShopSettingRepository

$sut = new ShopSettingRepository(
basicContext: $basicContext,
eventDispatcher: $this->get(EventDispatcherInterface::class),
queryBuilderFactory: $this->get(QueryBuilderFactoryInterface::class),
shopSettingEncoder: $this->get(ShopSettingEncoderInterface::class),
configurationSettingDao: $this->get(ShopConfigurationSettingDaoInterface::class)
Expand Down
2 changes: 0 additions & 2 deletions tests/Unit/Infrastructure/ShopSettingRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -437,14 +437,12 @@ public function wrongSettingsDataProvider(): \Generator

private function getSut(
?BasicContextInterface $basicContext = null,
?EventDispatcherInterface $eventDispatcher = null,
?QueryBuilderFactoryInterface $queryBuilderFactory = null,
?ShopSettingEncoderInterface $shopSettingEncoder = null,
?ShopConfigurationSettingDaoInterface $shopSettingDao = null,
): ShopSettingRepositoryInterface {
return new ShopSettingRepository(
basicContext: $basicContext ?? $this->createStub(BasicContextInterface::class),
eventDispatcher: $eventDispatcher ?? $this->createStub(EventDispatcherInterface::class),
queryBuilderFactory: $queryBuilderFactory ?? $this->createStub(QueryBuilderFactoryInterface::class),
shopSettingEncoder: $shopSettingEncoder ?? $this->createStub(ShopSettingEncoderInterface::class),
configurationSettingDao: $shopSettingDao ?? $this->createStub(ShopConfigurationSettingDaoInterface::class),
Expand Down

0 comments on commit 212d63b

Please sign in to comment.