@@ 127-137 (lines=11) @@ | ||
124 | * |
|
125 | * @return bool|Time |
|
126 | */ |
|
127 | public function nextClose(Time $time) |
|
128 | { |
|
129 | return $this->openingHoursFilter([ |
|
130 | function ($timeRange) use ($time) { |
|
131 | return $this->findCloseInWorkingHours($time, $timeRange); |
|
132 | }, |
|
133 | function ($timeRange) use ($time) { |
|
134 | return $this->findCloseInFreeTime($time, $timeRange); |
|
135 | }, |
|
136 | ]); |
|
137 | } |
|
138 | ||
139 | /** |
|
140 | * @param Time $time |
|
@@ 144-154 (lines=11) @@ | ||
141 | * |
|
142 | * @return bool|TimeRange |
|
143 | */ |
|
144 | public function nextCloseRange(Time $time) |
|
145 | { |
|
146 | return $this->openingHoursFilter([ |
|
147 | function ($timeRange) use ($time) { |
|
148 | return $this->findCloseRangeInWorkingHours($time, $timeRange); |
|
149 | }, |
|
150 | function ($timeRange) use ($time) { |
|
151 | return $this->findRangeInFreeTime($time, $timeRange); |
|
152 | }, |
|
153 | ]); |
|
154 | } |
|
155 | ||
156 | /** |
|
157 | * @param Time $time |
|
@@ 161-171 (lines=11) @@ | ||
158 | * |
|
159 | * @return bool|Time |
|
160 | */ |
|
161 | public function previousOpen(Time $time) |
|
162 | { |
|
163 | return $this->openingHoursFilter([ |
|
164 | function ($timeRange) use ($time) { |
|
165 | return $this->findPreviousOpenInFreeTime($time, $timeRange); |
|
166 | }, |
|
167 | function ($timeRange) use ($time) { |
|
168 | return $this->findOpenInWorkingHours($time, $timeRange); |
|
169 | }, |
|
170 | ], true); |
|
171 | } |
|
172 | ||
173 | /** |
|
174 | * @param Time $time |