Skip to content

Commit

Permalink
used trait SmartObject
Browse files Browse the repository at this point in the history
  • Loading branch information
MartkCz committed May 21, 2018
1 parent 68a33f6 commit d852fba
Show file tree
Hide file tree
Showing 14 changed files with 50 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Components/Paginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@

namespace WebChemistry\Invoice\Components;

use Nette\SmartObject;
use WebChemistry\Invoice\Data\Item;

class Paginator {

use SmartObject;

/** @var Item[] */
private $items;

Expand Down
4 changes: 4 additions & 0 deletions src/Data/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@

namespace WebChemistry\Invoice\Data;

use Nette\SmartObject;

class Account {

use SmartObject;

/** @var string */
private $accountNumber;

Expand Down
3 changes: 3 additions & 0 deletions src/Data/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@

namespace WebChemistry\Invoice\Data;

use Nette\SmartObject;
use WebChemistry\Invoice\InvoiceException;

class Item {

use SmartObject;

/** @var string */
protected $name;

Expand Down
3 changes: 3 additions & 0 deletions src/Data/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@

namespace WebChemistry\Invoice\Data;

use Nette\SmartObject;
use WebChemistry\Invoice\InvoiceException;

class Order {

use SmartObject;

/** @var string|int */
private $number;

Expand Down
4 changes: 4 additions & 0 deletions src/Data/PaymentInformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@

namespace WebChemistry\Invoice\Data;

use Nette\SmartObject;

class PaymentInformation {

use SmartObject;

/** @var string */
private $currency;

Expand Down
4 changes: 4 additions & 0 deletions src/Data/Subject.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@

namespace WebChemistry\Invoice\Data;

use Nette\SmartObject;

abstract class Subject {

use SmartObject;

/** @var string */
protected $name;

Expand Down
4 changes: 4 additions & 0 deletions src/Formatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@

namespace WebChemistry\Invoice;

use Nette\SmartObject;

class Formatter implements IFormatter {

use SmartObject;

const ENGLISH = 'en',
CZECH = 'cs';

Expand Down
3 changes: 3 additions & 0 deletions src/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace WebChemistry\Invoice;

use Nette\SmartObject;
use WebChemistry\Invoice\Data\Company;
use WebChemistry\Invoice\Data\Customer;
use WebChemistry\Invoice\Data\Order;
Expand All @@ -14,6 +15,8 @@

class Invoice {

use SmartObject;

/** @var Company */
protected $company;

Expand Down
3 changes: 3 additions & 0 deletions src/InvoiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace WebChemistry\Invoice;

use Nette\SmartObject;
use WebChemistry\Invoice\Data\Account;
use WebChemistry\Invoice\Data\Company;
use WebChemistry\Invoice\Data\Customer;
Expand All @@ -12,6 +13,8 @@

class InvoiceFactory {

use SmartObject;

/**
* @param string $accountNumber
* @param string|null $iBan
Expand Down
4 changes: 4 additions & 0 deletions src/Renderers/Color.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@

namespace WebChemistry\Invoice\Renderers;

use Nette\SmartObject;

class Color {

use SmartObject;

/** @var int */
private $red;

Expand Down
4 changes: 4 additions & 0 deletions src/Renderers/PDFRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@

namespace WebChemistry\Invoice\Renderers;

use Nette\SmartObject;

class PDFRenderer implements IRenderer {

use SmartObject;

/** @var PDF */
protected $pdf;

Expand Down
4 changes: 4 additions & 0 deletions src/Renderers/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@

namespace WebChemistry\Invoice\Renderers;

use Nette\SmartObject;

class Settings {

use SmartObject;

const DEFAULT_FONT_SIZE = null;

const BORDER_LEFT = 'L',
Expand Down
3 changes: 3 additions & 0 deletions src/Templates/DefaultTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace WebChemistry\Invoice\Templates;

use Nette\SmartObject;
use Nette\Utils\Strings;
use WebChemistry\Invoice\Components\Paginator;
use WebChemistry\Invoice\Data\Company;
Expand All @@ -18,6 +19,8 @@

class DefaultTemplate implements ITemplate {

use SmartObject;

/** @var Color */
private $primary;

Expand Down
4 changes: 4 additions & 0 deletions src/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

namespace WebChemistry\Invoice;

use Nette\SmartObject;

class Translator implements ITranslator {

use SmartObject;

const ENGLISH = 'en',
CZECH = 'cs';

Expand Down

0 comments on commit d852fba

Please sign in to comment.