Updated editorconfig to (mostly?) require braces around if/else statements, and applied the new formatting rules

This commit is contained in:
Kwoth
2022-02-02 01:44:45 +01:00
parent b22cd5a81e
commit ffa2c3f119
202 changed files with 2108 additions and 920 deletions

View File

@@ -38,7 +38,10 @@ public class Permissionv2 : DbEntity, IIndexed
};
public static List<Permissionv2> GetDefaultPermlist
=> new() { AllowAllPerm };
=> new()
{
AllowAllPerm
};
}
public enum PrimaryPermissionType

View File

@@ -32,7 +32,8 @@ public class ShopEntryItem : DbEntity
public override bool Equals(object obj)
{
if (obj is null || GetType() != obj.GetType()) return false;
if (obj is null || GetType() != obj.GetType())
return false;
return ((ShopEntryItem)obj).Text == Text;
}

View File

@@ -8,7 +8,8 @@ public class SlowmodeIgnoredRole : DbEntity
// override object.Equals
public override bool Equals(object obj)
{
if (obj is null || GetType() != obj.GetType()) return false;
if (obj is null || GetType() != obj.GetType())
return false;
return ((SlowmodeIgnoredRole)obj).RoleId == RoleId;
}

View File

@@ -8,7 +8,8 @@ public class SlowmodeIgnoredUser : DbEntity
// override object.Equals
public override bool Equals(object obj)
{
if (obj is null || GetType() != obj.GetType()) return false;
if (obj is null || GetType() != obj.GetType())
return false;
return ((SlowmodeIgnoredUser)obj).UserId == UserId;
}

View File

@@ -25,7 +25,8 @@ public class WaifuInfo : DbEntity
var waifuUsername = Waifu.Username.TrimTo(20);
var claimerUsername = Claimer?.Username.TrimTo(20);
if (ClaimerId is not null) claimer = $"{claimerUsername}#{Claimer.Discriminator}";
if (ClaimerId is not null)
claimer = $"{claimerUsername}#{Claimer.Discriminator}";
if (AffinityId is null)
status = $"... but {waifuUsername}'s heart is empty";
else if (AffinityId == ClaimerId)
@@ -58,7 +59,8 @@ public class WaifuLbResult
var waifuUsername = Username.TrimTo(20);
var claimerUsername = Claimer?.TrimTo(20);
if (Claimer is not null) claimer = $"{claimerUsername}#{ClaimerDiscrim}";
if (Claimer is not null)
claimer = $"{claimerUsername}#{ClaimerDiscrim}";
if (Affinity is null)
status = $"... but {waifuUsername}'s heart is empty";
else if (Affinity + AffinityDiscrim == Claimer + ClaimerDiscrim)