Skip to content

codeClimate issue: Function getServiceValue has a Cognitive Complexity of 25. #5

@AnasBoulmane

Description

@AnasBoulmane

Function getServiceValue has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.

 private getServiceValue (identifier: ServiceIdentifier, service: ServiceMetadata<any, any> | undefined): any {
    // find if instance of this object already initialized in the container and return it if it is
    if (service && service.value !== undefined) {
      return service.value;
    }

Severity: Minor
Found in: src/ContainerInstance.ts - About 3 hrs to fix

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions