Skip to content

Commit

Permalink
fixed sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
VILLAN3LL3 committed Aug 31, 2024
1 parent 20e9958 commit d39932a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Orso.Arpa.Api/Middleware/ArpaProfilePictureProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Orso.Arpa.Api.Middleware
{
public class ArpaProfilePictureProvider : IImageProvider
{
private static readonly char[] SlashChars = { '\\', '/' };
private static readonly char[] SlashChars = ['\\', '/'];

private Func<HttpContext, bool> _match;

Expand Down Expand Up @@ -69,7 +69,7 @@ public bool IsValidRequest(HttpContext context)
return arpaContext.EntityExists<Person>(personId);
}

private bool IsMatch(HttpContext context)
private static bool IsMatch(HttpContext context)
{
if (!context.Request.Method.Equals(HttpMethods.Get))
{
Expand Down
2 changes: 1 addition & 1 deletion Orso.Arpa.Api/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ protected virtual void EnsureDatabaseMigrations(IApplicationBuilder app)
}
}

protected void PreloadTranslationsFromDb(IApplicationBuilder app)
protected static void PreloadTranslationsFromDb(IApplicationBuilder app)
{
using IServiceScope scope = app.ApplicationServices.CreateScope();
IServiceProvider services = scope.ServiceProvider;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
using System;
using System.Reflection;
using HotChocolate.Types;
using HotChocolate.Types.Descriptors;

namespace Orso.Arpa.Persistence.GraphQL
{
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = true, AllowMultiple = true)]
public class UseApplicationDbContextAttribute : ObjectFieldDescriptorAttribute
{
protected override void OnConfigure(
Expand Down

0 comments on commit d39932a

Please sign in to comment.