< Summary

Information
Class: Punch.CLI.TimeBlock
Assembly: punch
File(s): /home/runner/work/punch/punch/src/Punch.CLI/TimeBlock.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 11
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_StartSlot()100%11100%
.cctor()100%11100%
get_IsUnpaid()100%11100%

File(s)

/home/runner/work/punch/punch/src/Punch.CLI/TimeBlock.cs

#LineLine coverage
 1using System.Text.RegularExpressions;
 2
 3namespace Punch.CLI;
 4
 17765internal sealed record TimeBlock(int StartSlot, int Length, string Label, string Ticket = "")
 6{
 17    private static readonly Regex UnpaidRegex =
 18        new(@"\b(lunch|break)\b", RegexOptions.IgnoreCase | RegexOptions.Compiled);
 9
 2410    public bool IsUnpaid => UnpaidRegex.IsMatch(Label);
 11}