martinmicunda/employee-scheduling-ui

View on GitHub

Showing 438 of 458 total issues

Similar blocks of code found in 7 locations. Consider refactoring.
Open

@Service({
    serviceName: 'AvailabilityModel'
})
@Inject('AvailabilityResource')
//end-non-standard
Severity: Major
Found in src/app/core/models/availability.js and 6 other locations - About 50 mins to fix
src/app/core/models/currency.js on lines 12..21
src/app/core/models/language.js on lines 12..21
src/app/core/models/message.js on lines 12..21
src/app/core/models/partner.js on lines 12..21
src/app/core/models/position.js on lines 12..21
src/app/core/models/setting.js on lines 12..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 52.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    it(`should get 'profileCompleteness'`, () => {
        employeeModel.profileCompleteness = profileCompleteness;
        expect(employeeModel.getProfileCompleteness()).toEqual(profileCompleteness);
    });
Severity: Minor
Found in src/app/core/models/employee.spec.js and 1 other location - About 50 mins to fix
src/app/core/models/document.spec.js on lines 26..29

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    it(`should get files collection`, () => {
        documentModel.files = mockCollection;
        expect(documentModel.getFilesCollection()).toEqual(mockCollection);
    });
Severity: Minor
Found in src/app/core/models/document.spec.js and 1 other location - About 50 mins to fix
src/app/core/models/employee.spec.js on lines 28..31

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    it('should contain transclude property', () => {
        element = render();

        expect(controller.transclude).toEqual(ngIfDirective[0].transclude);
    });
Severity: Major
Found in src/app/directives/access-level/access-level.spec.js and 3 other locations - About 45 mins to fix
src/app/directives/access-level/access-level.spec.js on lines 41..45
src/app/directives/access-level/access-level.spec.js on lines 47..51
src/app/directives/access-level/access-level.spec.js on lines 53..57

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 50.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    it('should contain priority property', () => {
        element = render();

        expect(controller.priority).toEqual(ngIfDirective[0].priority);
    });
Severity: Major
Found in src/app/directives/access-level/access-level.spec.js and 3 other locations - About 45 mins to fix
src/app/directives/access-level/access-level.spec.js on lines 47..51
src/app/directives/access-level/access-level.spec.js on lines 53..57
src/app/directives/access-level/access-level.spec.js on lines 59..63

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 50.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    it('should contain restrict property', () => {
        element = render();

        expect(controller.restrict).toEqual(ngIfDirective[0].restrict);
    });
Severity: Major
Found in src/app/directives/access-level/access-level.spec.js and 3 other locations - About 45 mins to fix
src/app/directives/access-level/access-level.spec.js on lines 41..45
src/app/directives/access-level/access-level.spec.js on lines 47..51
src/app/directives/access-level/access-level.spec.js on lines 59..63

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 50.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    it('should contain terminal property', () => {
        element = render();

        expect(controller.terminal).toEqual(ngIfDirective[0].terminal);
    });
Severity: Major
Found in src/app/directives/access-level/access-level.spec.js and 3 other locations - About 45 mins to fix
src/app/directives/access-level/access-level.spec.js on lines 41..45
src/app/directives/access-level/access-level.spec.js on lines 53..57
src/app/directives/access-level/access-level.spec.js on lines 59..63

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 50.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

                    const parentElement = angular.element(element[0].querySelector('input[name="default"][type="checkbox"]')).parent().parent().parent().parent().parent();
Severity: Minor
Found in src/app/components/modal-location/modal-location.spec.js and 1 other location - About 40 mins to fix
src/app/components/modal-location/modal-location.spec.js on lines 240..240

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 49.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

                    const parentElement = angular.element(element[0].querySelector('input[name="default"][type="checkbox"]')).parent().parent().parent().parent();
