diff --git a/src/Humanizer/Localisation/NumberToWords/IndianNumberToWordsConverter.cs b/src/Humanizer/Localisation/NumberToWords/IndianNumberToWordsConverter.cs index b1db0e154..2c750156c 100644 --- a/src/Humanizer/Localisation/NumberToWords/IndianNumberToWordsConverter.cs +++ b/src/Humanizer/Localisation/NumberToWords/IndianNumberToWordsConverter.cs @@ -54,7 +54,7 @@ public override string ConvertToOrdinal(int number) return result; } - public static string NumberToText(long number) + static string NumberToText(long number) { if (number < 0) return "(Negative) " + NumberToText(-number); diff --git a/src/Humanizer/Localisation/NumberToWords/Italian/ItalianCardinalNumberCruncher.cs b/src/Humanizer/Localisation/NumberToWords/Italian/ItalianCardinalNumberCruncher.cs index 790496d81..34ad96b07 100644 --- a/src/Humanizer/Localisation/NumberToWords/Italian/ItalianCardinalNumberCruncher.cs +++ b/src/Humanizer/Localisation/NumberToWords/Italian/ItalianCardinalNumberCruncher.cs @@ -26,9 +26,9 @@ public string Convert() return words.TrimEnd(); } - protected readonly int _fullNumber = number; - protected readonly List _threeDigitParts = SplitEveryThreeDigits(number); - protected readonly GrammaticalGender _gender = gender; + readonly int _fullNumber = number; + readonly List _threeDigitParts = SplitEveryThreeDigits(number); + readonly GrammaticalGender _gender = gender; protected ThreeDigitSets _nextSet = ThreeDigitSets.Units; @@ -38,7 +38,7 @@ public string Convert() /// /// The number to split. /// The sequence of three-digit numbers. - protected static List SplitEveryThreeDigits(int number) + static List SplitEveryThreeDigits(int number) { var parts = new List(); var rest = number; @@ -60,7 +60,7 @@ protected static List SplitEveryThreeDigits(int number) /// for the next three-digit set. /// /// The next conversion function to use. - public Func? GetNextPartConverter() + Func? GetNextPartConverter() { Func? converter; @@ -161,7 +161,7 @@ static string ThreeDigitSetConverter(int number, bool thisIsLastSet = false) /// /// The three-digit number, as units, to convert. /// The same three-digit number, as units, expressed as text. - protected string UnitsConverter(int number) + string UnitsConverter(int number) { // being a unique case, it's easier to treat unity feminine gender as a completely distinct case if (_gender == GrammaticalGender.Feminine && _fullNumber == 1) @@ -177,7 +177,7 @@ protected string UnitsConverter(int number) /// /// The three-digit number, as thousands, to convert. /// The same three-digit number of thousands expressed as text. - protected static string ThousandsConverter(int number) + static string ThousandsConverter(int number) { if (number == 0) { @@ -197,7 +197,7 @@ protected static string ThousandsConverter(int number) /// /// The three-digit number, as millions, to convert. /// The same three-digit number of millions expressed as text. - protected static string MillionsConverter(int number) + static string MillionsConverter(int number) { if (number == 0) { @@ -217,7 +217,7 @@ protected static string MillionsConverter(int number) /// /// The three-digit number, as billions, to convert. /// The same three-digit number of billions expressed as text. - protected static string BillionsConverter(int number) + static string BillionsConverter(int number) { if (number == 1) { @@ -230,7 +230,7 @@ protected static string BillionsConverter(int number) /// /// Lookup table converting units number to text. Index 1 for 1, index 2 for 2, up to index 9. /// - protected static string[] _unitsNumberToText = + static string[] _unitsNumberToText = [ string.Empty, "uno", @@ -247,7 +247,7 @@ protected static string BillionsConverter(int number) /// /// Lookup table converting tens number to text. Index 2 for 20, index 3 for 30, up to index 9 for 90. /// - protected static string[] _tensOver20NumberToText = + static string[] _tensOver20NumberToText = [ string.Empty, string.Empty, @@ -264,7 +264,7 @@ protected static string BillionsConverter(int number) /// /// Lookup table converting teens number to text. Index 0 for 10, index 1 for 11, up to index 9 for 19. /// - protected static string[] _teensUnder20NumberToText = + static string[] _teensUnder20NumberToText = [ "dieci", "undici", @@ -281,7 +281,7 @@ protected static string BillionsConverter(int number) /// /// Lookup table converting hundreds number to text. Index 0 for no hundreds, index 1 for 100, up to index 9. /// - protected static string[] _hundredNumberToText = + static string[] _hundredNumberToText = [ string.Empty, "cento", diff --git a/src/Humanizer/Localisation/NumberToWords/Italian/ItalianOrdinalNumberCruncher.cs b/src/Humanizer/Localisation/NumberToWords/Italian/ItalianOrdinalNumberCruncher.cs index b02a288c1..3f4a2f11d 100644 --- a/src/Humanizer/Localisation/NumberToWords/Italian/ItalianOrdinalNumberCruncher.cs +++ b/src/Humanizer/Localisation/NumberToWords/Italian/ItalianOrdinalNumberCruncher.cs @@ -83,14 +83,14 @@ public string Convert() return words; } - protected readonly int _fullNumber = number; - protected readonly GrammaticalGender _gender = gender; + readonly int _fullNumber = number; + readonly GrammaticalGender _gender = gender; readonly string _genderSuffix = gender == GrammaticalGender.Feminine ? "a" : "o"; /// /// Lookup table converting units number to text. Index 1 for 1, index 2 for 2, up to index 9. /// - protected static string[] _unitsUnder10NumberToText = + static string[] _unitsUnder10NumberToText = [ string.Empty, "prim", @@ -104,5 +104,5 @@ public string Convert() "non" ]; - protected static int _lengthOf10AsCardinal = "dieci".Length; + static int _lengthOf10AsCardinal = "dieci".Length; } \ No newline at end of file