| 1 | <?php |
||
| 18 | class DashboardStatistics |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var ChannelInterface |
||
| 22 | */ |
||
| 23 | private $channel; |
||
| 24 | |||
| 25 | /** @var int */ |
||
| 26 | private $totalSales; |
||
| 27 | |||
| 28 | /** @var int */ |
||
| 29 | private $numberOfNewOrders; |
||
| 30 | |||
| 31 | /** @var int */ |
||
| 32 | private $numberOfNewCustomers; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @throws \InvalidArgumentException |
||
| 36 | */ |
||
| 37 | public function __construct(ChannelInterface $channel, int $totalSales, int $numberOfNewOrders, int $numberOfNewCustomers) |
||
| 38 | { |
||
| 39 | $this->channel = $channel; |
||
| 40 | $this->totalSales = $totalSales; |
||
| 41 | $this->numberOfNewOrders = $numberOfNewOrders; |
||
| 42 | $this->numberOfNewCustomers = $numberOfNewCustomers; |
||
| 43 | } |
||
| 44 | |||
| 45 | public function getChannel(): ChannelInterface |
||
| 46 | { |
||
| 47 | return $this->channel; |
||
| 48 | } |
||
| 49 | |||
| 50 | public function getTotalSales(): int |
||
| 54 | |||
| 55 | public function getNumberOfNewOrders(): int |
||
| 56 | { |
||
| 59 | |||
| 60 | public function getNumberOfNewCustomers(): int |
||
| 64 | |||
| 65 | public function getAverageOrderValue(): int |
||
| 73 | } |
||
| 74 |