OwenKelvin/Angular-School-Management-System

View on GitHub

Showing 218 of 218 total issues

Function ngOnInit has 85 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  ngOnInit() {
    if (typeof this.multiple === 'string') {
      this.multipleSelector = true;
    }
    this.error = { required: 'Please Select a Category' };
Severity: Major
Found in src/app/core/select/select.component.ts - About 3 hrs to fix

    Function getItems has 81 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      getItems(): object {
        const items: object = {
          preIcon: 'drive_file_rename_outline',
          label: 'Curriculum Management',
          postIcon: 'arrow_right',
    Severity: Major
    Found in src/app/pages/curriculum-maintenance/services/menu-items.service.ts - About 3 hrs to fix

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

            {
              path: 'class-levels',
              canActivate: [AuthGuard],
              children: [
                {
      src/app/pages/curriculum-maintenance/curriculum-maintenance-routing.module.ts on lines 69..94
      src/app/pages/curriculum-maintenance/curriculum-maintenance-routing.module.ts on lines 121..146

      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 96.

      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

            {
              path: 'class-level-categories',
              canActivate: [AuthGuard],
              children: [
                {
      src/app/pages/curriculum-maintenance/curriculum-maintenance-routing.module.ts on lines 69..94
      src/app/pages/curriculum-maintenance/curriculum-maintenance-routing.module.ts on lines 95..120

      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 96.

      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

            {
              path: 'units',
              canActivate: [AuthGuard],
              children: [
                {
      src/app/pages/curriculum-maintenance/curriculum-maintenance-routing.module.ts on lines 95..120
      src/app/pages/curriculum-maintenance/curriculum-maintenance-routing.module.ts on lines 121..146

      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 96.

      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 5 locations. Consider refactoring.
      Open

        delete(id: number): Observable<any> {
          const url = `${this.config.apiUrl}/api/curriculum/units/${id}`;
          return this.http.delete<any>(url).pipe(
            map(res => {
              return res;
      src/app/pages/academic-year/services/academic-year.service.ts on lines 74..81
      src/app/pages/curriculum-maintenance/class-levels/services/class-level-category.service.ts on lines 50..57
      src/app/pages/curriculum-maintenance/class-levels/services/class-level.service.ts on lines 70..77
      src/app/pages/curriculum-maintenance/units/services/unit-level.service.ts on lines 12..19

      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 91.

      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 5 locations. Consider refactoring.
      Open

        delete(id: number): Observable<any> {
          const url = `${this.config.apiUrl}/api/curriculum/unit-levels/${id}`;
          return this.http.delete<any>(url).pipe(
            map(res => {
              return res;
      src/app/pages/academic-year/services/academic-year.service.ts on lines 74..81
      src/app/pages/curriculum-maintenance/class-levels/services/class-level-category.service.ts on lines 50..57
      src/app/pages/curriculum-maintenance/class-levels/services/class-level.service.ts on lines 70..77
      src/app/pages/curriculum-maintenance/units/services/unit.service.ts on lines 71..78

      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 91.

      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 5 locations. Consider refactoring.
      Open

        delete(id: number): Observable<any> {
          const url = `${this.config.apiUrl}/api/curriculum/class-levels/${id}`;
          return this.http.delete<any>(url).pipe(
            map(res => {
              return res;
      src/app/pages/academic-year/services/academic-year.service.ts on lines 74..81
      src/app/pages/curriculum-maintenance/class-levels/services/class-level-category.service.ts on lines 50..57
      src/app/pages/curriculum-maintenance/units/services/unit-level.service.ts on lines 12..19
      src/app/pages/curriculum-maintenance/units/services/unit.service.ts on lines 71..78

      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 91.

      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 5 locations. Consider refactoring.
      Open

        delete(id: number): Observable<any> {
          const url = `${this.config.apiUrl}/api/academic-years/${id}`;
          return this.http.delete<any>(url).pipe(
            map(res => {
              return res;
      src/app/pages/curriculum-maintenance/class-levels/services/class-level-category.service.ts on lines 50..57
      src/app/pages/curriculum-maintenance/class-levels/services/class-level.service.ts on lines 70..77
      src/app/pages/curriculum-maintenance/units/services/unit-level.service.ts on lines 12..19
      src/app/pages/curriculum-maintenance/units/services/unit.service.ts on lines 71..78

      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 91.

      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 5 locations. Consider refactoring.
      Open

        delete(id: number): Observable<any> {
          const url = `${this.config.apiUrl}/api/curriculum/class-level-categories/${id}`;
          return this.http.delete<any>(url).pipe(
            map(res => {
              return res;
      src/app/pages/academic-year/services/academic-year.service.ts on lines 74..81
      src/app/pages/curriculum-maintenance/class-levels/services/class-level.service.ts on lines 70..77
      src/app/pages/curriculum-maintenance/units/services/unit-level.service.ts on lines 12..19
      src/app/pages/curriculum-maintenance/units/services/unit.service.ts on lines 71..78

      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 91.

      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

      File create-unit.component.ts has 282 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
      import {
        FormBuilder,
        FormGroup,
        Validators,

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

        describe('ReligionService', () => {
          beforeEach(() =>
            TestBed.configureTestingModule({
              imports: [HttpClientTestingModule]
            })
        Severity: Major
        Found in src/app/core/services/religion/religion.service.spec.ts and 14 other locations - About 2 hrs to fix
        src/app/core/services/countries/allowed-phone-numbers.service.spec.ts on lines 6..19
        src/app/core/services/gender/gender.service.spec.ts on lines 6..15
        src/app/pages/academic-year/services/subjects.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/guardian-details/guardian.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/studen-details/student-details.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/student-id-number/student-id-number.service.spec.ts on lines 6..17
        src/app/pages/admissions/services/submit-student-identification.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/class-levels/services/class-level-category.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/class-levels/services/class-level.service.spec.ts on lines 8..19
        src/app/pages/curriculum-maintenance/subject-category/services/new-subject-category.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/subject-category/services/subject-category.service.spec.ts on lines 6..17
        src/app/pages/curriculum-maintenance/units/services/unit-level.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/units/services/unit.service.spec.ts on lines 6..17
        src/app/shared/services/users/users.service.spec.ts on lines 6..15

        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 87.

        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 15 locations. Consider refactoring.
        Open

        describe('GenderService', () => {
          beforeEach(() => TestBed.configureTestingModule({
            imports: [HttpClientTestingModule]
          }));
        
        
        Severity: Major
        Found in src/app/core/services/gender/gender.service.spec.ts and 14 other locations - About 2 hrs to fix
        src/app/core/services/countries/allowed-phone-numbers.service.spec.ts on lines 6..19
        src/app/core/services/religion/religion.service.spec.ts on lines 6..17
        src/app/pages/academic-year/services/subjects.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/guardian-details/guardian.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/studen-details/student-details.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/student-id-number/student-id-number.service.spec.ts on lines 6..17
        src/app/pages/admissions/services/submit-student-identification.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/class-levels/services/class-level-category.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/class-levels/services/class-level.service.spec.ts on lines 8..19
        src/app/pages/curriculum-maintenance/subject-category/services/new-subject-category.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/subject-category/services/subject-category.service.spec.ts on lines 6..17
        src/app/pages/curriculum-maintenance/units/services/unit-level.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/units/services/unit.service.spec.ts on lines 6..17
        src/app/shared/services/users/users.service.spec.ts on lines 6..15

        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 87.

        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 15 locations. Consider refactoring.
        Open

        describe('UnitService', () => {
          beforeEach(() => TestBed.configureTestingModule({
            imports: [HttpClientTestingModule]
          }));
        
        
        src/app/core/services/countries/allowed-phone-numbers.service.spec.ts on lines 6..19
        src/app/core/services/gender/gender.service.spec.ts on lines 6..15
        src/app/core/services/religion/religion.service.spec.ts on lines 6..17
        src/app/pages/academic-year/services/subjects.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/guardian-details/guardian.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/studen-details/student-details.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/student-id-number/student-id-number.service.spec.ts on lines 6..17
        src/app/pages/admissions/services/submit-student-identification.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/class-levels/services/class-level-category.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/class-levels/services/class-level.service.spec.ts on lines 8..19
        src/app/pages/curriculum-maintenance/subject-category/services/new-subject-category.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/subject-category/services/subject-category.service.spec.ts on lines 6..17
        src/app/pages/curriculum-maintenance/units/services/unit.service.spec.ts on lines 6..17
        src/app/shared/services/users/users.service.spec.ts on lines 6..15

        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 87.

        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 15 locations. Consider refactoring.
        Open

        describe('UsersService', () => {
          beforeEach(() => TestBed.configureTestingModule({
            imports: [HttpClientTestingModule]
          }));
        
        
        Severity: Major
        Found in src/app/shared/services/users/users.service.spec.ts and 14 other locations - About 2 hrs to fix
        src/app/core/services/countries/allowed-phone-numbers.service.spec.ts on lines 6..19
        src/app/core/services/gender/gender.service.spec.ts on lines 6..15
        src/app/core/services/religion/religion.service.spec.ts on lines 6..17
        src/app/pages/academic-year/services/subjects.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/guardian-details/guardian.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/studen-details/student-details.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/student-id-number/student-id-number.service.spec.ts on lines 6..17
        src/app/pages/admissions/services/submit-student-identification.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/class-levels/services/class-level-category.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/class-levels/services/class-level.service.spec.ts on lines 8..19
        src/app/pages/curriculum-maintenance/subject-category/services/new-subject-category.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/subject-category/services/subject-category.service.spec.ts on lines 6..17
        src/app/pages/curriculum-maintenance/units/services/unit-level.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/units/services/unit.service.spec.ts on lines 6..17

        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 87.

        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 15 locations. Consider refactoring.
        Open

        describe('SubjectsService', () => {
          beforeEach(() => TestBed.configureTestingModule({
            imports: [HttpClientTestingModule]
          }));
        
        
        src/app/core/services/countries/allowed-phone-numbers.service.spec.ts on lines 6..19
        src/app/core/services/gender/gender.service.spec.ts on lines 6..15
        src/app/core/services/religion/religion.service.spec.ts on lines 6..17
        src/app/pages/admissions/services/guardian-details/guardian.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/studen-details/student-details.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/student-id-number/student-id-number.service.spec.ts on lines 6..17
        src/app/pages/admissions/services/submit-student-identification.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/class-levels/services/class-level-category.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/class-levels/services/class-level.service.spec.ts on lines 8..19
        src/app/pages/curriculum-maintenance/subject-category/services/new-subject-category.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/subject-category/services/subject-category.service.spec.ts on lines 6..17
        src/app/pages/curriculum-maintenance/units/services/unit-level.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/units/services/unit.service.spec.ts on lines 6..17
        src/app/shared/services/users/users.service.spec.ts on lines 6..15

        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 87.

        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 15 locations. Consider refactoring.
        Open

        describe('SubjectCategoryService', () => {
          beforeEach(() =>
            TestBed.configureTestingModule({
              imports: [HttpClientTestingModule]
            })
        src/app/core/services/countries/allowed-phone-numbers.service.spec.ts on lines 6..19
        src/app/core/services/gender/gender.service.spec.ts on lines 6..15
        src/app/core/services/religion/religion.service.spec.ts on lines 6..17
        src/app/pages/academic-year/services/subjects.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/guardian-details/guardian.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/studen-details/student-details.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/student-id-number/student-id-number.service.spec.ts on lines 6..17
        src/app/pages/admissions/services/submit-student-identification.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/class-levels/services/class-level-category.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/class-levels/services/class-level.service.spec.ts on lines 8..19
        src/app/pages/curriculum-maintenance/subject-category/services/new-subject-category.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/units/services/unit-level.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/units/services/unit.service.spec.ts on lines 6..17
        src/app/shared/services/users/users.service.spec.ts on lines 6..15

        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 87.

        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 15 locations. Consider refactoring.
        Open

        describe('StudentIdNumberService', () => {
          beforeEach(() => TestBed.configureTestingModule({
            imports: [
              HttpClientTestingModule
            ]
        src/app/core/services/countries/allowed-phone-numbers.service.spec.ts on lines 6..19
        src/app/core/services/gender/gender.service.spec.ts on lines 6..15
        src/app/core/services/religion/religion.service.spec.ts on lines 6..17
        src/app/pages/academic-year/services/subjects.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/guardian-details/guardian.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/studen-details/student-details.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/submit-student-identification.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/class-levels/services/class-level-category.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/class-levels/services/class-level.service.spec.ts on lines 8..19
        src/app/pages/curriculum-maintenance/subject-category/services/new-subject-category.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/subject-category/services/subject-category.service.spec.ts on lines 6..17
        src/app/pages/curriculum-maintenance/units/services/unit-level.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/units/services/unit.service.spec.ts on lines 6..17
        src/app/shared/services/users/users.service.spec.ts on lines 6..15

        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 87.

        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 15 locations. Consider refactoring.
        Open

        describe('UnitService', () => {
          beforeEach(() =>
            TestBed.configureTestingModule({
              imports: [HttpClientTestingModule]
            })
        src/app/core/services/countries/allowed-phone-numbers.service.spec.ts on lines 6..19
        src/app/core/services/gender/gender.service.spec.ts on lines 6..15
        src/app/core/services/religion/religion.service.spec.ts on lines 6..17
        src/app/pages/academic-year/services/subjects.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/guardian-details/guardian.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/studen-details/student-details.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/student-id-number/student-id-number.service.spec.ts on lines 6..17
        src/app/pages/admissions/services/submit-student-identification.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/class-levels/services/class-level-category.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/class-levels/services/class-level.service.spec.ts on lines 8..19
        src/app/pages/curriculum-maintenance/subject-category/services/new-subject-category.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/subject-category/services/subject-category.service.spec.ts on lines 6..17
        src/app/pages/curriculum-maintenance/units/services/unit-level.service.spec.ts on lines 6..15
        src/app/shared/services/users/users.service.spec.ts on lines 6..15

        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 87.

        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 15 locations. Consider refactoring.
        Open

        describe('StudentDetailsService', () => {
          beforeEach(() => TestBed.configureTestingModule({
            imports: [HttpClientTestingModule]
          }));
        
        
        src/app/core/services/countries/allowed-phone-numbers.service.spec.ts on lines 6..19
        src/app/core/services/gender/gender.service.spec.ts on lines 6..15
        src/app/core/services/religion/religion.service.spec.ts on lines 6..17
        src/app/pages/academic-year/services/subjects.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/guardian-details/guardian.service.spec.ts on lines 6..15
        src/app/pages/admissions/services/student-id-number/student-id-number.service.spec.ts on lines 6..17
        src/app/pages/admissions/services/submit-student-identification.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/class-levels/services/class-level-category.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/class-levels/services/class-level.service.spec.ts on lines 8..19
        src/app/pages/curriculum-maintenance/subject-category/services/new-subject-category.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/subject-category/services/subject-category.service.spec.ts on lines 6..17
        src/app/pages/curriculum-maintenance/units/services/unit-level.service.spec.ts on lines 6..15
        src/app/pages/curriculum-maintenance/units/services/unit.service.spec.ts on lines 6..17
        src/app/shared/services/users/users.service.spec.ts on lines 6..15

        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 87.

        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