Genese complexity report

<- binaries.mock.ts
Methods : 8
Complexity index : 74.3
Cyclomatic complexity : 42
Cognitive complexity
62.5 % Correct 5/8
37.5 % Warning 3/8 (threshold : 10)
0 % Error 0/8 (threshold : 20)
Cyclomatic complexity
62.5 % Correct 5/8
37.5 % Warning 3/8 (threshold : 5)
0 % Error 0/8 (threshold : 10)
Methods of binaries.mock.ts
binary Complexity Index 4.1 Cyclomatic complexity 3
                            
                                
            
            
                binary(a, b) { // ------------------ +0.3 Complexity index (+0.3 atomic)
                    if (a && b) { // --------------- +2.5 Complexity index (+0.5 atomic, +2 structural)
                        console.log('b'); // ------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                    }
                }
            
                            
                        
sameLogicDoor Complexity Index 5.5 Cyclomatic complexity 4
                            
                                
                
            
            
                sameLogicDoor(a, b, c) { // -------- +0.4 Complexity index (+0.4 atomic)
                    if (a && b && c) { // ---------- +3.8 Complexity index (+0.8 atomic, +3 structural)
                        console.log('b'); // ------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                    }
                }
            
                            
                        
differentLogicDoor Complexity Index 7.5 Cyclomatic complexity 4
                            
                                
                
            
            
                differentLogicDoor(a, b, c) { // ------- +0.4 Complexity index (+0.4 atomic)
                    if (a && b || c) { // -------------- +5.8 Complexity index (+0.8 atomic, +2 aggregation, +3 structural)
                        console.log('b'); // ----------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                    }
                }
            
                            
                        
differentLogicDoorWithBrackets Complexity Index 5.5 Cyclomatic complexity 4
                            
                                
                
            
            
                differentLogicDoorWithBrackets(a, b, c) { // ------- +0.4 Complexity index (+0.4 atomic)
                    if ((a && b) || c) { // ------------------------ +3.8 Complexity index (+0.8 atomic, +3 structural)
                        console.log('b'); // ----------------------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                    }
                }
            
                            
                        
orBetweenTwoBinaries Complexity Index 6.9 Cyclomatic complexity 5
                            
                                
                
            
            
                orBetweenTwoBinaries(a, b, c, d) { // ------- +0.5 Complexity index (+0.5 atomic)
                    if ((a && b) || (c && d)) { // ---------- +5.1 Complexity index (+1.1 atomic, +4 structural)
                        console.log('b'); // ---------------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                    }
                }
            
                            
                        
differentLogicDoorBetweenBinaries Complexity Index 10.2 Cyclomatic complexity 6
                            
                                
                
            
            
                differentLogicDoorBetweenBinaries(a, b, c, d) { // ------- +0.5 Complexity index (+0.5 atomic)
                    if ((a && b) || (c && d) && a) { // ------------------ +8.4 Complexity index (+1.4 atomic, +2 aggregation, +5 structural)
                        console.log('b'); // ----------------------------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                    }
                }
            
                            
                        
forIfAndAndOrAndAndOrOr Complexity Index 14.6 Cyclomatic complexity 7
                            
                                
                
            
            
                forIfAndAndOrAndAndOrOr(a, b, c, d, e, f) { // ------- +0.7 Complexity index (+0.7 atomic)
                    for (let i = 0; i < 10; i++) { // ---------------- +1.7 Complexity index (+0.7 atomic, +1 structural)
                        if (b && c || d && f || a) { // -------------- +10.9 Complexity index (+1.4 atomic, +4 aggregation, +0.5 nesting, +5 structural)
                            console.log(e); // ----------------------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                        }
                    }
                }
            
                            
                        
forForIfAndAndOrAndAndOrOr Complexity Index 20 Cyclomatic complexity 9
                            
                                
                
            
            
                forForIfAndAndOrAndAndOrOr(a, b, c, d, e, f) { // ------- +0.7 Complexity index (+0.7 atomic)
                    for (let i = 0; i < 10; i++) { // ------------------- +1.7 Complexity index (+0.7 atomic, +1 structural)
                        for (let j = 0; j < 10; j++) { // --------------- +2.2 Complexity index (+0.7 atomic, +0.5 nesting, +1 structural)
                            if (b && c || d && f || a) { // ------------- +11.4 Complexity index (+1.4 atomic, +4 aggregation, +1 nesting, +5 structural)
                                console.log(e); // ---------------------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                            }
                        }
                    }
                    if (a > b) { // ------------------------------------- +1.4 Complexity index (+0.4 atomic, +1 structural)
                        console.log(b); // ------------------------------ +1.3 Complexity index (+0.3 atomic, +1 structural)
                    }
                }