diff --git a/src/Classes/Location.php b/src/Classes/Location.php index 1d061f7..9d015df 100644 --- a/src/Classes/Location.php +++ b/src/Classes/Location.php @@ -237,7 +237,7 @@ public function checkOrderType($code = null) } /** - * @return \Igniter\Cart\Classes\AbstractOrderType + * @return ?\Igniter\Cart\Classes\AbstractOrderType */ public function getOrderType($code = null) { @@ -367,10 +367,7 @@ public function checkOrderTime($timestamp = null, $orderTypeCode = null) return $orderType->getSchedule()->isOpenAt($timestamp); } - /** - * @return \Carbon\Carbon - */ - public function orderDateTime() + public function orderDateTime(): Carbon { $dateTime = $this->getSession($this->orderType().'-timeslot.dateTime'); if ($this->orderTimeIsAsap()) { @@ -378,9 +375,7 @@ public function orderDateTime() } if (!$dateTime || now()->isAfter($dateTime)) { - $dateTime = $this->hasAsapSchedule() - ? $this->asapScheduleTimeslot() - : $this->firstScheduleTimeslot(); + $dateTime = $this->hasAsapSchedule() ? $this->asapScheduleTimeslot() : $this->firstScheduleTimeslot(); } return make_carbon($dateTime);