- duplication of code removed

This commit is contained in:
Kamil Niemczycki 2022-07-11 13:11:15 +02:00
parent d2d753640c
commit 3bea1f41b2
Signed by: kamilniemczycki
GPG Key ID: 04D4E2012F969213

View File

@ -105,11 +105,10 @@ class UserVacationStatsRetriever
public function hasVacationDaysLimit(User $user, YearPeriod $yearPeriod): bool
{
$limit = $user->vacationLimits()
return $user->vacationLimits()
->whereBelongsTo($yearPeriod)
->first()?->days;
return $limit !== null;
->first()
?->hasVacation() ?? false;
}
protected function getLimitableVacationTypes(): Collection