scottohara/loot

View on GitHub
src/payees/controllers/index.ts

Summary

Maintainability
B
4 hrs
Test Coverage
A
100%

Function deletePayee has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public deletePayee(index: number): void {
        // Check if the payee can be deleted
        this.payeeModel
            .find(Number(this.payees[index].id))
            .then((payee: Payee): void => {
Severity: Minor
Found in src/payees/controllers/index.ts - About 1 hr to fix

    Function constructor has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public constructor(
            $scope: angular.IScope,
            $transitions: angular.ui.IStateParamsService,
            private readonly $uibModal: angular.ui.bootstrap.IModalService,
            private readonly $timeout: angular.ITimeoutService,
    Severity: Minor
    Found in src/payees/controllers/index.ts - About 1 hr to fix

      Function editPayee has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public editPayee(index?: number): void {
              // Helper function to sort by payee name
              function byName(a: Payee, b: Payee): number {
                  return a.name.localeCompare(b.name);
              }
      Severity: Minor
      Found in src/payees/controllers/index.ts - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status