Passed
Push — master ( e24893...3fc32e )
by Plamen
01:26
created

assets/table_methods.js   A

Complexity

Total Complexity 42
Complexity/F 2.8

Size

Lines of Code 180
Function Count 15

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 0
eloc 132
nc 1
dl 0
loc 180
rs 9.0399
c 0
b 0
f 0
wmc 42
mnd 3
bc 33
fnc 15
bpm 2.2
cpm 2.8
noi 1

How to fix   Complexity   

Complexity

Complex classes like assets/table_methods.js often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

1