| @@ 74-90 (lines=17) @@ | ||
| 71 | * @param SaleInterface $sale |
|
| 72 | * @param DateTime $time |
|
| 73 | */ |
|
| 74 | public function __construct( |
|
| 75 | $id, |
|
| 76 | TypeInterface $type, |
|
| 77 | TargetInterface $target, |
|
| 78 | QuantityInterface $quantity, |
|
| 79 | CustomerInterface $customer = null, |
|
| 80 | SaleInterface $sale = null, |
|
| 81 | DateTime $time = null |
|
| 82 | ) { |
|
| 83 | $this->id = $id; |
|
| 84 | $this->type = $type; |
|
| 85 | $this->target = $target; |
|
| 86 | $this->quantity = $quantity; |
|
| 87 | $this->customer = $customer; |
|
| 88 | $this->sale = $sale; |
|
| 89 | $this->time = $time; |
|
| 90 | } |
|
| 91 | ||
| 92 | /** |
|
| 93 | * {@inheritdoc} |
|
| @@ 65-81 (lines=17) @@ | ||
| 62 | */ |
|
| 63 | protected $time; |
|
| 64 | ||
| 65 | public function __construct( |
|
| 66 | $id, |
|
| 67 | ActionInterface $action = null, |
|
| 68 | PriceInterface $price = null, |
|
| 69 | TargetInterface $target = null, |
|
| 70 | QuantityInterface $usage, |
|
| 71 | Money $sum, |
|
| 72 | DateTime $time = null |
|
| 73 | ) { |
|
| 74 | $this->id = $id; |
|
| 75 | $this->action = $action; |
|
| 76 | $this->price = $price; |
|
| 77 | $this->target = $target; |
|
| 78 | $this->usage = $usage; |
|
| 79 | $this->sum = $sum; |
|
| 80 | $this->time = $time; |
|
| 81 | } |
|
| 82 | ||
| 83 | /** |
|
| 84 | * Returns charge that is sum of given charges. |
|