@@ -18,6 +18,9 @@ |
||
| 18 | 18 | |
| 19 | 19 | protected $timezone = 'UTC'; |
| 20 | 20 | |
| 21 | + /** |
|
| 22 | + * @param \Illuminate\Database\Eloquent\Relations\HasMany $vacancies |
|
| 23 | + */ |
|
| 21 | 24 | public function __construct($vacancies, $timezone = 'UTC') |
| 22 | 25 | { |
| 23 | 26 | $this->vacancies = $vacancies; |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | if ($this->duration !== null) { |
| 16 | 16 | $toDatetime = $fromDatetime->addMinutes($this->duration); |
| 17 | 17 | |
| 18 | - $results = $results->reject(function ($vacancy) use ($fromDatetime, $toDatetime) { |
|
| 18 | + $results = $results->reject(function($vacancy) use ($fromDatetime, $toDatetime) { |
|
| 19 | 19 | return !$vacancy->hasRoomBetween($fromDatetime, $toDatetime); |
| 20 | 20 | }); |
| 21 | 21 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | $this->vacancies->forService($this->service); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | - if ($this->date !== null && $this->time !== null) { |
|
| 32 | + if ($this->date !== null && $this->time !== null) { |
|
| 33 | 33 | $this->vacancies->forDateTime($this->getUTCDateTime()); |
| 34 | 34 | } |
| 35 | 35 | |