1 | <?php |
||
23 | final class CustomerStatisticsProvider implements CustomerStatisticsProviderInterface |
||
24 | { |
||
25 | /** |
||
26 | * @var OrderRepositoryInterface |
||
27 | */ |
||
28 | private $orderRepository; |
||
29 | |||
30 | /** |
||
31 | * @var RepositoryInterface |
||
32 | */ |
||
33 | private $channelRepository; |
||
34 | |||
35 | /** |
||
36 | * @param OrderRepositoryInterface $orderRepository |
||
37 | * @param RepositoryInterface $channelRepository |
||
38 | */ |
||
39 | public function __construct(OrderRepositoryInterface $orderRepository, RepositoryInterface $channelRepository) |
||
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | */ |
||
48 | public function getCustomerStatistics(CustomerInterface $customer) |
||
73 | |||
74 | /** |
||
75 | * @param OrderInterface[] $orders |
||
76 | * |
||
77 | * @return int |
||
78 | */ |
||
79 | private function getOrdersSummedTotal(array $orders) |
||
86 | |||
87 | /** |
||
88 | * @param OrderInterface[] $orders |
||
89 | * @param ChannelInterface $channel |
||
90 | * |
||
91 | * @return OrderInterface[] |
||
92 | */ |
||
93 | private function filterOrdersByChannel(array $orders, ChannelInterface $channel) |
||
99 | } |
||
100 |
Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.