hour >= $config['start'] && $start->hour < $config['end'] || $end->hour >= $config['start'] && $end->hour < $config['end'] ); } /** * Calculate a shifts night multiplier */ public static function getNightShiftMultiplier(Carbon $start, Carbon $end): float { if (!self::isNightShift($start, $end)) { return 1; } return config('night_shifts')['multiplier']; } }