CodeExplorer getOrderDate example
return new CustomerCollection( $this->
fmap(fn (OrderCustomerEntity
$orderCustomer) =>
$orderCustomer->
getCustomer()) );
} public function getLastOrderDate(): ?\DateTimeInterface
{ $lastOrderDate = null;
foreach ($this->
getOrders() as $order) { if (!
$lastOrderDate ||
$order->
getOrderDate() <
$lastOrderDate) { $lastOrderDate =
$order->
getOrderDate();
} } return $lastOrderDate;
} public function getOrders(): OrderCollection
{ $orders =
new OrderCollection();
foreach ($this->
getElements() as $orderCustomer) {