guibranco/GuiStracini.HolidayAPI

View on GitHub

Showing 5 of 7 total issues

Consider simplifying this complex logical expression.
Open

            if (
                propertyValue == null
                || propertyType == typeof(int) && Convert.ToInt32(propertyValue) == 0
                || propertyType == typeof(long) && Convert.ToInt64(propertyValue) == 0
                || propertyType == typeof(decimal)
Severity: Critical
Found in Src/GuiStracini.HolidayAPI/Utils/RequestHelpers.cs - About 1 hr to fix

    Method GetRequestEndpoint has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            public static string GetRequestEndpoint(this BaseRequest request)
            {
                var matchData = new ProcessMatchData { Type = request.GetType() };
    
                var endpointAttribute = request.GetRequestEndpointAttribute();
    Severity: Minor
    Found in Src/GuiStracini.HolidayAPI/Utils/RequestHelpers.cs - About 1 hr to fix

      Method ParseProperty has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              private static bool ParseProperty(
                  BaseRequest request,
                  PropertyInfo property,
                  bool addAsQueryString,
                  StringBuilder builder
      Severity: Minor
      Found in Src/GuiStracini.HolidayAPI/Utils/RequestHelpers.cs - About 1 hr to fix

        Method ProcessMatch has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                private static void ProcessMatch(
                    BaseRequest request,
                    Match match,
                    ProcessMatchData matchData
                )
        Severity: Minor
        Found in Src/GuiStracini.HolidayAPI/Utils/RequestHelpers.cs - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

                      if (
                          propertyType == typeof(string)
                          || propertyType == typeof(bool)
                          || propertyType == typeof(int) && Convert.ToInt32(propertyValue) > 0
                          || propertyType == typeof(long) && Convert.ToInt64(propertyValue) > 0
          Severity: Major
          Found in Src/GuiStracini.HolidayAPI/Utils/RequestHelpers.cs - About 40 mins to fix
            Severity
            Category
            Status
            Source
            Language