Genese complexity report

<- language-to-json-ast.service.ts
Methods : 1
Complexity index : 5.2
Cyclomatic complexity : 1
Cognitive complexity
100 % Correct 1/1
0 % Warning 0/1 (threshold : 10)
0 % Error 0/1 (threshold : 20)
Cyclomatic complexity
100 % Correct 1/1
0 % Warning 0/1 (threshold : 5)
0 % Error 0/1 (threshold : 10)
Methods of language-to-json-ast.service.ts
convert Complexity Index 5.2 Cyclomatic complexity 1
                            
                                
            
            
                static convert(path: string, language: Language): JsonAst { // ------- +0.6 Complexity index (+0.6 atomic)
                    switch (language) { // ------------------------------------------- +1.2 Complexity index (+0.2 atomic, +1 structural)
                        case Language.PHP: // ---------------------------------------- +0.3 Complexity index (+0.3 atomic)
                            return PhpToJsonAstService.convert(path); // ------------- +1.4 Complexity index (+0.4 atomic, +1 structural)
                        default: // -------------------------------------------------- +0.1 Complexity index (+0.1 atomic)
                            console.error('Unknown language ', language); // --------- +1.4 Complexity index (+0.4 atomic, +1 structural)
                            return undefined; // ------------------------------------- +0.2 Complexity index (+0.2 atomic)
                    }
                }