Skip to content

Commit

Permalink
Resolve sonar recommendations
Browse files Browse the repository at this point in the history
Closes #92
  • Loading branch information
baynezy committed Feb 12, 2024
1 parent 55b8973 commit 4afe3f7
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .idea/.idea.NHSNumberGenerator/.idea/sonarlint.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/NHSNumberGenerator/Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static string Generate()
return number.Calculate();
}

private class NhsNumber
private sealed class NhsNumber
{

private readonly Random _random = new();
Expand Down Expand Up @@ -51,13 +51,13 @@ private int RandomDigit()
return _random.Next(0, 10);
}

private class NumberPart
private sealed class NumberPart
{
internal int Number { get; init; }

internal int Factor { get; init; }

public int Calculate()
internal int Calculate()
{
return Number * Factor;
}
Expand Down

0 comments on commit 4afe3f7

Please sign in to comment.