Skip to content

Commit

Permalink
Removed whitespace on empty lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrstebo committed Mar 12, 2019
1 parent 1bdc81e commit 7bcebe6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/FakerDotNet/Fakers/FakeFaker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private static IEnumerable<string> GetPlaceholders(string input)
.Where(x => x.Success)
.Select(x => x.Value);
}

private static FakerMatch GetFakerMatch(string calleeFaker, string placeholder, string input)
{
var pattern = Regex.Escape(placeholder);
Expand Down Expand Up @@ -91,11 +91,11 @@ private string Parse(string input, FakerMatch match)
return input;
}
}

private PropertyInfo GetFaker(string name)
{
const BindingFlags flags = BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Instance;

return _fakerContainer.GetType().GetProperty(name, flags)
?? throw new FormatException($"Invalid module: {name}");
}
Expand All @@ -105,7 +105,7 @@ private string GetValue(PropertyInfo propertyInfo, string methodName)
const BindingFlags flags = BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Instance;
var method = propertyInfo.PropertyType.GetMethod(methodName, flags)
?? throw new FormatException($"Invalid method: {propertyInfo.Name}.{methodName}");

var parameters = method.GetParameters().Select(DefaultValue).ToArray();
var value = method.Invoke(propertyInfo.GetValue(_fakerContainer, null), parameters);

Expand All @@ -123,7 +123,7 @@ private string Numerify(string input)
{
return Regex.Replace(input, "#", m => _fakerContainer.Number.NonZeroDigit());
}

private struct FakerMatch
{
public bool Success;
Expand Down

0 comments on commit 7bcebe6

Please sign in to comment.