/** * is holding given Appointment * * ToDo: Remove from here as needs knowledge from Appointment * * @param Appointment $appointment Appointment to check against * @return boolean Appointment is held by the Vacancy */ public function isHolding(Appointment $appointment) { return $appointment->isActive() && $this->start_at <= $appointment->start_at && $this->finish_at >= $appointment->finish_at && $this->service_id == $appointment->service_id && $this->business_id == $appointment->business_id; }