| Total Complexity | 1 |
| Complexity/F | 1 |
| Lines of Code | 12 |
| Function Count | 1 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import {Holiday, HolidayStatus} from '../Holiday.entity'; |
||
| 2 | import {User} from '../../User/User.entity'; |
||
| 3 | |||
| 4 | export class CanHolidayBeRefused { |
||
| 5 | public isSatisfiedBy(holiday: Holiday, user: User): boolean { |
||
| 6 | return ( |
||
| 7 | holiday.getStatus() === HolidayStatus.PENDING && |
||
| 8 | holiday.getUser().getId() !== user.getId() |
||
| 9 | ); |
||
| 10 | } |
||
| 11 | } |
||
| 12 |