Skip to content

Commit 0259a6a

Browse files
committed
Fixes after review
1 parent eb66068 commit 0259a6a

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

src/Twig/InvoicesExtension.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ final class InvoicesExtension extends AbstractExtension
2323
public function __construct(
2424
private readonly InvoiceRepositoryInterface $invoiceRepository,
2525
private readonly bool $pdfEnabled = true,
26-
)
27-
{
26+
) {
2827
}
2928

3029
public function getFunctions(): array

templates/shop/account/order/grid/field/invoices.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
{% if invoices is empty %}
33
<span class="text-muted">—</span>
44
{% else %}
5-
{% set pdfEnabled = invoices_pdf_enabled() %}
5+
{% set pdf_enabled = invoices_pdf_enabled() %}
66
{% for invoice in invoices %}
7-
{% if pdfEnabled %}
7+
{% if pdf_enabled %}
88
<div>
99
<a href="{{ path('sylius_invoicing_shop_invoice_download', {'id': invoice.id}) }}" {{ sylius_test_html_attribute('invoice-link') }}>{{ invoice.number }}</a>
1010
</div>

tests/Behat/Context/Ui/Shop/AccountContext.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
namespace Tests\Sylius\InvoicingPlugin\Behat\Context\Ui\Shop;
1515

1616
use Behat\Behat\Context\Context;
17+
use Behat\Step\Then;
1718
use Tests\Sylius\InvoicingPlugin\Behat\Page\Shop\Account\Order\IndexPageInterface;
1819
use Webmozart\Assert\Assert;
1920

@@ -23,17 +24,13 @@ public function __construct(private IndexPageInterface $orderIndexPage)
2324
{
2425
}
2526

26-
/**
27-
* @Then I should be able to download an invoice from my orders list
28-
*/
27+
#[Then('I should be able to download an invoice from my orders list')]
2928
public function iShouldBeAbleToDownloadAnInvoiceFromMyOrdersList(): void
3029
{
3130
Assert::true($this->orderIndexPage->hasInvoiceLinks());
3231
}
3332

34-
/**
35-
* @Then I should not be able to download an invoice from my orders list
36-
*/
33+
#[Then('I should not be able to download an invoice from my orders list')]
3734
public function iShouldNotBeAbleToDownloadAnInvoiceFromMyOrdersList(): void
3835
{
3936
Assert::true($this->orderIndexPage->hasPlainInvoiceNumbers());

0 commit comments

Comments
 (0)