Genese complexity report

<- callbacks.mock.ts
Methods : 5
Complexity index : 21.7
Cyclomatic complexity : 6
Cognitive complexity
100 % Correct 5/5
0 % Warning 0/5 (threshold : 10)
0 % Error 0/5 (threshold : 20)
Cyclomatic complexity
100 % Correct 5/5
0 % Warning 0/5 (threshold : 5)
0 % Error 0/5 (threshold : 10)
Methods of callbacks.mock.ts
Complexity Index 1.4 Cyclomatic complexity 0
                            
                                
            
            
            
                constructor(object) { // ------------- +0.1 Complexity index (+0.1 atomic)
                    console.log(object); // ---------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                }
            
                            
                        
recursion Complexity Index 3.5 Cyclomatic complexity 1
                            
                                
                
            
                recursion(a) { // --------------- +2.2 Complexity index (+0.2 atomic, +2 recursivity)
                    this.recursion(a); // ------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                }
            
                            
                        
methodWithCallback Complexity Index 3.9 Cyclomatic complexity 1
                            
                                
                
            
            
                methodWithCallback<T>(a: T, callback): T { // ------- +2.6 Complexity index (+0.6 atomic, +2 recursivity)
                    return callback(a); // -------------------------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                }
            
                            
                        
caller Complexity Index 6.4 Cyclomatic complexity 2
                            
                                
                
            
            
                caller(a) { // ----------------------------------- +0.2 Complexity index (+0.2 atomic)
                    this.methodWithCallback(a, (b) => { // ------- +2.5 Complexity index (+0.5 atomic, +2 structural)
                        if (a < 2) { // -------------------------- +2.4 Complexity index (+0.4 atomic, +1 nesting, +1 structural)
                            console.log(b) // -------------------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                        }
                    })
                }
            
                            
                        
callerFunction Complexity Index 6.5 Cyclomatic complexity 2
                            
                                
                
            
            
                callerFunction(a) { // --------------------------------- +0.2 Complexity index (+0.2 atomic)
                    this.methodWithCallback(a, function (b) { // ------- +2.5 Complexity index (+0.5 atomic, +2 structural)
                        if (b < 6) { // -------------------------------- +2.4 Complexity index (+0.4 atomic, +1 nesting, +1 structural)
                            console.log('b', b) // --------------------- +1.4 Complexity index (+0.4 atomic, +1 structural)
                        }
                    })
                }