Skip to content

Commit

Permalink
OXDEV-7557 Fix phpcs reported issues
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Fedurtsya <[email protected]>
  • Loading branch information
Sieg committed Nov 14, 2023
1 parent f1a3a3b commit 0aa210a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function testChangeThemeSettingInteger(): void
->method('saveSettingValue')
->with($nameID, 'awesomeTheme', '123');

$repository->saveIntegerSetting($nameID, 123, 'awesomeTheme');
$repository->saveIntegerSetting($nameID, 123, 'awesomeTheme');
}

public function testChangeNoThemeSettingInteger(): void
Expand Down Expand Up @@ -64,6 +64,6 @@ public function testChangeNoThemeSettingInteger(): void
$this->expectException(NotFound::class);
$this->expectExceptionMessage('The integer setting "' . $nameID->val() . '" doesn\'t exist');

$repository->saveIntegerSetting($nameID, 123, 'awesomeTheme');
$repository->saveIntegerSetting($nameID, 123, 'awesomeTheme');
}
}
9 changes: 2 additions & 7 deletions tests/Unit/Infrastructure/ShopSettingRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,9 @@ private function getFetchOneShopSettingRepoInstance(string|bool $qbReturnValue):
return $this->getShopSettingRepository($queryBuilderFactory);
}

/**
* @param MockObject|QueryBuilderFactoryInterface $queryBuilderFactory
* @return ShopSettingRepository
*/
private function getShopSettingRepository(
MockObject|QueryBuilderFactoryInterface $queryBuilderFactory
): ShopSettingRepository
{
QueryBuilderFactoryInterface $queryBuilderFactory
): ShopSettingRepository {
$basicContextMock = $this->getBasicContextMock(1);
$eventDispatcher = $this->createMock(EventDispatcherInterface::class);
$shopSettingEncoder = new ShopSettingEncoder();
Expand Down
7 changes: 3 additions & 4 deletions tests/Unit/Service/ThemeSettingServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,14 +314,13 @@ public function testChangeThemeSettingCollection(): void
$this->assertSame($value, $collectionSetting->getValue());
}

public function getSut(
private function getSut(
?ThemeSettingRepositoryInterface $themeSettingRepository = null,
?JsonServiceInterface $jsonService = null,
): ThemeSettingService {
$themeSettingRepository = $themeSettingRepository ?? $this->createStub(ThemeSettingRepositoryInterface::class);
return new ThemeSettingService(
themeSettingRepository: $themeSettingRepository ?? $this->createStub(
ThemeSettingRepositoryInterface::class
),
themeSettingRepository: $themeSettingRepository,
jsonService: $jsonService ?? $this->createStub(JsonServiceInterface::class)
);
}
Expand Down

0 comments on commit 0aa210a

Please sign in to comment.