Skip to content

Commit

Permalink
unify syntax in readmes (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
petrparolek committed Mar 16, 2021
1 parent b5ea686 commit d27567a
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 38 deletions.
72 changes: 36 additions & 36 deletions .docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,36 +104,36 @@ First, create class that implements ITranslator
```php
class Translator implements Contributte\Invoice\ITranslator {

private static $translations = [
'subscriber' => 'Subscriber',
'vat' => 'VAT number',
'vaTin' => 'VATIN',
'date' => 'Date',
'invoice' => 'Invoice',
'invoiceNumber' => 'Invoice number',
'taxPay' => '',
'notTax' => 'VAT unregistered',
'paymentData' => 'Payment information',
'page' => 'Page',
'from' => '/',
'totalPrice' => 'Total price',
'item' => 'Item',
'count' => 'Quantity',
'pricePerItem' => 'Price per item',
'total' => 'Total',
'accountNumber' => 'Account number',
'swift' => 'Swift',
'iban' => 'Iban',
'varSymbol' => 'Variable symbol',
'constSymbol' => 'Constant symbol',
'tax' => 'TAX',
'subtotal' => 'Subtotal',
'dueDate' => 'Due date',
];
public function translate(string $message): string {
private static $translations = [
'subscriber' => 'Subscriber',
'vat' => 'VAT number',
'vaTin' => 'VATIN',
'date' => 'Date',
'invoice' => 'Invoice',
'invoiceNumber' => 'Invoice number',
'taxPay' => '',
'notTax' => 'VAT unregistered',
'paymentData' => 'Payment information',
'page' => 'Page',
'from' => '/',
'totalPrice' => 'Total price',
'item' => 'Item',
'count' => 'Quantity',
'pricePerItem' => 'Price per item',
'total' => 'Total',
'accountNumber' => 'Account number',
'swift' => 'Swift',
'iban' => 'Iban',
'varSymbol' => 'Variable symbol',
'constSymbol' => 'Constant symbol',
'tax' => 'TAX',
'subtotal' => 'Subtotal',
'dueDate' => 'Due date',
];

public function translate(string $message): string {
return self::$translations[$message];
}
}

}
```
Expand Down Expand Up @@ -165,12 +165,12 @@ if you use nette, recommended way is

```php
class CustomPresenter {
public function actionPreview() {
$invoice = new Contributte\Invoice\Invoice($company);
$this->sendResponse($invoice->createResponse($customer, $order));
}

public function actionPreview() {
$invoice = new Contributte\Invoice\Invoice($company);

$this->sendResponse($invoice->createResponse($customer, $order));
}

}
```
Expand All @@ -183,7 +183,7 @@ $invoice->send(Contributte\Invoice\Preview\PreviewFactory::createCustomer(), Con

## Neon configuration

```yaml
```neon
extensions:
invoice: Contributte\Invoice\DI\InvoiceExtension
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

To install latest version of `contributte/invoice` use [Composer](https://getcomposer.org).

```
$ composer require contributte/invoice
```bash
composer require contributte/invoice
```

## Documentation
Expand Down

0 comments on commit d27567a

Please sign in to comment.