OwenKelvin/Angular-School-Management-System

View on GitHub

Showing 218 of 218 total issues

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

describe('AcademicYearComponent', () => {
  let component: AcademicYearComponent;
  let fixture: ComponentFixture<AcademicYearComponent>;

  beforeEach(async(() => {
src/app/core/message/message.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/add-staff/add-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/edit-staff/edit-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/view-staffs/view-staffs.component.spec.ts on lines 5..25
src/app/pages/admissions/students/edit-student/edit-student.component.spec.ts on lines 5..25
src/app/pages/admissions/students/students.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-student/identification-details/identification-details.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-students/view-students.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/class-levels/class-levels.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/curriculum-maintenance.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/subject-category/subject-category.component.spec.ts on lines 5..25
src/app/pages/library/add-book/add-book.component.spec.ts on lines 5..25
src/app/pages/library/edit-book/edit-book.component.spec.ts on lines 5..25

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

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('EditStaffComponent', () => {
  let component: EditStaffComponent;
  let fixture: ComponentFixture<EditStaffComponent>;

  beforeEach(async(() => {
src/app/core/message/message.component.spec.ts on lines 5..25
src/app/pages/academic-year/academic-year.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/add-staff/add-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/view-staffs/view-staffs.component.spec.ts on lines 5..25
src/app/pages/admissions/students/edit-student/edit-student.component.spec.ts on lines 5..25
src/app/pages/admissions/students/students.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-student/identification-details/identification-details.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-students/view-students.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/class-levels/class-levels.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/curriculum-maintenance.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/subject-category/subject-category.component.spec.ts on lines 5..25
src/app/pages/library/add-book/add-book.component.spec.ts on lines 5..25
src/app/pages/library/edit-book/edit-book.component.spec.ts on lines 5..25

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

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('AddStaffComponent', () => {
  let component: AddStaffComponent;
  let fixture: ComponentFixture<AddStaffComponent>;

  beforeEach(async(() => {
src/app/core/message/message.component.spec.ts on lines 5..25
src/app/pages/academic-year/academic-year.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/edit-staff/edit-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/view-staffs/view-staffs.component.spec.ts on lines 5..25
src/app/pages/admissions/students/edit-student/edit-student.component.spec.ts on lines 5..25
src/app/pages/admissions/students/students.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-student/identification-details/identification-details.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-students/view-students.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/class-levels/class-levels.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/curriculum-maintenance.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/subject-category/subject-category.component.spec.ts on lines 5..25
src/app/pages/library/add-book/add-book.component.spec.ts on lines 5..25
src/app/pages/library/edit-book/edit-book.component.spec.ts on lines 5..25

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

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('IdentificationDetailsComponent', () => {
  let component: IdentificationDetailsComponent;
  let fixture: ComponentFixture<IdentificationDetailsComponent>;

  beforeEach(async(() => {
src/app/core/message/message.component.spec.ts on lines 5..25
src/app/pages/academic-year/academic-year.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/add-staff/add-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/edit-staff/edit-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/view-staffs/view-staffs.component.spec.ts on lines 5..25
src/app/pages/admissions/students/edit-student/edit-student.component.spec.ts on lines 5..25
src/app/pages/admissions/students/students.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-students/view-students.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/class-levels/class-levels.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/curriculum-maintenance.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/subject-category/subject-category.component.spec.ts on lines 5..25
src/app/pages/library/add-book/add-book.component.spec.ts on lines 5..25
src/app/pages/library/edit-book/edit-book.component.spec.ts on lines 5..25

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

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('StudentsComponent', () => {
  let component: StudentsComponent;
  let fixture: ComponentFixture<StudentsComponent>;

  beforeEach(async(() => {
src/app/core/message/message.component.spec.ts on lines 5..25
src/app/pages/academic-year/academic-year.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/add-staff/add-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/edit-staff/edit-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/view-staffs/view-staffs.component.spec.ts on lines 5..25
src/app/pages/admissions/students/edit-student/edit-student.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-student/identification-details/identification-details.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-students/view-students.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/class-levels/class-levels.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/curriculum-maintenance.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/subject-category/subject-category.component.spec.ts on lines 5..25
src/app/pages/library/add-book/add-book.component.spec.ts on lines 5..25
src/app/pages/library/edit-book/edit-book.component.spec.ts on lines 5..25

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

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('AddBookComponent', () => {
  let component: AddBookComponent;
  let fixture: ComponentFixture<AddBookComponent>;

  beforeEach(async(() => {
Severity: Major
Found in src/app/pages/library/add-book/add-book.component.spec.ts and 14 other locations - About 6 hrs to fix
src/app/core/message/message.component.spec.ts on lines 5..25
src/app/pages/academic-year/academic-year.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/add-staff/add-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/edit-staff/edit-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/view-staffs/view-staffs.component.spec.ts on lines 5..25
src/app/pages/admissions/students/edit-student/edit-student.component.spec.ts on lines 5..25
src/app/pages/admissions/students/students.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-student/identification-details/identification-details.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-students/view-students.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/class-levels/class-levels.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/curriculum-maintenance.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/subject-category/subject-category.component.spec.ts on lines 5..25
src/app/pages/library/edit-book/edit-book.component.spec.ts on lines 5..25

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

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('StaffComponent', () => {
  let component: StaffComponent;
  let fixture: ComponentFixture<StaffComponent>;

  beforeEach(async(() => {
Severity: Major
Found in src/app/pages/admissions/staff/staff.component.spec.ts and 14 other locations - About 6 hrs to fix
src/app/core/message/message.component.spec.ts on lines 5..25
src/app/pages/academic-year/academic-year.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/add-staff/add-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/edit-staff/edit-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/view-staffs/view-staffs.component.spec.ts on lines 5..25
src/app/pages/admissions/students/edit-student/edit-student.component.spec.ts on lines 5..25
src/app/pages/admissions/students/students.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-student/identification-details/identification-details.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-students/view-students.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/class-levels/class-levels.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/curriculum-maintenance.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/subject-category/subject-category.component.spec.ts on lines 5..25
src/app/pages/library/add-book/add-book.component.spec.ts on lines 5..25
src/app/pages/library/edit-book/edit-book.component.spec.ts on lines 5..25

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

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('MessageComponent', () => {
  let component: MessageComponent;
  let fixture: ComponentFixture<MessageComponent>;

  beforeEach(async(() => {
Severity: Major
Found in src/app/core/message/message.component.spec.ts and 14 other locations - About 6 hrs to fix
src/app/pages/academic-year/academic-year.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/add-staff/add-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/edit-staff/edit-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/view-staffs/view-staffs.component.spec.ts on lines 5..25
src/app/pages/admissions/students/edit-student/edit-student.component.spec.ts on lines 5..25
src/app/pages/admissions/students/students.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-student/identification-details/identification-details.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-students/view-students.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/class-levels/class-levels.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/curriculum-maintenance.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/subject-category/subject-category.component.spec.ts on lines 5..25
src/app/pages/library/add-book/add-book.component.spec.ts on lines 5..25
src/app/pages/library/edit-book/edit-book.component.spec.ts on lines 5..25

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

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('CurriculumMaintenanceComponent', () => {
  let component: CurriculumMaintenanceComponent;
  let fixture: ComponentFixture<CurriculumMaintenanceComponent>;

  beforeEach(async(() => {
src/app/core/message/message.component.spec.ts on lines 5..25
src/app/pages/academic-year/academic-year.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/add-staff/add-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/edit-staff/edit-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/view-staffs/view-staffs.component.spec.ts on lines 5..25
src/app/pages/admissions/students/edit-student/edit-student.component.spec.ts on lines 5..25
src/app/pages/admissions/students/students.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-student/identification-details/identification-details.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-students/view-students.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/class-levels/class-levels.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/subject-category/subject-category.component.spec.ts on lines 5..25
src/app/pages/library/add-book/add-book.component.spec.ts on lines 5..25
src/app/pages/library/edit-book/edit-book.component.spec.ts on lines 5..25

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

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('EditStudentComponent', () => {
  let component: EditStudentComponent;
  let fixture: ComponentFixture<EditStudentComponent>;

  beforeEach(async(() => {
src/app/core/message/message.component.spec.ts on lines 5..25
src/app/pages/academic-year/academic-year.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/add-staff/add-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/edit-staff/edit-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/view-staffs/view-staffs.component.spec.ts on lines 5..25
src/app/pages/admissions/students/students.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-student/identification-details/identification-details.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-students/view-students.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/class-levels/class-levels.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/curriculum-maintenance.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/subject-category/subject-category.component.spec.ts on lines 5..25
src/app/pages/library/add-book/add-book.component.spec.ts on lines 5..25
src/app/pages/library/edit-book/edit-book.component.spec.ts on lines 5..25

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

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('ClassLevelsComponent', () => {
  let component: ClassLevelsComponent;
  let fixture: ComponentFixture<ClassLevelsComponent>;

  beforeEach(async(() => {
src/app/core/message/message.component.spec.ts on lines 5..25
src/app/pages/academic-year/academic-year.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/add-staff/add-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/edit-staff/edit-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/view-staffs/view-staffs.component.spec.ts on lines 5..25
src/app/pages/admissions/students/edit-student/edit-student.component.spec.ts on lines 5..25
src/app/pages/admissions/students/students.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-student/identification-details/identification-details.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-students/view-students.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/curriculum-maintenance.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/subject-category/subject-category.component.spec.ts on lines 5..25
src/app/pages/library/add-book/add-book.component.spec.ts on lines 5..25
src/app/pages/library/edit-book/edit-book.component.spec.ts on lines 5..25

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

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('ViewStudentsComponent', () => {
  let component: ViewStudentsComponent;
  let fixture: ComponentFixture<ViewStudentsComponent>;

  beforeEach(async(() => {
src/app/core/message/message.component.spec.ts on lines 5..25
src/app/pages/academic-year/academic-year.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/add-staff/add-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/edit-staff/edit-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/view-staffs/view-staffs.component.spec.ts on lines 5..25
src/app/pages/admissions/students/edit-student/edit-student.component.spec.ts on lines 5..25
src/app/pages/admissions/students/students.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-student/identification-details/identification-details.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/class-levels/class-levels.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/curriculum-maintenance.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/subject-category/subject-category.component.spec.ts on lines 5..25
src/app/pages/library/add-book/add-book.component.spec.ts on lines 5..25
src/app/pages/library/edit-book/edit-book.component.spec.ts on lines 5..25

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

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('ViewStaffsComponent', () => {
  let component: ViewStaffsComponent;
  let fixture: ComponentFixture<ViewStaffsComponent>;

  beforeEach(async(() => {
src/app/core/message/message.component.spec.ts on lines 5..25
src/app/pages/academic-year/academic-year.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/add-staff/add-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/edit-staff/edit-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/staff.component.spec.ts on lines 5..25
src/app/pages/admissions/students/edit-student/edit-student.component.spec.ts on lines 5..25
src/app/pages/admissions/students/students.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-student/identification-details/identification-details.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-students/view-students.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/class-levels/class-levels.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/curriculum-maintenance.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/subject-category/subject-category.component.spec.ts on lines 5..25
src/app/pages/library/add-book/add-book.component.spec.ts on lines 5..25
src/app/pages/library/edit-book/edit-book.component.spec.ts on lines 5..25

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

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('SubjectCategoryComponent', () => {
  let component: SubjectCategoryComponent;
  let fixture: ComponentFixture<SubjectCategoryComponent>;

  beforeEach(async(() => {
src/app/core/message/message.component.spec.ts on lines 5..25
src/app/pages/academic-year/academic-year.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/add-staff/add-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/edit-staff/edit-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/view-staffs/view-staffs.component.spec.ts on lines 5..25
src/app/pages/admissions/students/edit-student/edit-student.component.spec.ts on lines 5..25
src/app/pages/admissions/students/students.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-student/identification-details/identification-details.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-students/view-students.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/class-levels/class-levels.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/curriculum-maintenance.component.spec.ts on lines 5..25
src/app/pages/library/add-book/add-book.component.spec.ts on lines 5..25
src/app/pages/library/edit-book/edit-book.component.spec.ts on lines 5..25

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

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('EditBookComponent', () => {
  let component: EditBookComponent;
  let fixture: ComponentFixture<EditBookComponent>;

  beforeEach(async(() => {
src/app/core/message/message.component.spec.ts on lines 5..25
src/app/pages/academic-year/academic-year.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/add-staff/add-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/edit-staff/edit-staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/staff.component.spec.ts on lines 5..25
src/app/pages/admissions/staff/view-staffs/view-staffs.component.spec.ts on lines 5..25
src/app/pages/admissions/students/edit-student/edit-student.component.spec.ts on lines 5..25
src/app/pages/admissions/students/students.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-student/identification-details/identification-details.component.spec.ts on lines 5..25
src/app/pages/admissions/students/view-students/view-students.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/class-levels/class-levels.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/curriculum-maintenance.component.spec.ts on lines 5..25
src/app/pages/curriculum-maintenance/subject-category/subject-category.component.spec.ts on lines 5..25
src/app/pages/library/add-book/add-book.component.spec.ts on lines 5..25

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

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

export class ReligionService {

  constructor(private config: Config, private http: HttpClient) { }
  getAll(): Observable<any> {
    const url = `${this.config.apiUrl}/api/religions/all`;
Severity: Major
Found in src/app/core/services/religion/religion.service.ts and 1 other location - About 5 hrs to fix
src/app/core/services/gender/gender.service.ts on lines 10..24

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

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

export class GenderService {

  constructor(private config: Config, private http: HttpClient) { }
  getAll(): Observable<any> {
    const url = `${this.config.apiUrl}/api/genders/all`;
Severity: Major
Found in src/app/core/services/gender/gender.service.ts and 1 other location - About 5 hrs to fix
src/app/core/services/religion/religion.service.ts on lines 10..24

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

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

      case 'class-level-categories':
        this.label = 'Unit';
        this.error.required = 'The unit field is required';
        this.hint = 'Please select a unit';
        this.classLevelsCategoriesService.getAll().subscribe(items => {
Severity: Major
Found in src/app/core/select/select.component.ts and 1 other location - About 5 hrs to fix
src/app/core/select/select.component.ts on lines 167..179

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

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

  getItems(): void {
    this.subjects
      .getAll()
      .pipe(
        map(res => {
src/app/pages/curriculum-maintenance/class-levels/view-class-levels/view-class-levels.component.ts on lines 31..52

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

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

  getItems(): void {
    this.classLevelService
      .getAll()
      .pipe(
        map(res => {
src/app/pages/curriculum-maintenance/units/view-units/view-units.component.ts on lines 28..49

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

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