Genese complexity report

<- stats.model.ts
Methods : 3
Complexity index : 15.6
Cyclomatic complexity : 4
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 stats.model.ts
setPercentages Complexity Index 3 Cyclomatic complexity 1
                            
                                
                
            
            
                /**
                 * Sets the percentages of cognitive and cyclomatic complexities spread by complexity status
                 */
                setPercentages(): void { // ------------------------------------------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
                    this.setPercentagesByComplexity(ComplexityType.COGNITIVE); // ----------------------------------------------------------------- +1.4 Complexity index (+0.4 atomic, +1 structural)
                    this.setPercentagesByComplexity(ComplexityType.CYCLOMATIC); // ---------------------------------------------------------------- +1.4 Complexity index (+0.4 atomic, +1 structural)
                }
            
                            
                        
setPercentagesByComplexity Complexity Index 9 Cyclomatic complexity 2
                            
                                
                
            
            
                /**
                 * Sets the percentages of cognitive or cyclomatic complexity spread by complexity status
                 */
                setPercentagesByComplexity(cpx: ComplexityType): void { // ---------------------------------------------------------------------- +0.4 Complexity index (+0.4 atomic)
                    if (this.numberOfMethodsByStatus[cpx]) { // --------------------------------------------------------------------------------- +1.4 Complexity index (+0.4 atomic, +1 structural)
                        this.percentsByStatus[cpx] = new ComplexitiesByStatus(); // ------------------------------------------------------------- +0.6 Complexity index (+0.6 atomic)
                        this.percentsByStatus[cpx].correct = percent(this.numberOfMethodsByStatus[cpx].correct, this.numberOfMethods); // ------- +2.2 Complexity index (+1.2 atomic, +1 structural)
                        this.percentsByStatus[cpx].warning = percent(this.numberOfMethodsByStatus[cpx].warning, this.numberOfMethods); // ------- +2.2 Complexity index (+1.2 atomic, +1 structural)
                        this.percentsByStatus[cpx].error = percent(this.numberOfMethodsByStatus[cpx].error, this.numberOfMethods); // ----------- +2.2 Complexity index (+1.2 atomic, +1 structural)
                    }
                }
            
                            
                        
plugChartHoles Complexity Index 3.6 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * For each complexity chart, adds bars with height = 0 when there is no method with a given complexity value which is lower than the greatest value
                 */
                plugChartHoles(): Stats { // ---------------------------------------------------------------------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
                    this.barChartCognitive = this.barChartCognitive.plugChartHoles(); // -------------------------------------------------------------------------------------- +1.6 Complexity index (+0.6 atomic, +1 structural)
                    this.barChartCyclomatic = this.barChartCyclomatic.plugChartHoles(); // ------------------------------------------------------------------------------------ +1.6 Complexity index (+0.6 atomic, +1 structural)
                    return this; // ------------------------------------------------------------------------------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
                }