mirror of
https://github.com/bitwarden/server.git
synced 2025-07-05 18:12:48 -05:00
Changed all C# control flow block statements to include space between keyword and open paren
This commit is contained in:
@ -48,7 +48,7 @@ namespace Bit.Core.Models.Table
|
||||
|
||||
public void SetNewId()
|
||||
{
|
||||
if(Id == default(Guid))
|
||||
if (Id == default(Guid))
|
||||
{
|
||||
Id = CoreHelpers.GenerateComb();
|
||||
}
|
||||
@ -86,7 +86,7 @@ namespace Bit.Core.Models.Table
|
||||
|
||||
public long StorageBytesRemaining()
|
||||
{
|
||||
if(!MaxStorageGb.HasValue)
|
||||
if (!MaxStorageGb.HasValue)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -97,7 +97,7 @@ namespace Bit.Core.Models.Table
|
||||
public long StorageBytesRemaining(short maxStorageGb)
|
||||
{
|
||||
var maxStorageBytes = maxStorageGb * 1073741824L;
|
||||
if(!Storage.HasValue)
|
||||
if (!Storage.HasValue)
|
||||
{
|
||||
return maxStorageBytes;
|
||||
}
|
||||
@ -107,14 +107,14 @@ namespace Bit.Core.Models.Table
|
||||
|
||||
public Dictionary<TwoFactorProviderType, TwoFactorProvider> GetTwoFactorProviders()
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(TwoFactorProviders))
|
||||
if (string.IsNullOrWhiteSpace(TwoFactorProviders))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if(_twoFactorProviders == null)
|
||||
if (_twoFactorProviders == null)
|
||||
{
|
||||
_twoFactorProviders =
|
||||
JsonConvert.DeserializeObject<Dictionary<TwoFactorProviderType, TwoFactorProvider>>(
|
||||
@ -123,7 +123,7 @@ namespace Bit.Core.Models.Table
|
||||
|
||||
return _twoFactorProviders;
|
||||
}
|
||||
catch(JsonSerializationException)
|
||||
catch (JsonSerializationException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@ -131,7 +131,7 @@ namespace Bit.Core.Models.Table
|
||||
|
||||
public void SetTwoFactorProviders(Dictionary<TwoFactorProviderType, TwoFactorProvider> providers)
|
||||
{
|
||||
if(!providers.Any())
|
||||
if (!providers.Any())
|
||||
{
|
||||
TwoFactorProviders = null;
|
||||
_twoFactorProviders = null;
|
||||
@ -148,7 +148,7 @@ namespace Bit.Core.Models.Table
|
||||
public bool TwoFactorProviderIsEnabled(TwoFactorProviderType provider)
|
||||
{
|
||||
var providers = GetTwoFactorProviders();
|
||||
if(providers == null || !providers.ContainsKey(provider))
|
||||
if (providers == null || !providers.ContainsKey(provider))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -159,7 +159,7 @@ namespace Bit.Core.Models.Table
|
||||
public bool TwoFactorIsEnabled()
|
||||
{
|
||||
var providers = GetTwoFactorProviders();
|
||||
if(providers == null)
|
||||
if (providers == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -170,7 +170,7 @@ namespace Bit.Core.Models.Table
|
||||
public TwoFactorProvider GetTwoFactorProvider(TwoFactorProviderType provider)
|
||||
{
|
||||
var providers = GetTwoFactorProviders();
|
||||
if(providers == null || !providers.ContainsKey(provider))
|
||||
if (providers == null || !providers.ContainsKey(provider))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user