Genese complexity report

<- switches.mock.ts
Methods : 3
Complexity index : 10.4
Cyclomatic complexity : 5
Cognitive complexity
100 % Correct 3/3
0 % Warning 0/3 (threshold : 10)
0 % Error 0/3 (threshold : 20)
Cyclomatic complexity
100 % Correct 3/3
0 % Warning 0/3 (threshold : 5)
0 % Error 0/3 (threshold : 10)
Methods of switches.mock.ts
switches Complexity Index 5.8 Cyclomatic complexity 1
                            
                                
            
            
            
                switches(numberOfWords: number) { // ---------- +0.2 Complexity index (+0.2 atomic)
                    switch (numberOfWords) { // --------------- +1.2 Complexity index (+0.2 atomic, +1 structural)
                        case 1: // ---------------------------- +0.2 Complexity index (+0.2 atomic)
                            console.log("one"); // ------------ +1.3 Complexity index (+0.3 atomic, +1 structural)
                            break;
                        case 2: // ---------------------------- +0.2 Complexity index (+0.2 atomic)
                            console.log("a couple"); // ------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                            break;
                        default: // --------------------------- +0.1 Complexity index (+0.1 atomic)
                            console.log("lots"); // ----------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                    }
                }
            
                            
                        
tryCatch Complexity Index 3.9 Cyclomatic complexity 2
                            
                                
                
            
            
                tryCatch() { // -------------------------- +0.1 Complexity index (+0.1 atomic)
                    try {
                        console.log('Success'); // ------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                    } catch (e) { // --------------------- +1.2 Complexity index (+0.2 atomic, +1 structural)
                        console.log(e); // --------------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                    }
                }
            
                            
                        
questionDotToken Complexity Index 0.7 Cyclomatic complexity 2
                            
                                
                
            
            
                questionDotToken(time: any) { // ------- +0.3 Complexity index (+0.3 atomic)
                    time = time?.name; // -------------- +0.4 Complexity index (+0.4 atomic)
                }