Severity: Minor
Found in src/app/components/modal-location/modal-location.spec.js and 1 other location - About 40 mins to fix
src/app/components/modal-location/modal-location.spec.js on lines 231..231

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 49.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    it('should contain scope property', () => {
        element = render();

        expect(controller.scope).toEqual({
            mmEqualValidator: '='
Severity: Minor
Found in src/app/directives/equal-validator/equal-validator.spec.js and 2 other locations - About 40 mins to fix
src/app/directives/modal-really-click/modal-really-click.spec.js on lines 42..46
src/app/directives/modal-warning-unsaved-form/modal-warning-unsaved-form.spec.js on lines 98..104

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    it('should contain scope property', () => {
        element = render();

        expect(controller.scope).toEqual({mmModalReallyClick: '&'});
    });
src/app/directives/equal-validator/equal-validator.spec.js on lines 51..57
src/app/directives/modal-warning-unsaved-form/modal-warning-unsaved-form.spec.js on lines 98..104

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        beforeEach(inject((_$rootScope_, _$state_, _$log_, _AuthenticationService_) => {
            $log = _$log_;
            $state = _$state_;
            $rootScope = _$rootScope_;
            AuthenticationService = _AuthenticationService_;
Severity: Minor
Found in src/app/core/config/config.spec.js and 1 other location - About 40 mins to fix
src/app/routes/layout-auth/login/login.spec.js on lines 199..204

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        it('should contain scope property', () => {
            element = render();

            expect(controller.scope).toEqual({
                resetForm: '&mmModalWarningUnsavedForm'
src/app/directives/equal-validator/equal-validator.spec.js on lines 51..57
src/app/directives/modal-really-click/modal-really-click.spec.js on lines 42..46

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        beforeEach(inject((_$rootScope_, _$state_, _AuthenticationService_, _FormService_) => {
            $rootScope = _$rootScope_;
            $state = _$state_;
            AuthenticationService = _AuthenticationService_;
            FormService = _FormService_;
Severity: Minor
Found in src/app/routes/layout-auth/login/login.spec.js and 1 other location - About 40 mins to fix
src/app/core/config/config.spec.js on lines 60..65

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

        it('should have result property', () => {
            documentModal = new DocumentModal(ModalModel, DocumentModel, EmployeeModel, DocumentService, FormService);

            expect(documentModal.result).toEqual(null);
        });
Severity: Major
Found in src/app/components/modal-document/modal-document.spec.js and 7 other locations - About 35 mins to fix
src/app/components/modal-document/modal-document.spec.js on lines 332..336
src/app/components/modal-message/modal-message.spec.js on lines 224..228
src/app/components/modal-message/modal-message.spec.js on lines 230..234
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 390..394
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 396..400
src/app/routes/layout-app/employees/add/add.spec.js on lines 112..116
src/app/routes/layout-app/employees/add/add.spec.js on lines 118..122

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

        it('should have isSubmitting property', () => {
            employeeAdd = new EmployeeAdd($state, $rootScope, EmployeeModel, FormService, fakeModal);

            expect(employeeAdd.isSubmitting).toEqual(null);
        });
Severity: Major
Found in src/app/routes/layout-app/employees/add/add.spec.js and 7 other locations - About 35 mins to fix
src/app/components/modal-document/modal-document.spec.js on lines 332..336
src/app/components/modal-document/modal-document.spec.js on lines 338..342
src/app/components/modal-message/modal-message.spec.js on lines 224..228
src/app/components/modal-message/modal-message.spec.js on lines 230..234
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 390..394
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 396..400
src/app/routes/layout-app/employees/add/add.spec.js on lines 118..122

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

        it('should have result property', () => {
            employeeAdd = new EmployeeAdd($state, $rootScope, EmployeeModel, FormService, fakeModal);

            expect(employeeAdd.result).toEqual(null);
        });
Severity: Major
Found in src/app/routes/layout-app/employees/add/add.spec.js and 7 other locations - About 35 mins to fix
src/app/components/modal-document/modal-document.spec.js on lines 332..336
src/app/components/modal-document/modal-document.spec.js on lines 338..342
src/app/components/modal-message/modal-message.spec.js on lines 224..228
src/app/components/modal-message/modal-message.spec.js on lines 230..234
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 390..394
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 396..400
src/app/routes/layout-app/employees/add/add.spec.js on lines 112..116

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

        it('should have isSubmitting property', () => {
            accountDetails = new AccountDetails(EmployeeModel, SettingModel, Upload, FormService, EmployeeResource);

            expect(accountDetails.isSubmitting).toEqual(null);
        });
src/app/components/modal-document/modal-document.spec.js on lines 332..336
src/app/components/modal-document/modal-document.spec.js on lines 338..342
src/app/components/modal-message/modal-message.spec.js on lines 224..228
src/app/components/modal-message/modal-message.spec.js on lines 230..234
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 396..400
src/app/routes/layout-app/employees/add/add.spec.js on lines 112..116
src/app/routes/layout-app/employees/add/add.spec.js on lines 118..122

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

        it('should have isSubmitting property', () => {
            messageModal = new MessageModal(ModalModel, $rootScope, FormService, EmployeeModel, MessageModel);

            expect(messageModal.isSubmitting).toEqual(null);
        });
Severity: Major
Found in src/app/components/modal-message/modal-message.spec.js and 7 other locations - About 35 mins to fix
src/app/components/modal-document/modal-document.spec.js on lines 332..336
src/app/components/modal-document/modal-document.spec.js on lines 338..342
src/app/components/modal-message/modal-message.spec.js on lines 230..234
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 390..394
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 396..400
src/app/routes/layout-app/employees/add/add.spec.js on lines 112..116
src/app/routes/layout-app/employees/add/add.spec.js on lines 118..122

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

        it('should have isSubmitting property', () => {
            documentModal = new DocumentModal(ModalModel, DocumentModel, EmployeeModel, DocumentService, FormService);

            expect(documentModal.isSubmitting).toEqual(null);
        });
Severity: Major
Found in src/app/components/modal-document/modal-document.spec.js and 7 other locations - About 35 mins to fix
src/app/components/modal-document/modal-document.spec.js on lines 338..342
src/app/components/modal-message/modal-message.spec.js on lines 224..228
src/app/components/modal-message/modal-message.spec.js on lines 230..234
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 390..394
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 396..400
src/app/routes/layout-app/employees/add/add.spec.js on lines 112..116
src/app/routes/layout-app/employees/add/add.spec.js on lines 118..122

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language