return Shift::NIGHT === (int) $shiftId ;
}
- public static function getShiftIdsByShiftType ($shiftType) {
- return $shiftType == 0 ? [self::DAY, self::NIGHT, self::ADMINISTRATOR_8_17, self::ADMINISTRATOR_9_18] : ($shiftType == self::DAY ? [self::DAY, self::ADMINISTRATOR_8_17, self::ADMINISTRATOR_9_18] : [self::NIGHT]);
+ public static function getShiftIdsByShiftType(int $shiftType): array
+ {
+ return match ($shiftType) {
+ self::DAY => [self::DAY, self::ADMINISTRATOR_8_17, self::ADMINISTRATOR_9_18],
+ self::NIGHT => [self::NIGHT],
+ default => [self::DAY, self::NIGHT, self::ADMINISTRATOR_8_17, self::ADMINISTRATOR_9_18],
+ };
}
}