OwenKelvin/Angular-School-Management-System

View on GitHub

Showing 54 of 218 total issues

Function validateAbbr has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  validateAbbr() {
    if (
      (this.unitForm.get('abbr').dirty || this.unitForm.get('abbr').touched) &&
      !this.unitForm.get('abbr').valid
    ) {

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function validateAbbr has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  validateAbbr() {
    if (
      (this.classLevelForm.get('abbr').dirty ||
        this.classLevelForm.get('abbr').touched) &&
      !this.classLevelForm.get('abbr').valid

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function validateEndDate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  validateEndDate() {
    if (
      (this.academicYearForm.get('endDate').dirty ||
        this.academicYearForm.get('endDate').touched) &&
      !this.academicYearForm.get('endDate').valid

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function validateName has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  validateName() {
    if (
      (this.newSubjectCategoryForm.get('name').dirty ||
        this.newSubjectCategoryForm.get('name').touched) &&
      !this.newSubjectCategoryForm.get('name').valid

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function validateEmail has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  validateEmail(i): void {
    this.createError(i);
    if ((this.guardians().controls[i].get('email').dirty || this.guardians().controls[i].get('email').touched) &&
      !this.guardians().controls[i].get('email').valid) {
      if (this.guardians().controls[i].get('email').errors.required) {

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function validateRelation has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  validateRelation(i): void {
    this.createError(i);
    if ((this.guardians().controls[i].get('relation').dirty || this.guardians().controls[i].get('relation').touched) &&
      !this.guardians().controls[i].get('relation').valid) {
      if (this.guardians().controls[i].get('relation').errors.required) {

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function validateName has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  validateName() {
    if (
      (this.classLevelCategoryForm.get('name').dirty ||
        this.classLevelCategoryForm.get('name').touched) &&
      !this.classLevelCategoryForm.get('name').valid

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function validateDateOfBirth has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  validateDateOfBirth(i): void {
    this.createError(i);
    if ((this.guardians().controls[i].get('dateOfBirth').dirty || this.guardians().controls[i].get('dateOfBirth').touched) &&
      !this.guardians().controls[i].get('dateOfBirth').valid) {
      if (this.guardians().controls[i].get('dateOfBirth').errors.required) {

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function validateUnitCategory has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  validateUnitCategory() {
    if (
      (this.unitForm.get('unitCategory').dirty ||
        this.unitForm.get('unitCategory').touched) &&
      !this.unitForm.get('unitCategory').valid

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function validateName has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  validateName() {
    if (
      (this.classLevelForm.get('name').dirty ||
        this.classLevelForm.get('name').touched) &&
      !this.classLevelForm.get('name').valid

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function validateStartDate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  validateStartDate() {
    if (
      (this.academicYearForm.get('startDate').dirty ||
        this.academicYearForm.get('startDate').touched) &&
      !this.academicYearForm.get('startDate').valid

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function validateAcademicYear has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  validateAcademicYear() {
    if (
      (this.academicsDetailsForm.get('academicYear').dirty ||
        this.academicsDetailsForm.get('academicYear').touched) &&
      !this.academicsDetailsForm.get('academicYear').valid

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function validateName has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  validateName() {
    if (
      (this.unitForm.get('name').dirty || this.unitForm.get('name').touched) &&
      !this.unitForm.get('name').valid
    ) {

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function validatesubjectLevelName has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  validatesubjectLevelName(i) {
    const form = (this.unitForm.get('subjectLevels') as FormArray).controls[i];
    if (
      (form.get('name').dirty || form.get('name').touched) &&
      !form.get('name').valid

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Severity
Category
Status
Source
Language