public function overlaps(NoteEntry $compare) { $overlap_padding = 60; if ($this->getClientId() == $compare->getClientId() || $this->getEmployeeId() == $compare->getEmployeeId()) { if (($compare->getTimeIn('U') > $this->getTimeIn('U') - $overlap_padding && $compare->getTimeIn('U') < $this->getTimeOut('U') + $overlap_padding || $compare->getTimeOut('U') > $this->getTimeIn('U') - $overlap_padding && $compare->getTimeOut('U') < $this->getTimeOut('U') + $overlap_padding) && !$this->countNoteEntryKidss() && !$compare->countNoteEntryKidss()) { return true; } } return false; }