Anapher/Strive

View on GitHub
src/Services/ConferenceManagement/Strive.Core/Utilities/CronYearParser.cs

Summary

Maintainability
B
4 hrs
Test Coverage

Method GetNextYear has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        private static int? GetNextYear(string yearExp, int year)
        {
            if (yearExp == "*")
                return year;

    Avoid too many return statements within this method.
    Open

                    if (year > end) return null;

      Avoid too many return statements within this method.
      Open

                      return year;

        Avoid too many return statements within this method.
        Open

                    if (specificYears.Contains(year)) return year;

          Avoid too many return statements within this method.
          Open

                      return CronExpression.Parse(cronExp).GetNextOccurrence(now, timeZone);

            Avoid too many return statements within this method.
            Open

                        return nextYear;

              Avoid too many return statements within this method.
              Open

                              if (start > year) return start;

                There are no issues that match your filters.

                Category
                Status