tutorbookapp/tutorbook

View on GitHub
lib/utils/time.ts

Summary

Maintainability
A
3 hrs
Test Coverage

Function getMonthsTimeslots has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

  baseline: Availability,
  month: number,
  year: number,
  booked?: Availability,
  from: Date = new Date(),
Severity: Minor
Found in lib/utils/time.ts - About 45 mins to fix

    Function getDate has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      weekday: number,
      hours: number,
      minutes = 0,
      seconds = 0,
      milliseconds = 0,
    Severity: Minor
    Found in lib/utils/time.ts - About 45 mins to fix

      Function getDateWithTime has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        hours: number,
        minutes = 0,
        seconds = 0,
        milliseconds = 0,
        reference = new Date(0)
      Severity: Minor
      Found in lib/utils/time.ts - About 35 mins to fix

        Function getAlgoliaAvailability has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          availability: Availability,
          booked = (new Availability()),
          until = (new Date(new Date().getFullYear(), new Date().getMonth() + 3)),
          interval = 15,
          duration = 60
        Severity: Minor
        Found in lib/utils/time.ts - About 35 mins to fix

          Avoid too many return statements within this function.
          Open

            return timeslots;
          Severity: Major
          Found in lib/utils/time.ts - About 30 mins to fix

            There are no issues that match your filters.

            Category
            Status