Skip to content

Commit

Permalink
Resolve SonarAnalyzer S3011
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorPilley committed Mar 22, 2021
1 parent 7d0868c commit ae9f31b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/PhoneNumbers/Parsers/GBPhoneNumberParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ private GBPhoneNumberParser(IReadOnlyList<CountryNumber> countryNumbers)
/// Creates an instance of the <see cref="GBPhoneNumberParser"/> class.
/// </summary>
/// <returns>The created <see cref="PhoneNumberParser"/>.</returns>
internal static PhoneNumberParser Create()
public static PhoneNumberParser Create()
{
var countryNumbers = ResourceUtility
.ReadCountryNumbers("GB.txt")
Expand Down
4 changes: 2 additions & 2 deletions src/PhoneNumbers/Parsers/PhoneNumberParserFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ internal PhoneNumberParser GetParser(CountryInfo countryInfo) =>
{
var createMethod = typeof(PhoneNumberParser)
.Assembly
.GetType($"PhoneNumbers.Parsers.{x.Iso3166Code}PhoneNumberParser")?
.GetMethod("Create", BindingFlags.NonPublic | BindingFlags.Static);
.GetType($"PhoneNumbers.Parsers.{x.Iso3166Code}PhoneNumberParser")
?.GetMethod("Create", BindingFlags.Public | BindingFlags.Static);

if (createMethod?.Invoke(null, null) is PhoneNumberParser parser)
{
Expand Down

0 comments on commit ae9f31b

Please sign in to comment.