Skip to content

Commit

Permalink
Code quality improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxchata committed Aug 11, 2024
1 parent 9805ed5 commit ba47bb7
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/Taxi.Repository/DependencyInjection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Taxi.Repository
{
public class DependencyInjection
public static class DependencyInjection
{
public static void Register(IServiceCollection serviceCollection)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Taxi.Repository/Initialization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Taxi.Repository
{
public class Initialization
public static class Initialization
{
private const string DatabaseId = "taxi";

Expand Down
2 changes: 1 addition & 1 deletion src/Taxi.Repository/Triggers/Driver/DriverPreTriggers.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Taxi.Repository.Triggers.Driver
{
internal class DriverPreTriggers
internal static class DriverPreTriggers
{
internal const string ValidateDriverPreTrigger = @"
function validateDriverPreTrigger() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Taxi.Repository.Triggers.Driver
{
internal class PassengerPreTriggers
internal static class PassengerPreTriggers
{
internal const string ValidatePassengerPreTrigger = @"
function validatePassengerPreTrigger() {
Expand Down
2 changes: 1 addition & 1 deletion src/Taxi.WebApi/Authentication/Header.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Taxi.WebApi.Authentication;

public class Header
public static class Header
{
public const string ApiKey = "X-API-KEY";
}
2 changes: 1 addition & 1 deletion src/Taxi.WebApi/Authentication/Policy.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Taxi.WebApi.Authentication;

public class Policy
public static class Policy
{
public const string ApiKey = "ApiKey";
}
2 changes: 1 addition & 1 deletion src/Taxi.WebApi/Authentication/Scheme.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Taxi.WebApi.Authentication;

public class Scheme
public static class Scheme
{
public const string ApiKey = "ApiKey";
}
2 changes: 1 addition & 1 deletion src/Taxi.WebApi/Authentication/SwaggerSecurity.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Taxi.WebApi.Authentication;

public class SwaggerSecurity
public static class SwaggerSecurity
{
public const string ApiKeyHeader = "ApiKeyHeader";
}
15 changes: 7 additions & 8 deletions src/Taxi.WebApi/Configuration/HostEnvironmentEnvExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
namespace Taxi.WebApi.Configuration
namespace Taxi.WebApi.Configuration;

public static class HostEnvironmentEnvExtensions
{
public static class HostEnvironmentEnvExtensions
{
private const string Local = nameof(Local);
private const string Local = nameof(Local);

public static bool IsLocal(this IHostEnvironment hostEnvironment)
{
return hostEnvironment.IsEnvironment(Local);
}
public static bool IsLocal(this IHostEnvironment hostEnvironment)
{
return hostEnvironment.IsEnvironment(Local);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace Taxi.WebApi.Extensions;

/// <summary>
/// Contains extension methods to <see cref="IServiceCollection"/>
/// </summary>
public static class ApiVersioningServiceCollectionExtension
{
public static IServiceCollection AddVersioning(this IServiceCollection services)
Expand Down
11 changes: 5 additions & 6 deletions src/Taxi.WebApi/FeatureFlags/CustomFeatureFlags.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
namespace Taxi.WebApi.FeatureFlags
namespace Taxi.WebApi.FeatureFlags;

public static class CustomFeatureFlags
{
public class CustomFeatureFlags
{
public const string Driver = "Driver";
public const string Passenger = "Passenger";
}
public const string Driver = "Driver";
public const string Passenger = "Passenger";
}

0 comments on commit ba47bb7

Please sign in to comment.