Skip to content

Commit

Permalink
Do not use abbreviation in module independant inerfaces
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Fedurtsya <anton@fedurtsya.com>
  • Loading branch information
Sieg committed Oct 7, 2023
1 parent 702a9ba commit e047119
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Document/MpdfDocument/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ protected function preparePdfData(InvoiceDataInterface $invoiceData): PdfData
{
$currentLanguage = $this->shopLanguage->getTplLanguage();
try {
$this->shopLanguage->faForceSetTplLanguage((int)$invoiceData->getLanguageId());
$this->shopLanguage->forceSetTplLanguage((int)$invoiceData->getLanguageId());
$html = $this->templateRenderer->renderTemplate(self::INVOICE_TEMPLATE, ['invoice' => $invoiceData]);
} finally {
$this->shopLanguage->faForceSetTplLanguage((int)$currentLanguage);
$this->shopLanguage->forceSetTplLanguage((int)$currentLanguage);
}

return new PdfData(
Expand Down
2 changes: 1 addition & 1 deletion src/Transition/Core/LanguageInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

interface LanguageInterface
{
public function faForceSetTplLanguage(int $language): void;
public function forceSetTplLanguage(int $language): void;

public function getTplLanguage(): int;
}
2 changes: 1 addition & 1 deletion src/Transition/Core/LanguageProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function __construct(\OxidEsales\Eshop\Core\Language $language)
$this->language = $language;
}

public function faForceSetTplLanguage(int $language): void
public function forceSetTplLanguage(int $language): void
{
$this->language->faForceSetTplLanguage($language);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Integration/Document/MpdfDocument/BuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public function testGetBinaryPdfFromData(): void
'renderTemplate' => 'someContentHtml'
]);

$shopLanguage = $this->createPartialMock(LanguageProxy::class, ['getTplLanguage', 'faForceSetTplLanguage']);
$shopLanguage->expects($this->exactly(2))->method('faForceSetTplLanguage');
$shopLanguage = $this->createPartialMock(LanguageProxy::class, ['getTplLanguage', 'forceSetTplLanguage']);
$shopLanguage->expects($this->exactly(2))->method('forceSetTplLanguage');

$moduleSettings = $this->createConfiguredMock(ModuleSettings::class, [
'getDocumentFooter' => 'someFooter'
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Transition/Core/LanguageProxyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function testForceLanguageIdSetter(): void
$languageMock = $this->createPartialMock(Language::class, []);

$sut = new LanguageProxy($languageMock);
$sut->faForceSetTplLanguage($languageId);
$sut->forceSetTplLanguage($languageId);

$this->assertSame($languageId, $sut->getTplLanguage());
}
Expand Down

0 comments on commit e047119

Please sign in to comment.