src/Timetable/Timetable.php 1 location
|
@@ 182-185 (lines=4) @@
|
179 |
|
{ |
180 |
|
$starting = $this->from; |
181 |
|
|
182 |
|
for ($i = 0; $i < $this->future; $i++) { |
183 |
|
$date = date('Y-m-d', strtotime("$starting +$i days")); |
184 |
|
$dates[$date] = $date; |
185 |
|
} |
186 |
|
|
187 |
|
return $dates; |
188 |
|
} |
src/Vacancy/VacancyManager.php 1 location
|
@@ 168-170 (lines=3) @@
|
165 |
|
public function generateAvailability($startDate = 'today', $futureDays = 10) |
166 |
|
{ |
167 |
|
$dates = []; |
168 |
|
for ($i = 0; $i < $futureDays; $i++) { |
169 |
|
$dates[date('Y-m-d', strtotime("$startDate +$i days"))] = []; |
170 |
|
} |
171 |
|
|
172 |
|
foreach ($this->business->vacancies as $vacancy) { |
173 |
|
if (array_key_exists($vacancy->date, $dates)) { |